Skip to content

Commit f5eab26

Browse files
committed
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
2 parents 4bf690d + fe326c5 commit f5eab26

File tree

8 files changed

+17
-9
lines changed

8 files changed

+17
-9
lines changed

drivers/clocksource/arm_global_timer.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static struct clock_event_device __percpu *gt_evt;
6060
* different to the 32-bit upper value read previously, go back to step 2.
6161
* Otherwise the 64-bit timer counter value is correct.
6262
*/
63-
static u64 gt_counter_read(void)
63+
static u64 notrace _gt_counter_read(void)
6464
{
6565
u64 counter;
6666
u32 lower;
@@ -79,6 +79,11 @@ static u64 gt_counter_read(void)
7979
return counter;
8080
}
8181

82+
static u64 gt_counter_read(void)
83+
{
84+
return _gt_counter_read();
85+
}
86+
8287
/**
8388
* To ensure that updates to comparator value register do not set the
8489
* Interrupt Status Register proceed as follows:
@@ -201,7 +206,7 @@ static struct clocksource gt_clocksource = {
201206
#ifdef CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
202207
static u64 notrace gt_sched_clock_read(void)
203208
{
204-
return gt_counter_read();
209+
return _gt_counter_read();
205210
}
206211
#endif
207212

drivers/clocksource/fsl_ftm_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static inline void ftm_reset_counter(void __iomem *base)
118118
ftm_writel(0x00, base + FTM_CNT);
119119
}
120120

121-
static u64 ftm_read_sched_clock(void)
121+
static u64 notrace ftm_read_sched_clock(void)
122122
{
123123
return ftm_readl(priv->clksrc_base + FTM_CNT);
124124
}

drivers/clocksource/samsung_pwm_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ static void samsung_clocksource_resume(struct clocksource *cs)
307307
samsung_time_start(pwm.source_id, true);
308308
}
309309

310-
static cycle_t samsung_clocksource_read(struct clocksource *c)
310+
static cycle_t notrace samsung_clocksource_read(struct clocksource *c)
311311
{
312312
return ~readl_relaxed(pwm.source_reg);
313313
}

drivers/clocksource/sh_mtu2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@ static int sh_mtu2_clock_event_shutdown(struct clock_event_device *ced)
280280
{
281281
struct sh_mtu2_channel *ch = ced_to_sh_mtu2(ced);
282282

283-
sh_mtu2_disable(ch);
283+
if (clockevent_state_periodic(ced))
284+
sh_mtu2_disable(ch);
285+
284286
return 0;
285287
}
286288

drivers/clocksource/time-pistachio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ static inline void gpt_writel(void __iomem *base, u32 value, u32 offset,
6767
writel(value, base + 0x20 * gpt_id + offset);
6868
}
6969

70-
static cycle_t pistachio_clocksource_read_cycles(struct clocksource *cs)
70+
static cycle_t notrace
71+
pistachio_clocksource_read_cycles(struct clocksource *cs)
7172
{
7273
struct pistachio_clocksource *pcs = to_pistachio_clocksource(cs);
7374
u32 counter, overflw;

drivers/clocksource/timer-digicolor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static irqreturn_t digicolor_timer_interrupt(int irq, void *dev_id)
143143
return IRQ_HANDLED;
144144
}
145145

146-
static u64 digicolor_timer_sched_read(void)
146+
static u64 notrace digicolor_timer_sched_read(void)
147147
{
148148
return ~readl(dc_timer_dev.base + COUNT(TIMER_B));
149149
}

drivers/clocksource/timer-prima2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id)
7373
}
7474

7575
/* 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)
7777
{
7878
u64 cycles;
7979

drivers/clocksource/vf_pit_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static inline void pit_irq_acknowledge(void)
5252
__raw_writel(PITTFLG_TIF, clkevt_base + PITTFLG);
5353
}
5454

55-
static u64 pit_read_sched_clock(void)
55+
static u64 notrace pit_read_sched_clock(void)
5656
{
5757
return ~__raw_readl(clksrc_base + PITCVAL);
5858
}

0 commit comments

Comments
 (0)