diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-01 14:39:03 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-01 14:39:03 -0500 |
| commit | f5eab26701999b1aa26d06772e013b11c4a16f6a (patch) | |
| tree | dcfbac21d754b7a6621127c53b9495e25af41c44 | |
| parent | 4bf690d7e09bbac43dfac9af01ba263e08f37e3e (diff) | |
| parent | fe326c5cc07cd265abad29c35c142cfae09889e4 (diff) | |
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner:
"The last round of minimalistic fixes for clocksource drivers:
- Prevent multiple shutdown of the sh_mtu2 clocksource
- Annotate a bunch of clocksource/schedclock functions with notrace
to prevent an annoying ftrace recursion issue"
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
clocksource/drivers/sh_mtu2: Fix multiple shutdown call issue
clocksource/drivers/digicolor: Prevent ftrace recursion
clocksource/drivers/fsl_ftm_timer: Prevent ftrace recursion
clocksource/drivers/vf_pit_timer: Prevent ftrace recursion
clocksource/drivers/prima2: Prevent ftrace recursion
clocksource/drivers/samsung_pwm_timer: Prevent ftrace recursion
clocksource/drivers/pistachio: Prevent ftrace recursion
clocksource/drivers/arm_global_timer: Prevent ftrace recursion
| -rw-r--r-- | drivers/clocksource/arm_global_timer.c | 9 | ||||
| -rw-r--r-- | drivers/clocksource/fsl_ftm_timer.c | 2 | ||||
| -rw-r--r-- | drivers/clocksource/samsung_pwm_timer.c | 2 | ||||
| -rw-r--r-- | drivers/clocksource/sh_mtu2.c | 4 | ||||
| -rw-r--r-- | drivers/clocksource/time-pistachio.c | 3 | ||||
| -rw-r--r-- | drivers/clocksource/timer-digicolor.c | 2 | ||||
| -rw-r--r-- | drivers/clocksource/timer-prima2.c | 2 | ||||
| -rw-r--r-- | drivers/clocksource/vf_pit_timer.c | 2 |
8 files changed, 17 insertions, 9 deletions
diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c index 29ea50ac366a..a2cb6fae9295 100644 --- a/drivers/clocksource/arm_global_timer.c +++ b/drivers/clocksource/arm_global_timer.c | |||
| @@ -60,7 +60,7 @@ static struct clock_event_device __percpu *gt_evt; | |||
| 60 | * different to the 32-bit upper value read previously, go back to step 2. | 60 | * different to the 32-bit upper value read previously, go back to step 2. |
| 61 | * Otherwise the 64-bit timer counter value is correct. | 61 | * Otherwise the 64-bit timer counter value is correct. |
| 62 | */ | 62 | */ |
| 63 | static u64 gt_counter_read(void) | 63 | static u64 notrace _gt_counter_read(void) |
| 64 | { | 64 | { |
| 65 | u64 counter; | 65 | u64 counter; |
| 66 | u32 lower; | 66 | u32 lower; |
| @@ -79,6 +79,11 @@ static u64 gt_counter_read(void) | |||
| 79 | return counter; | 79 | return counter; |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | static u64 gt_counter_read(void) | ||
| 83 | { | ||
| 84 | return _gt_counter_read(); | ||
| 85 | } | ||
| 86 | |||
| 82 | /** | 87 | /** |
| 83 | * To ensure that updates to comparator value register do not set the | 88 | * To ensure that updates to comparator value register do not set the |
| 84 | * Interrupt Status Register proceed as follows: | 89 | * Interrupt Status Register proceed as follows: |
| @@ -201,7 +206,7 @@ static struct clocksource gt_clocksource = { | |||
| 201 | #ifdef CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK | 206 | #ifdef CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK |
| 202 | static u64 notrace gt_sched_clock_read(void) | 207 | static u64 notrace gt_sched_clock_read(void) |
| 203 | { | 208 | { |
| 204 | return gt_counter_read(); | 209 | return _gt_counter_read(); |
| 205 | } | 210 | } |
| 206 | #endif | 211 | #endif |
| 207 | 212 | ||
diff --git a/drivers/clocksource/fsl_ftm_timer.c b/drivers/clocksource/fsl_ftm_timer.c index ef434699c80a..10202f1fdfd7 100644 --- a/drivers/clocksource/fsl_ftm_timer.c +++ b/drivers/clocksource/fsl_ftm_timer.c | |||
| @@ -118,7 +118,7 @@ static inline void ftm_reset_counter(void __iomem *base) | |||
| 118 | ftm_writel(0x00, base + FTM_CNT); | 118 | ftm_writel(0x00, base + FTM_CNT); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | static u64 ftm_read_sched_clock(void) | 121 | static u64 notrace ftm_read_sched_clock(void) |
| 122 | { | 122 | { |
| 123 | return ftm_readl(priv->clksrc_base + FTM_CNT); | 123 | return ftm_readl(priv->clksrc_base + FTM_CNT); |
| 124 | } | 124 | } |
diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c index bc90e13338cc..9502bc4c3f6d 100644 --- a/drivers/clocksource/samsung_pwm_timer.c +++ b/drivers/clocksource/samsung_pwm_timer.c | |||
| @@ -307,7 +307,7 @@ static void samsung_clocksource_resume(struct clocksource *cs) | |||
| 307 | samsung_time_start(pwm.source_id, true); | 307 | samsung_time_start(pwm.source_id, true); |
| 308 | } | 308 | } |
| 309 | 309 | ||
| 310 | static cycle_t samsung_clocksource_read(struct clocksource *c) | 310 | static cycle_t notrace samsung_clocksource_read(struct clocksource *c) |
| 311 | { | 311 | { |
| 312 | return ~readl_relaxed(pwm.source_reg); | 312 | return ~readl_relaxed(pwm.source_reg); |
| 313 | } | 313 | } |
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c index f1985da8113f..53aa7e92a7d7 100644 --- a/drivers/clocksource/sh_mtu2.c +++ b/drivers/clocksource/sh_mtu2.c | |||
| @@ -280,7 +280,9 @@ static int sh_mtu2_clock_event_shutdown(struct clock_event_device *ced) | |||
| 280 | { | 280 | { |
| 281 | struct sh_mtu2_channel *ch = ced_to_sh_mtu2(ced); | 281 | struct sh_mtu2_channel *ch = ced_to_sh_mtu2(ced); |
| 282 | 282 | ||
| 283 | sh_mtu2_disable(ch); | 283 | if (clockevent_state_periodic(ced)) |
| 284 | sh_mtu2_disable(ch); | ||
| 285 | |||
| 284 | return 0; | 286 | return 0; |
| 285 | } | 287 | } |
| 286 | 288 | ||
diff --git a/drivers/clocksource/time-pistachio.c b/drivers/clocksource/time-pistachio.c index 18d4266c2986..bba679900054 100644 --- a/drivers/clocksource/time-pistachio.c +++ b/drivers/clocksource/time-pistachio.c | |||
| @@ -67,7 +67,8 @@ static inline void gpt_writel(void __iomem *base, u32 value, u32 offset, | |||
| 67 | writel(value, base + 0x20 * gpt_id + offset); | 67 | writel(value, base + 0x20 * gpt_id + offset); |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | static cycle_t pistachio_clocksource_read_cycles(struct clocksource *cs) | 70 | static cycle_t notrace |
| 71 | pistachio_clocksource_read_cycles(struct clocksource *cs) | ||
| 71 | { | 72 | { |
| 72 | struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs); | 73 | struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs); |
| 73 | u32 counter, overflw; | 74 | u32 counter, overflw; |
diff --git a/drivers/clocksource/timer-digicolor.c b/drivers/clocksource/timer-digicolor.c index e73947f0f86d..a536eeb634d8 100644 --- a/drivers/clocksource/timer-digicolor.c +++ b/drivers/clocksource/timer-digicolor.c | |||
| @@ -143,7 +143,7 @@ static irqreturn_t digicolor_timer_interrupt(int irq, void *dev_id) | |||
| 143 | return IRQ_HANDLED; | 143 | return IRQ_HANDLED; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | static u64 digicolor_timer_sched_read(void) | 146 | static u64 notrace digicolor_timer_sched_read(void) |
| 147 | { | 147 | { |
| 148 | return ~readl(dc_timer_dev.base + COUNT(TIMER_B)); | 148 | return ~readl(dc_timer_dev.base + COUNT(TIMER_B)); |
| 149 | } | 149 | } |
diff --git a/drivers/clocksource/timer-prima2.c b/drivers/clocksource/timer-prima2.c index 78de982cc640..2854c663e8b5 100644 --- a/drivers/clocksource/timer-prima2.c +++ b/drivers/clocksource/timer-prima2.c | |||
| @@ -73,7 +73,7 @@ static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id) | |||
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | /* read 64-bit timer counter */ | 75 | /* read 64-bit timer counter */ |
| 76 | static cycle_t sirfsoc_timer_read(struct clocksource *cs) | 76 | static cycle_t notrace sirfsoc_timer_read(struct clocksource *cs) |
| 77 | { | 77 | { |
| 78 | u64 cycles; | 78 | u64 cycles; |
| 79 | 79 | ||
diff --git a/drivers/clocksource/vf_pit_timer.c b/drivers/clocksource/vf_pit_timer.c index f07ba9932171..a0e6c68536a1 100644 --- a/drivers/clocksource/vf_pit_timer.c +++ b/drivers/clocksource/vf_pit_timer.c | |||
| @@ -52,7 +52,7 @@ static inline void pit_irq_acknowledge(void) | |||
| 52 | __raw_writel(PITTFLG_TIF, clkevt_base + PITTFLG); | 52 | __raw_writel(PITTFLG_TIF, clkevt_base + PITTFLG); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | static u64 pit_read_sched_clock(void) | 55 | static u64 notrace pit_read_sched_clock(void) |
| 56 | { | 56 | { |
| 57 | return ~__raw_readl(clksrc_base + PITCVAL); | 57 | return ~__raw_readl(clksrc_base + PITCVAL); |
| 58 | } | 58 | } |
