public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] clockevents: asm9260: Fix compilation error with sparc/sparc64 allyesconfig
       [not found] <54EDA19F.7050903@linaro.org>
@ 2015-02-25 10:31 ` Daniel Lezcano
  2015-02-25 10:31   ` [PATCH 2/3] clocksource: mtk: Fix race conditions in probe code Daniel Lezcano
  2015-02-25 10:31   ` [PATCH 3/3] clocksource: pxa: Fix section mismatch Daniel Lezcano
  0 siblings, 2 replies; 9+ messages in thread
From: Daniel Lezcano @ 2015-02-25 10:31 UTC (permalink / raw)
  To: mingo, tglx; +Cc: matthias.bgg, robert.jarzmik, linux, linux, linux-kernel

The Kconfig options for the asm9260 timer is wrong as it can be selected by
another platform with allyes config and thus leading to a compilation failure
as some non arch related code is pulled by the compilation.

Fix this by having the platform Kconfig to select the timer as it is done for
the others drivers.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Oleksij Rempel <linux@rempel-privat.de>

Conflicts:
	drivers/clocksource/Kconfig
---
 arch/arm/mach-asm9260/Kconfig |  2 ++
 drivers/clocksource/Kconfig   | 16 +++++-----------
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-asm9260/Kconfig b/arch/arm/mach-asm9260/Kconfig
index 8423be7..5224120 100644
--- a/arch/arm/mach-asm9260/Kconfig
+++ b/arch/arm/mach-asm9260/Kconfig
@@ -2,5 +2,7 @@ config MACH_ASM9260
 	bool "Alphascale ASM9260"
 	depends on ARCH_MULTI_V5
 	select CPU_ARM926T
+	select ASM9260_TIMER
+	select GENERIC_CLOCKEVENTS
 	help
 	  Support for Alphascale ASM9260 based platform.
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 1c2506f..68161f7 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -63,6 +63,11 @@ config VT8500_TIMER
 config CADENCE_TTC_TIMER
 	bool
 
+config ASM9260_TIMER
+	bool
+	select CLKSRC_MMIO
+	select CLKSRC_OF
+
 config CLKSRC_NOMADIK_MTU
 	bool
 	depends on (ARCH_NOMADIK || ARCH_U8500)
@@ -245,15 +250,4 @@ config CLKSRC_PXA
 	help
 	  This enables OST0 support available on PXA and SA-11x0
 	  platforms.
-
-config ASM9260_TIMER
-	bool "Alphascale ASM9260 timer driver"
-	depends on GENERIC_CLOCKEVENTS
-	select CLKSRC_MMIO
-	select CLKSRC_OF
-	default y if MACH_ASM9260
-	help
-	  This enables build of a clocksource and clockevent driver for
-	  the 32-bit System Timer hardware available on a Alphascale ASM9260.
-
 endmenu
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] clocksource: mtk: Fix race conditions in probe code
  2015-02-25 10:31 ` [PATCH 1/3] clockevents: asm9260: Fix compilation error with sparc/sparc64 allyesconfig Daniel Lezcano
@ 2015-02-25 10:31   ` Daniel Lezcano
  2015-02-25 10:31   ` [PATCH 3/3] clocksource: pxa: Fix section mismatch Daniel Lezcano
  1 sibling, 0 replies; 9+ messages in thread
From: Daniel Lezcano @ 2015-02-25 10:31 UTC (permalink / raw)
  To: mingo, tglx; +Cc: matthias.bgg, robert.jarzmik, linux, linux, linux-kernel

From: Matthias Brugger <matthias.bgg@gmail.com>

We have two race conditions in the probe code which could lead to a null
pointer dereference in the interrupt handler.

The interrupt handler accesses the clockevent device, which may not yet be
registered.

First race condition happens when the interrupt handler gets registered before
the interrupts get disabled. The second race condition happens when the
interrupts get enabled, but the clockevent device is not yet registered.

Fix that by disabling the interrupts before we register the interrupt and enable
the interrupts after the clockevent device got registered.

Reported-by: Gongbae Park <yongbae2@gmail.com>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/mtk_timer.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/clocksource/mtk_timer.c b/drivers/clocksource/mtk_timer.c
index 32a3d25..68ab423 100644
--- a/drivers/clocksource/mtk_timer.c
+++ b/drivers/clocksource/mtk_timer.c
@@ -224,6 +224,8 @@ static void __init mtk_timer_init(struct device_node *node)
 	}
 	rate = clk_get_rate(clk);
 
+	mtk_timer_global_reset(evt);
+
 	if (request_irq(evt->dev.irq, mtk_timer_interrupt,
 			IRQF_TIMER | IRQF_IRQPOLL, "mtk_timer", evt)) {
 		pr_warn("failed to setup irq %d\n", evt->dev.irq);
@@ -232,8 +234,6 @@ static void __init mtk_timer_init(struct device_node *node)
 
 	evt->ticks_per_jiffy = DIV_ROUND_UP(rate, HZ);
 
-	mtk_timer_global_reset(evt);
-
 	/* Configure clock source */
 	mtk_timer_setup(evt, GPT_CLK_SRC, TIMER_CTRL_OP_FREERUN);
 	clocksource_mmio_init(evt->gpt_base + TIMER_CNT_REG(GPT_CLK_SRC),
@@ -241,10 +241,11 @@ static void __init mtk_timer_init(struct device_node *node)
 
 	/* Configure clock event */
 	mtk_timer_setup(evt, GPT_CLK_EVT, TIMER_CTRL_OP_REPEAT);
-	mtk_timer_enable_irq(evt, GPT_CLK_EVT);
-
 	clockevents_config_and_register(&evt->dev, rate, 0x3,
 					0xffffffff);
+
+	mtk_timer_enable_irq(evt, GPT_CLK_EVT);
+
 	return;
 
 err_clk_disable:
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] clocksource: pxa: Fix section mismatch
  2015-02-25 10:31 ` [PATCH 1/3] clockevents: asm9260: Fix compilation error with sparc/sparc64 allyesconfig Daniel Lezcano
  2015-02-25 10:31   ` [PATCH 2/3] clocksource: mtk: Fix race conditions in probe code Daniel Lezcano
@ 2015-02-25 10:31   ` Daniel Lezcano
  2015-02-25 10:35     ` Ingo Molnar
  1 sibling, 1 reply; 9+ messages in thread
From: Daniel Lezcano @ 2015-02-25 10:31 UTC (permalink / raw)
  To: mingo, tglx; +Cc: matthias.bgg, robert.jarzmik, linux, linux, linux-kernel

From: Robert Jarzmik <robert.jarzmik@free.fr>

As pxa_timer_common_init() is only called in init context, mark it as
such, and quiesce the compiler warnings :
WARNING: vmlinux.o(.text.unlikely+0x45d4): Section mismatch in reference
from the function pxa_timer_common_init() to the function
.init.text:sched_clock_register()

WARNING: vmlinux.o(.text.unlikely+0x4610): Section mismatch in reference
from the function pxa_timer_common_init() to the function
.init.text:clocksource_mmio_init()

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/pxa_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/pxa_timer.c b/drivers/clocksource/pxa_timer.c
index 941f3f3..d9438af 100644
--- a/drivers/clocksource/pxa_timer.c
+++ b/drivers/clocksource/pxa_timer.c
@@ -163,7 +163,7 @@ static struct irqaction pxa_ost0_irq = {
 	.dev_id		= &ckevt_pxa_osmr0,
 };
 
-static void pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
+static void __init pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
 {
 	timer_writel(0, OIER);
 	timer_writel(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] clocksource: pxa: Fix section mismatch
  2015-02-25 10:31   ` [PATCH 3/3] clocksource: pxa: Fix section mismatch Daniel Lezcano
@ 2015-02-25 10:35     ` Ingo Molnar
  2015-02-25 10:45       ` Daniel Lezcano
  0 siblings, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2015-02-25 10:35 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: tglx, matthias.bgg, robert.jarzmik, linux, linux, linux-kernel


* Daniel Lezcano <daniel.lezcano@linaro.org> wrote:

> From: Robert Jarzmik <robert.jarzmik@free.fr>
> 
> As pxa_timer_common_init() is only called in init context, mark it as
> such, and quiesce the compiler warnings :
> WARNING: vmlinux.o(.text.unlikely+0x45d4): Section mismatch in reference
> from the function pxa_timer_common_init() to the function
> .init.text:sched_clock_register()
> 
> WARNING: vmlinux.o(.text.unlikely+0x4610): Section mismatch in reference
> from the function pxa_timer_common_init() to the function
> .init.text:clocksource_mmio_init()
> 
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  drivers/clocksource/pxa_timer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/pxa_timer.c b/drivers/clocksource/pxa_timer.c
> index 941f3f3..d9438af 100644
> --- a/drivers/clocksource/pxa_timer.c
> +++ b/drivers/clocksource/pxa_timer.c
> @@ -163,7 +163,7 @@ static struct irqaction pxa_ost0_irq = {
>  	.dev_id		= &ckevt_pxa_osmr0,
>  };
>  
> -static void pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
> +static void __init pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
>  {
>  	timer_writel(0, OIER);
>  	timer_writel(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);

So this is then used indirectly by:

CLOCKSOURCE_OF_DECLARE(pxa_timer, "marvell,pxa-timer", pxa_timer_dt_init);

which should probably be marked __initdata?

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] clocksource: pxa: Fix section mismatch
  2015-02-25 10:35     ` Ingo Molnar
@ 2015-02-25 10:45       ` Daniel Lezcano
  2015-02-25 10:48         ` Ingo Molnar
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Lezcano @ 2015-02-25 10:45 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: tglx, matthias.bgg, robert.jarzmik, linux, linux, linux-kernel

On 02/25/2015 11:35 AM, Ingo Molnar wrote:
>
> * Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
>
>> From: Robert Jarzmik <robert.jarzmik@free.fr>
>>
>> As pxa_timer_common_init() is only called in init context, mark it as
>> such, and quiesce the compiler warnings :
>> WARNING: vmlinux.o(.text.unlikely+0x45d4): Section mismatch in reference
>> from the function pxa_timer_common_init() to the function
>> .init.text:sched_clock_register()
>>
>> WARNING: vmlinux.o(.text.unlikely+0x4610): Section mismatch in reference
>> from the function pxa_timer_common_init() to the function
>> .init.text:clocksource_mmio_init()
>>
>> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> ---
>>   drivers/clocksource/pxa_timer.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/clocksource/pxa_timer.c b/drivers/clocksource/pxa_timer.c
>> index 941f3f3..d9438af 100644
>> --- a/drivers/clocksource/pxa_timer.c
>> +++ b/drivers/clocksource/pxa_timer.c
>> @@ -163,7 +163,7 @@ static struct irqaction pxa_ost0_irq = {
>>   	.dev_id		= &ckevt_pxa_osmr0,
>>   };
>>
>> -static void pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
>> +static void __init pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
>>   {
>>   	timer_writel(0, OIER);
>>   	timer_writel(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
>
> So this is then used indirectly by:
>
> CLOCKSOURCE_OF_DECLARE(pxa_timer, "marvell,pxa-timer", pxa_timer_dt_init);
>
> which should probably be marked __initdata?


Sorry, I miss the point. What should be marked __initdata ?


-- 
  <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] 9+ messages in thread

* Re: [PATCH 3/3] clocksource: pxa: Fix section mismatch
  2015-02-25 10:45       ` Daniel Lezcano
@ 2015-02-25 10:48         ` Ingo Molnar
  2015-02-25 10:56           ` Daniel Lezcano
  0 siblings, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2015-02-25 10:48 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: tglx, matthias.bgg, robert.jarzmik, linux, linux, linux-kernel


* Daniel Lezcano <daniel.lezcano@linaro.org> wrote:

> On 02/25/2015 11:35 AM, Ingo Molnar wrote:
> >
> >* Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
> >
> >>From: Robert Jarzmik <robert.jarzmik@free.fr>
> >>
> >>As pxa_timer_common_init() is only called in init context, mark it as
> >>such, and quiesce the compiler warnings :
> >>WARNING: vmlinux.o(.text.unlikely+0x45d4): Section mismatch in reference
> >>from the function pxa_timer_common_init() to the function
> >>.init.text:sched_clock_register()
> >>
> >>WARNING: vmlinux.o(.text.unlikely+0x4610): Section mismatch in reference
> >>from the function pxa_timer_common_init() to the function
> >>.init.text:clocksource_mmio_init()
> >>
> >>Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> >>Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> >>---
> >>  drivers/clocksource/pxa_timer.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >>diff --git a/drivers/clocksource/pxa_timer.c b/drivers/clocksource/pxa_timer.c
> >>index 941f3f3..d9438af 100644
> >>--- a/drivers/clocksource/pxa_timer.c
> >>+++ b/drivers/clocksource/pxa_timer.c
> >>@@ -163,7 +163,7 @@ static struct irqaction pxa_ost0_irq = {
> >>  	.dev_id		= &ckevt_pxa_osmr0,
> >>  };
> >>
> >>-static void pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
> >>+static void __init pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
> >>  {
> >>  	timer_writel(0, OIER);
> >>  	timer_writel(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
> >
> >So this is then used indirectly by:
> >
> >CLOCKSOURCE_OF_DECLARE(pxa_timer, "marvell,pxa-timer", pxa_timer_dt_init);
> >
> >which should probably be marked __initdata?
> 
> 
> Sorry, I miss the point. What should be marked __initdata ?

so CLOCKSOURCE_OF_DECLARE() defines 'struct of_device_id' 
entries, right? Those, if they are only used during 
initialization, should be marked __initdata.

Or are they mixed use?

Thnks,

	Ingo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] clocksource: pxa: Fix section mismatch
  2015-02-25 10:48         ` Ingo Molnar
@ 2015-02-25 10:56           ` Daniel Lezcano
  2015-02-25 10:59             ` Ingo Molnar
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Lezcano @ 2015-02-25 10:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: tglx, matthias.bgg, robert.jarzmik, linux, linux, linux-kernel

On 02/25/2015 11:48 AM, Ingo Molnar wrote:
>
> * Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
>
>> On 02/25/2015 11:35 AM, Ingo Molnar wrote:
>>>
>>> * Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
>>>
>>>> From: Robert Jarzmik <robert.jarzmik@free.fr>
>>>>
>>>> As pxa_timer_common_init() is only called in init context, mark it as
>>>> such, and quiesce the compiler warnings :
>>>> WARNING: vmlinux.o(.text.unlikely+0x45d4): Section mismatch in reference
>>> >from the function pxa_timer_common_init() to the function
>>>> .init.text:sched_clock_register()
>>>>
>>>> WARNING: vmlinux.o(.text.unlikely+0x4610): Section mismatch in reference
>>> >from the function pxa_timer_common_init() to the function
>>>> .init.text:clocksource_mmio_init()
>>>>
>>>> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
>>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>>> ---
>>>>   drivers/clocksource/pxa_timer.c | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/clocksource/pxa_timer.c b/drivers/clocksource/pxa_timer.c
>>>> index 941f3f3..d9438af 100644
>>>> --- a/drivers/clocksource/pxa_timer.c
>>>> +++ b/drivers/clocksource/pxa_timer.c
>>>> @@ -163,7 +163,7 @@ static struct irqaction pxa_ost0_irq = {
>>>>   	.dev_id		= &ckevt_pxa_osmr0,
>>>>   };
>>>>
>>>> -static void pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
>>>> +static void __init pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
>>>>   {
>>>>   	timer_writel(0, OIER);
>>>>   	timer_writel(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
>>>
>>> So this is then used indirectly by:
>>>
>>> CLOCKSOURCE_OF_DECLARE(pxa_timer, "marvell,pxa-timer", pxa_timer_dt_init);
>>>
>>> which should probably be marked __initdata?
>>
>>
>> Sorry, I miss the point. What should be marked __initdata ?
>
> so CLOCKSOURCE_OF_DECLARE() defines 'struct of_device_id'
> entries, right? Those, if they are only used during
> initialization, should be marked __initdata.
>
> Or are they mixed use?

Ah, ok. Thanks for the clarification. I thought there was an issue with 
the patch and I was hanging the PR.

Let me look in details.


-- 
  <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] 9+ messages in thread

* Re: [PATCH 3/3] clocksource: pxa: Fix section mismatch
  2015-02-25 10:56           ` Daniel Lezcano
@ 2015-02-25 10:59             ` Ingo Molnar
  0 siblings, 0 replies; 9+ messages in thread
From: Ingo Molnar @ 2015-02-25 10:59 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: tglx, matthias.bgg, robert.jarzmik, linux, linux, linux-kernel


* Daniel Lezcano <daniel.lezcano@linaro.org> wrote:

> On 02/25/2015 11:48 AM, Ingo Molnar wrote:
> >
> >* Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
> >
> >>On 02/25/2015 11:35 AM, Ingo Molnar wrote:
> >>>
> >>>* Daniel Lezcano <daniel.lezcano@linaro.org> wrote:
> >>>
> >>>>From: Robert Jarzmik <robert.jarzmik@free.fr>
> >>>>
> >>>>As pxa_timer_common_init() is only called in init context, mark it as
> >>>>such, and quiesce the compiler warnings :
> >>>>WARNING: vmlinux.o(.text.unlikely+0x45d4): Section mismatch in reference
> >>>>from the function pxa_timer_common_init() to the function
> >>>>.init.text:sched_clock_register()
> >>>>
> >>>>WARNING: vmlinux.o(.text.unlikely+0x4610): Section mismatch in reference
> >>>>from the function pxa_timer_common_init() to the function
> >>>>.init.text:clocksource_mmio_init()
> >>>>
> >>>>Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> >>>>Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> >>>>---
> >>>>  drivers/clocksource/pxa_timer.c | 2 +-
> >>>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>>diff --git a/drivers/clocksource/pxa_timer.c b/drivers/clocksource/pxa_timer.c
> >>>>index 941f3f3..d9438af 100644
> >>>>--- a/drivers/clocksource/pxa_timer.c
> >>>>+++ b/drivers/clocksource/pxa_timer.c
> >>>>@@ -163,7 +163,7 @@ static struct irqaction pxa_ost0_irq = {
> >>>>  	.dev_id		= &ckevt_pxa_osmr0,
> >>>>  };
> >>>>
> >>>>-static void pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
> >>>>+static void __init pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
> >>>>  {
> >>>>  	timer_writel(0, OIER);
> >>>>  	timer_writel(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
> >>>
> >>>So this is then used indirectly by:
> >>>
> >>>CLOCKSOURCE_OF_DECLARE(pxa_timer, "marvell,pxa-timer", pxa_timer_dt_init);
> >>>
> >>>which should probably be marked __initdata?
> >>
> >>
> >>Sorry, I miss the point. What should be marked __initdata ?
> >
> >so CLOCKSOURCE_OF_DECLARE() defines 'struct of_device_id'
> >entries, right? Those, if they are only used during
> >initialization, should be marked __initdata.
> >
> >Or are they mixed use?
> 
> Ah, ok. Thanks for the clarification. I thought there was 
> an issue with the patch and I was hanging the PR.

No, the patch is fine I think, I was just double checking 
it and noticed that nobody really marks 
CLOCKSOURCE_OF_DECLARE() as __initdata in practice.

> Let me look in details.

might not be worth doing, and it will quickly bitrot 
anyway, as new drivers might not pick it up.

Plus, should that structure ever get modularized, it will 
have to be removed again.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/3] clocksource: pxa: Fix section mismatch
  2015-02-25 11:19 ` [PATCH 1/3] clockevents: asm9260: Fix compilation error with sparc/sparc64 allyesconfig Daniel Lezcano
@ 2015-02-25 11:19   ` Daniel Lezcano
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Lezcano @ 2015-02-25 11:19 UTC (permalink / raw)
  To: mingo, tglx; +Cc: matthias.bgg, robert.jarzmik, linux, linux, linux-kernel

From: Robert Jarzmik <robert.jarzmik@free.fr>

As pxa_timer_common_init() is only called in init context, mark it as
such, and quiesce the compiler warnings :
WARNING: vmlinux.o(.text.unlikely+0x45d4): Section mismatch in reference
from the function pxa_timer_common_init() to the function
.init.text:sched_clock_register()

WARNING: vmlinux.o(.text.unlikely+0x4610): Section mismatch in reference
from the function pxa_timer_common_init() to the function
.init.text:clocksource_mmio_init()

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/clocksource/pxa_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/pxa_timer.c b/drivers/clocksource/pxa_timer.c
index 941f3f3..d9438af 100644
--- a/drivers/clocksource/pxa_timer.c
+++ b/drivers/clocksource/pxa_timer.c
@@ -163,7 +163,7 @@ static struct irqaction pxa_ost0_irq = {
 	.dev_id		= &ckevt_pxa_osmr0,
 };
 
-static void pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
+static void __init pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
 {
 	timer_writel(0, OIER);
 	timer_writel(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-02-25 11:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <54EDA19F.7050903@linaro.org>
2015-02-25 10:31 ` [PATCH 1/3] clockevents: asm9260: Fix compilation error with sparc/sparc64 allyesconfig Daniel Lezcano
2015-02-25 10:31   ` [PATCH 2/3] clocksource: mtk: Fix race conditions in probe code Daniel Lezcano
2015-02-25 10:31   ` [PATCH 3/3] clocksource: pxa: Fix section mismatch Daniel Lezcano
2015-02-25 10:35     ` Ingo Molnar
2015-02-25 10:45       ` Daniel Lezcano
2015-02-25 10:48         ` Ingo Molnar
2015-02-25 10:56           ` Daniel Lezcano
2015-02-25 10:59             ` Ingo Molnar
2015-02-25 11:18 [GIT PULL][resend] clockevents fixes for 4.0-rc1 Daniel Lezcano
2015-02-25 11:19 ` [PATCH 1/3] clockevents: asm9260: Fix compilation error with sparc/sparc64 allyesconfig Daniel Lezcano
2015-02-25 11:19   ` [PATCH 3/3] clocksource: pxa: Fix section mismatch Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox