* [PATCH 1/7] clocksource: arm_global_timer: fix ftrace
2015-10-20 8:02 [PATCH 0/7] clocksource: add missing notrace attribute Jisheng Zhang
@ 2015-10-20 8:02 ` Jisheng Zhang
2015-10-20 8:02 ` [PATCH 2/7] clocksource: samsung_pwm_timer: " Jisheng Zhang
` (6 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Jisheng Zhang @ 2015-10-20 8:02 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
drivers/clocksource/arm_global_timer.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/arm_global_timer.c b/drivers/clocksource/arm_global_timer.c
index 29ea50a..a2cb6fa 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;
* 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
--
2.6.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/7] clocksource: samsung_pwm_timer: fix ftrace
2015-10-20 8:02 [PATCH 0/7] clocksource: add missing notrace attribute Jisheng Zhang
2015-10-20 8:02 ` [PATCH 1/7] clocksource: arm_global_timer: fix ftrace Jisheng Zhang
@ 2015-10-20 8:02 ` Jisheng Zhang
2015-10-20 8:02 ` [PATCH 3/7] clocksource: pistachio: " Jisheng Zhang
` (5 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Jisheng Zhang @ 2015-10-20 8:02 UTC (permalink / raw)
To: linux-arm-kernel
Currently 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.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
drivers/clocksource/samsung_pwm_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c
index bc90e13..9502bc4 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)
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);
}
--
2.6.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/7] clocksource: pistachio: fix ftrace
2015-10-20 8:02 [PATCH 0/7] clocksource: add missing notrace attribute Jisheng Zhang
2015-10-20 8:02 ` [PATCH 1/7] clocksource: arm_global_timer: fix ftrace Jisheng Zhang
2015-10-20 8:02 ` [PATCH 2/7] clocksource: samsung_pwm_timer: " Jisheng Zhang
@ 2015-10-20 8:02 ` Jisheng Zhang
2015-10-20 8:02 ` [PATCH 4/7] clocksource: prima2: " Jisheng Zhang
` (4 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Jisheng Zhang @ 2015-10-20 8:02 UTC (permalink / raw)
To: linux-arm-kernel
Currently 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.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
drivers/clocksource/time-pistachio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/time-pistachio.c b/drivers/clocksource/time-pistachio.c
index 18d4266..bba6799 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,
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;
--
2.6.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/7] clocksource: prima2: fix ftrace
2015-10-20 8:02 [PATCH 0/7] clocksource: add missing notrace attribute Jisheng Zhang
` (2 preceding siblings ...)
2015-10-20 8:02 ` [PATCH 3/7] clocksource: pistachio: " Jisheng Zhang
@ 2015-10-20 8:02 ` Jisheng Zhang
2015-10-20 8:02 ` [PATCH 5/7] clocksource: vf_pit_timer: don't trace pit_read_sched_clock() Jisheng Zhang
` (3 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Jisheng Zhang @ 2015-10-20 8:02 UTC (permalink / raw)
To: linux-arm-kernel
Currently 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.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
drivers/clocksource/timer-prima2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-prima2.c b/drivers/clocksource/timer-prima2.c
index 78de982..2854c66 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)
}
/* 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;
--
2.6.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/7] clocksource: vf_pit_timer: don't trace pit_read_sched_clock()
2015-10-20 8:02 [PATCH 0/7] clocksource: add missing notrace attribute Jisheng Zhang
` (3 preceding siblings ...)
2015-10-20 8:02 ` [PATCH 4/7] clocksource: prima2: " Jisheng Zhang
@ 2015-10-20 8:02 ` Jisheng Zhang
2015-10-20 8:02 ` [PATCH 6/7] clocksource: digicolor: don't trace digicolor_timer_sched_read() Jisheng Zhang
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Jisheng Zhang @ 2015-10-20 8:02 UTC (permalink / raw)
To: linux-arm-kernel
We should not trace pit_read_sched_clock() function, add notrace
attribute to this function.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
drivers/clocksource/vf_pit_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/vf_pit_timer.c b/drivers/clocksource/vf_pit_timer.c
index f07ba99..a0e6c68 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)
__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);
}
--
2.6.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 6/7] clocksource: digicolor: don't trace digicolor_timer_sched_read()
2015-10-20 8:02 [PATCH 0/7] clocksource: add missing notrace attribute Jisheng Zhang
` (4 preceding siblings ...)
2015-10-20 8:02 ` [PATCH 5/7] clocksource: vf_pit_timer: don't trace pit_read_sched_clock() Jisheng Zhang
@ 2015-10-20 8:02 ` Jisheng Zhang
2015-10-20 11:14 ` Baruch Siach
2015-10-20 8:02 ` [PATCH 7/7] clocksource: fsl_ftm_timer: don't trace ftm_read_sched_clock Jisheng Zhang
2015-10-26 17:50 ` [PATCH 0/7] clocksource: add missing notrace attribute Daniel Lezcano
7 siblings, 1 reply; 11+ messages in thread
From: Jisheng Zhang @ 2015-10-20 8:02 UTC (permalink / raw)
To: linux-arm-kernel
We should not trace digicolor_timer_sched_read() function, add notrace
attribute to this function.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
drivers/clocksource/timer-digicolor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-digicolor.c b/drivers/clocksource/timer-digicolor.c
index e73947f0f..a536eeb 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)
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));
}
--
2.6.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 7/7] clocksource: fsl_ftm_timer: don't trace ftm_read_sched_clock
2015-10-20 8:02 [PATCH 0/7] clocksource: add missing notrace attribute Jisheng Zhang
` (5 preceding siblings ...)
2015-10-20 8:02 ` [PATCH 6/7] clocksource: digicolor: don't trace digicolor_timer_sched_read() Jisheng Zhang
@ 2015-10-20 8:02 ` Jisheng Zhang
2015-10-26 17:50 ` [PATCH 0/7] clocksource: add missing notrace attribute Daniel Lezcano
7 siblings, 0 replies; 11+ messages in thread
From: Jisheng Zhang @ 2015-10-20 8:02 UTC (permalink / raw)
To: linux-arm-kernel
we should not trace ftm_read_sched_clock() function, add notrace
attribute to this function.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
---
drivers/clocksource/fsl_ftm_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/fsl_ftm_timer.c b/drivers/clocksource/fsl_ftm_timer.c
index ef43469..10202f1 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)
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);
}
--
2.6.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 0/7] clocksource: add missing notrace attribute
2015-10-20 8:02 [PATCH 0/7] clocksource: add missing notrace attribute Jisheng Zhang
` (6 preceding siblings ...)
2015-10-20 8:02 ` [PATCH 7/7] clocksource: fsl_ftm_timer: don't trace ftm_read_sched_clock Jisheng Zhang
@ 2015-10-26 17:50 ` Daniel Lezcano
2015-10-27 2:16 ` Jisheng Zhang
7 siblings, 1 reply; 11+ messages in thread
From: Daniel Lezcano @ 2015-10-26 17:50 UTC (permalink / raw)
To: linux-arm-kernel
On 10/20/2015 10:02 AM, Jisheng Zhang wrote:
> 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(-)
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
--
<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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 0/7] clocksource: add missing notrace attribute
2015-10-26 17:50 ` [PATCH 0/7] clocksource: add missing notrace attribute Daniel Lezcano
@ 2015-10-27 2:16 ` Jisheng Zhang
0 siblings, 0 replies; 11+ messages in thread
From: Jisheng Zhang @ 2015-10-27 2:16 UTC (permalink / raw)
To: linux-arm-kernel
Dear Daniel,
On Mon, 26 Oct 2015 18:50:10 +0100
Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
> On 10/20/2015 10:02 AM, Jisheng Zhang wrote:
> > 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(-)
>
> 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
^ permalink raw reply [flat|nested] 11+ messages in thread