summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0010-S390-correct-ktime-to-tod-clock-comparator-conversio.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-03-01 09:35:40 +0100
committerDenys Dmytriyenko <denys@ti.com>2012-03-04 23:35:53 -0500
commit4d6e7c358e61f2053f945423718d0923b6413f99 (patch)
treed2c7ac4906cb51ff7183ab48b497675584c72cfc /recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0010-S390-correct-ktime-to-tod-clock-comparator-conversio.patch
parente31722adc42ef202ae273571ce19a7ac304e5eb6 (diff)
downloadmeta-ti-4d6e7c358e61f2053f945423718d0923b6413f99.tar.gz
linux-ti33x-psp 3.2: update to 3.2.9 and add 2 patches from PSP tree
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0010-S390-correct-ktime-to-tod-clock-comparator-conversio.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0010-S390-correct-ktime-to-tod-clock-comparator-conversio.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0010-S390-correct-ktime-to-tod-clock-comparator-conversio.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0010-S390-correct-ktime-to-tod-clock-comparator-conversio.patch
new file mode 100644
index 00000000..080ca0d4
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0010-S390-correct-ktime-to-tod-clock-comparator-conversio.patch
@@ -0,0 +1,44 @@
1From cadd96ffcc3e4c6db78a08d0ea95fec1ddaecf18 Mon Sep 17 00:00:00 2001
2From: Martin Schwidefsky <schwidefsky@de.ibm.com>
3Date: Fri, 17 Feb 2012 10:29:23 +0100
4Subject: [PATCH 10/73] S390: correct ktime to tod clock comparator conversion
5
6commit cf1eb40f8f5ea12c9e569e7282161fc7f194fd62 upstream.
7
8The conversion of the ktime to a value suitable for the clock comparator
9does not take changes to wall_to_monotonic into account. In fact the
10conversion just needs the boot clock (sched_clock_base_cc) and the
11total_sleep_time.
12
13This is applicable to 3.2+ kernels.
14
15Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17---
18 arch/s390/kernel/time.c | 7 +++++--
19 1 files changed, 5 insertions(+), 2 deletions(-)
20
21diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
22index ebbfab3..e03c555 100644
23--- a/arch/s390/kernel/time.c
24+++ b/arch/s390/kernel/time.c
25@@ -113,11 +113,14 @@ static void fixup_clock_comparator(unsigned long long delta)
26 static int s390_next_ktime(ktime_t expires,
27 struct clock_event_device *evt)
28 {
29+ struct timespec ts;
30 u64 nsecs;
31
32- nsecs = ktime_to_ns(ktime_sub(expires, ktime_get_monotonic_offset()));
33+ ts.tv_sec = ts.tv_nsec = 0;
34+ monotonic_to_bootbased(&ts);
35+ nsecs = ktime_to_ns(ktime_add(timespec_to_ktime(ts), expires));
36 do_div(nsecs, 125);
37- S390_lowcore.clock_comparator = TOD_UNIX_EPOCH + (nsecs << 9);
38+ S390_lowcore.clock_comparator = sched_clock_base_cc + (nsecs << 9);
39 set_clock_comparator(S390_lowcore.clock_comparator);
40 return 0;
41 }
42--
431.7.7.4
44