diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2012-03-01 09:35:40 +0100 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2012-03-04 23:35:53 -0500 |
commit | 4d6e7c358e61f2053f945423718d0923b6413f99 (patch) | |
tree | d2c7ac4906cb51ff7183ab48b497675584c72cfc /recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0010-S390-correct-ktime-to-tod-clock-comparator-conversio.patch | |
parent | e31722adc42ef202ae273571ce19a7ac304e5eb6 (diff) | |
download | meta-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.patch | 44 |
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 @@ | |||
1 | From cadd96ffcc3e4c6db78a08d0ea95fec1ddaecf18 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Schwidefsky <schwidefsky@de.ibm.com> | ||
3 | Date: Fri, 17 Feb 2012 10:29:23 +0100 | ||
4 | Subject: [PATCH 10/73] S390: correct ktime to tod clock comparator conversion | ||
5 | |||
6 | commit cf1eb40f8f5ea12c9e569e7282161fc7f194fd62 upstream. | ||
7 | |||
8 | The conversion of the ktime to a value suitable for the clock comparator | ||
9 | does not take changes to wall_to_monotonic into account. In fact the | ||
10 | conversion just needs the boot clock (sched_clock_base_cc) and the | ||
11 | total_sleep_time. | ||
12 | |||
13 | This is applicable to 3.2+ kernels. | ||
14 | |||
15 | Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> | ||
16 | Signed-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 | |||
21 | diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c | ||
22 | index 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 | -- | ||
43 | 1.7.7.4 | ||
44 | |||