diff options
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/sys_sh.c | 9 | ||||
-rw-r--r-- | arch/sh/kernel/time_32.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/timers/timer-tmu.c | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index 58dfc02c7af1..e3a7e36639ef 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c | |||
@@ -63,6 +63,15 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | |||
63 | unsigned long prot, unsigned long flags, | 63 | unsigned long prot, unsigned long flags, |
64 | unsigned long fd, unsigned long pgoff) | 64 | unsigned long fd, unsigned long pgoff) |
65 | { | 65 | { |
66 | /* | ||
67 | * The shift for mmap2 is constant, regardless of PAGE_SIZE | ||
68 | * setting. | ||
69 | */ | ||
70 | if (pgoff & ((1 << (PAGE_SHIFT - 12)) - 1)) | ||
71 | return -EINVAL; | ||
72 | |||
73 | pgoff >>= PAGE_SHIFT - 12; | ||
74 | |||
66 | return do_mmap2(addr, len, prot, flags, fd, pgoff); | 75 | return do_mmap2(addr, len, prot, flags, fd, pgoff); |
67 | } | 76 | } |
68 | 77 | ||
diff --git a/arch/sh/kernel/time_32.c b/arch/sh/kernel/time_32.c index 04b8c6ab1667..c770413c3213 100644 --- a/arch/sh/kernel/time_32.c +++ b/arch/sh/kernel/time_32.c | |||
@@ -209,7 +209,7 @@ unsigned long long sched_clock(void) | |||
209 | if (!clocksource_sh.rating) | 209 | if (!clocksource_sh.rating) |
210 | return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ); | 210 | return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ); |
211 | 211 | ||
212 | cycles = clocksource_sh.read(); | 212 | cycles = clocksource_sh.read(&clocksource_sh); |
213 | return cyc2ns(&clocksource_sh, cycles); | 213 | return cyc2ns(&clocksource_sh, cycles); |
214 | } | 214 | } |
215 | #endif | 215 | #endif |
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index c5d3396f5960..fe8d8930ccb6 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c | |||
@@ -81,7 +81,7 @@ static int tmu_timer_stop(void) | |||
81 | */ | 81 | */ |
82 | static int tmus_are_scaled; | 82 | static int tmus_are_scaled; |
83 | 83 | ||
84 | static cycle_t tmu_timer_read(void) | 84 | static cycle_t tmu_timer_read(struct clocksource *cs) |
85 | { | 85 | { |
86 | return ((cycle_t)(~_tmu_read(TMU1)))<<tmus_are_scaled; | 86 | return ((cycle_t)(~_tmu_read(TMU1)))<<tmus_are_scaled; |
87 | } | 87 | } |