clocksource: add missing notrace attribute
Subsystems (4)
cover clocksource: add missing notrace attribute
Some clocksource drivers sched_clock implementation either miss notrace attribute or call wasn't notrace function. This series try to fix them.
Jisheng Zhang (7):
clocksource: arm_global_timer: fix ftrace
clocksource: samsung_pwm_timer: fix ftrace
clocksource: pistachio: fix ftrace
clocksource: prima2: fix ftrace
clocksource: vf_pit_timer: don't trace pit_read_sched_clock()
clocksource: digicolor: don't trace digicolor_timer_sched_read()
clocksource: fsl_ftm_timer: don't trace ftm_read_sched_clock
drivers/clocksource/arm_global_timer.c | 9 +++++++-- drivers/clocksource/fsl_ftm_timer.c | 2 +- drivers/clocksource/samsung_pwm_timer.c | 2 +- drivers/clocksource/time-pistachio.c | 3 ++- drivers/clocksource/timer-digicolor.c | 2 +- drivers/clocksource/timer-prima2.c | 2 +- drivers/clocksource/vf_pit_timer.c | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-)
Signature · 1 line
2.6.1
PATCH 1/7 clocksource: arm_global_timer: fix ftrace
Currently arm_global_timer can be used as a scheduler clock, we properly marked gt_sched_clock_read() as notrace. But we then call another function gt_counter_read() that _wasn't_ notrace.
This patch fix this by adding an extra function to keep other users of gt_counter_read() traceable.
--- drivers/clocksource/arm_global_timer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/clocksource/arm_global_timer.c +7 -2
@@ -60,7 +60,7 @@ static struct clock_event_device __percpu *gt_evt;* different to the 32-bit upper value read previously, go back to step 2. * Otherwise the 64-bit timer counter value is correct. */ -static u64 gt_counter_read (void ) +static u64 notrace _gt_counter_read(void) {u64 counter;u32 lower;
@@ -79,6 +79,11 @@ static u64 gt_counter_read(void)return counter; } +static u64 gt_counter_read (void ) +{ +return _gt_counter_read (); +} +/** * To ensure that updates to comparator value register do not set the * Interrupt Status Register proceed as follows:
@@ -201,7 +206,7 @@ static struct clocksource gt_clocksource = {#ifdef CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK static u64 notrace gt_sched_clock_read(void) { -return gt_counter_read (); +return _gt_counter_read (); }#endif
Signature · 1 line
2.6.1
PATCH 2/7 clocksource: samsung_pwm_timer: fix ftrace
In reply to Jisheng ZhangCurrently samsung_pwm_timer can be used as a scheduler clock, we properly marked samsung_read_sched_clock() as notrace. But we then call another function samsung_clocksource_read() that _wasn't_ notrace.
This patch fix this by adding notrace attribute to the samsung_clocksource_read() function.
--- drivers/clocksource/samsung_pwm_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/samsung_pwm_timer.c +1 -1
@@ -307,7 +307,7 @@ static void samsung_clocksource_resume(struct clocksource *cs)samsung_time_start (pwm.source_id, true); } -static cycle_t samsung_clocksource_read (struct clocksource *c) +static cycle_t notrace samsung_clocksource_read(struct clocksource *c) {return ~readl_relaxed (pwm.source_reg); }
Signature · 1 line
2.6.1
PATCH 3/7 clocksource: pistachio: fix ftrace
In reply to Jisheng ZhangCurrently pistachio can be used as a scheduler clock, we properly marked pistachio_read_sched_clock() as notrace. But we then call another function pistachio_clocksource_read_cycles() that _wasn't_ notrace.
This patch fix this by adding notrace attribute to the pistachio_clocksource_read_cycles() function.
--- drivers/clocksource/time-pistachio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/time-pistachio.c +2 -1
@@ -67,7 +67,8 @@ static inline void gpt_writel(void __iomem *base, u32 value, u32 offset,writel (value, base +0x20 * gpt_id + offset); } -static cycle_t pistachio_clocksource_read_cycles (struct clocksource *cs) +static cycle_t notrace +pistachio_clocksource_read_cycles (struct clocksource *cs) {struct pistachio_clocksource *pcs =to_pistachio_clocksource (cs);u32 counter, overflw;
Signature · 1 line
2.6.1
PATCH 4/7 clocksource: prima2: fix ftrace
In reply to Jisheng ZhangCurrently prima2 timer can be used as a scheduler clock, we properly marked sirfsoc_read_sched_clock() as notrace. But we then call another function sirfsoc_timer_read() that _wasn't_ notrace.
This patch fix this by adding notrace attribute to the sirfsoc_timer_read() function.
--- drivers/clocksource/timer-prima2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-prima2.c +1 -1
@@ -73,7 +73,7 @@ static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id) }/* read 64-bit timer counter */ -static cycle_t sirfsoc_timer_read (struct clocksource *cs) +static cycle_t notrace sirfsoc_timer_read(struct clocksource *cs) {u64 cycles;
Signature · 1 line
2.6.1
PATCH 5/7 clocksource: vf_pit_timer: don't trace pit_read_sched_clock()
In reply to Jisheng ZhangWe should not trace pit_read_sched_clock() function, add notrace attribute to this function.
--- drivers/clocksource/vf_pit_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/vf_pit_timer.c +1 -1
@@ -52,7 +52,7 @@ static inline void pit_irq_acknowledge(void)__raw_writel (PITTFLG_TIF , clkevt_base +PITTFLG ); } -static u64 pit_read_sched_clock (void ) +static u64 notrace pit_read_sched_clock(void) {return ~__raw_readl (clksrc_base +PITCVAL ); }
Signature · 1 line
2.6.1
PATCH 6/7 clocksource: digicolor: don't trace digicolor_timer_sched_read()
In reply to Jisheng ZhangWe should not trace digicolor_timer_sched_read() function, add notrace attribute to this function.
--- drivers/clocksource/timer-digicolor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/timer-digicolor.c +1 -1
@@ -143,7 +143,7 @@ static irqreturn_t digicolor_timer_interrupt(int irq, void *dev_id)return IRQ_HANDLED ; } -static u64 digicolor_timer_sched_read (void ) +static u64 notrace digicolor_timer_sched_read(void) {return ~readl (dc_timer_dev.base +COUNT (TIMER_B )); }
Signature · 1 line
2.6.1
Re: [PATCH 6/7] clocksource: digicolor: don't trace digicolor_timer_sched_read()
Hi Jisheng Zhang,
Quoted 4 lines · Jisheng Zhang
We should not trace
digicolor_timer_sched_read()function, add notrace attribute to this function.Signed-off-by Jisheng Zhang <[email protected]>
Thanks,
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 7/7 clocksource: fsl_ftm_timer: don't trace ftm_read_sched_clock
In reply to Jisheng Zhangwe should not trace ftm_read_sched_clock() function, add notrace attribute to this function.
--- drivers/clocksource/fsl_ftm_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/fsl_ftm_timer.c +1 -1
@@ -118,7 +118,7 @@ static inline void ftm_reset_counter(void __iomem *base)ftm_writel (0x00 , base +FTM_CNT ); } -static u64 ftm_read_sched_clock (void ) +static u64 notrace ftm_read_sched_clock(void) {return ftm_readl (priv->clksrc_base +FTM_CNT ); }
Signature · 1 line
2.6.1
Quoted 12 lines · Jisheng Zhang
Some clocksource drivers
sched_clockimplementation either miss notrace attribute or call wasn't notrace function. This series try to fix them.Jisheng Zhang (7):
clocksource:arm_global_timer: fix ftrace
clocksource:samsung_pwm_timer: fix ftrace
clocksource: pistachio: fix ftrace
clocksource: prima2: fix ftrace
clocksource:vf_pit_timer: don't tracepit_read_sched_clock()
clocksource: digicolor: don't tracedigicolor_timer_sched_read()
clocksource:fsl_ftm_timer: don't traceftm_read_sched_clock
Quoted 8 lines
drivers/clocksource/arm_global_timer.c | 9 +++++++-- drivers/clocksource/fsl_ftm_timer.c | 2 +- drivers/clocksource/samsung_pwm_timer.c | 2 +- drivers/clocksource/time-pistachio.c | 3 ++- drivers/clocksource/timer-digicolor.c | 2 +- drivers/clocksource/timer-prima2.c | 2 +- drivers/clocksource/vf_pit_timer.c | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-)
Hi Jisheng,
I will apply this series as 4.3 fixes.
In the future, could you fix the subject by:
clocksource/drivers/<driver>: [first letter uppercase]...;
Thanks
-- Daniel
Signature · 5 lines
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Dear Daniel,
Quoted 22 lines · On Mon, 26 Oct 2015 18:50:10 +0100 Daniel Lezcano <[email protected]>…
Quoted 12 lines · Jisheng Zhang
Some clocksource drivers
sched_clockimplementation either miss notrace attribute or call wasn't notrace function. This series try to fix them.Jisheng Zhang (7):
clocksource:arm_global_timer: fix ftrace
clocksource:samsung_pwm_timer: fix ftrace
clocksource: pistachio: fix ftrace
clocksource: prima2: fix ftrace
clocksource:vf_pit_timer: don't tracepit_read_sched_clock()
clocksource: digicolor: don't tracedigicolor_timer_sched_read()
clocksource:fsl_ftm_timer: don't traceftm_read_sched_clockQuoted 8 lines
drivers/clocksource/arm_global_timer.c | 9 +++++++-- drivers/clocksource/fsl_ftm_timer.c | 2 +- drivers/clocksource/samsung_pwm_timer.c | 2 +- drivers/clocksource/time-pistachio.c | 3 ++- drivers/clocksource/timer-digicolor.c | 2 +- drivers/clocksource/timer-prima2.c | 2 +- drivers/clocksource/vf_pit_timer.c | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-)
Quoted 7 lines
Hi Jisheng,
I will apply this series as 4.3 fixes.
In the future, could you fix the subject by:
clocksource/drivers/<driver>: [first letter uppercase]...;
Got it. Will take care in the future.
Thanks a lot for kind reminding,
Jisheng