* [PATCH 12/12] Move omap_timer to the initdata section.
@ 2007-06-09 17:35 Vivien Chappelier
2007-06-12 13:31 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Vivien Chappelier @ 2007-06-09 17:35 UTC (permalink / raw)
To: Linux OMAP
This patch fixes a warning due to omap_timer not belonging to the __initdata
section as it should.
Signed-off-by: Vivien Chappelier <vivien.chappelier@free.fr>
---
arch/arm/mach-omap1/time.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 3705d20..0ba739c 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -289,6 +289,6 @@ static void __init omap_timer_init(void)
omap_init_clocksource(rate);
}
-struct sys_timer omap_timer = {
+struct sys_timer omap_timer __initdata = {
.init = omap_timer_init,
};
--
1.5.1.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 12/12] Move omap_timer to the initdata section.
@ 2007-06-09 18:47 Vivien Chappelier
2007-06-09 19:20 ` andrzej zaborowski
0 siblings, 1 reply; 5+ messages in thread
From: Vivien Chappelier @ 2007-06-09 18:47 UTC (permalink / raw)
To: linux-omap-open-source
This patch fixes a warning due to omap_timer not belonging to the __initdata
section as it should.
Signed-off-by: Vivien Chappelier <vivien.chappelier@free.fr>
---
arch/arm/mach-omap1/time.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 3705d20..0ba739c 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -289,6 +289,6 @@ static void __init omap_timer_init(void)
omap_init_clocksource(rate);
}
-struct sys_timer omap_timer = {
+struct sys_timer omap_timer __initdata = {
.init = omap_timer_init,
};
--
1.5.1.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 12/12] Move omap_timer to the initdata section.
2007-06-09 18:47 Vivien Chappelier
@ 2007-06-09 19:20 ` andrzej zaborowski
2007-06-09 21:13 ` Vivien Chappelier
0 siblings, 1 reply; 5+ messages in thread
From: andrzej zaborowski @ 2007-06-09 19:20 UTC (permalink / raw)
To: Vivien Chappelier; +Cc: linux-omap-open-source
Hi,
On 09/06/07, Vivien Chappelier <vivien.chappelier@free.fr> wrote:
> This patch fixes a warning due to omap_timer not belonging to the __initdata
> section as it should.
>
> Signed-off-by: Vivien Chappelier <vivien.chappelier@free.fr>
>
> ---
> arch/arm/mach-omap1/time.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
> index 3705d20..0ba739c 100644
> --- a/arch/arm/mach-omap1/time.c
> +++ b/arch/arm/mach-omap1/time.c
> @@ -289,6 +289,6 @@ static void __init omap_timer_init(void)
> omap_init_clocksource(rate);
> }
>
> -struct sys_timer omap_timer = {
> +struct sys_timer omap_timer __initdata = {
> .init = omap_timer_init,
> };
> --
> 1.5.1.3
This was already proposed a couple of times (for example here:
http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010075.html)
but it is wrong because omap_timer is used a lot after initdata is
discarded. One possible solution is leaving .init uninitialised, and
assigning it somewhere during the arch initialisation, with something
like:
omap_timer.init = omap_timer_init;
But maybe it's better to just ignore the reference to another section,
as Tony suggested.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 12/12] Move omap_timer to the initdata section.
2007-06-09 19:20 ` andrzej zaborowski
@ 2007-06-09 21:13 ` Vivien Chappelier
0 siblings, 0 replies; 5+ messages in thread
From: Vivien Chappelier @ 2007-06-09 21:13 UTC (permalink / raw)
To: andrzej zaborowski; +Cc: Linux OMAP
Hi,
andrzej zaborowski wrote:
> Hi,
>
> On 09/06/07, Vivien Chappelier <vivien.chappelier@free.fr> wrote:
>> This patch fixes a warning due to omap_timer not belonging to the
>> __initdata
>> section as it should.
>>
>> Signed-off-by: Vivien Chappelier <vivien.chappelier@free.fr>
>>
>> ---
>> arch/arm/mach-omap1/time.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
>> index 3705d20..0ba739c 100644
>> --- a/arch/arm/mach-omap1/time.c
>> +++ b/arch/arm/mach-omap1/time.c
>> @@ -289,6 +289,6 @@ static void __init omap_timer_init(void)
>> omap_init_clocksource(rate);
>> }
>>
>> -struct sys_timer omap_timer = {
>> +struct sys_timer omap_timer __initdata = {
>> .init = omap_timer_init,
>> };
>> --
>> 1.5.1.3
>
> This was already proposed a couple of times (for example here:
> http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010075.html)
>
> but it is wrong because omap_timer is used a lot after initdata is
> discarded.
This is indeed wrong, seems I got (un)lucky at runtime.. Since there is
no current way of saying omap_timer.init won't be used after the .init.*
sections are discared, I agree that we should remove the warning for
that specific case. But we still lose 4 bytes for a pointer that could
be discarded :-)
> One possible solution is leaving .init uninitialised, and
> assigning it somewhere during the arch initialisation, with something
> like:
>
> omap_timer.init = omap_timer_init;
Well, I don't quite like the fact that those warnings are removed based
on variable names only (as explained here
http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg155753.html),
so this might be an alternative to consider.
Thanks for pointing out the issue,
Vivien.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 12/12] Move omap_timer to the initdata section.
2007-06-09 17:35 [PATCH 12/12] Move omap_timer to the initdata section Vivien Chappelier
@ 2007-06-12 13:31 ` Tony Lindgren
0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2007-06-12 13:31 UTC (permalink / raw)
To: Vivien Chappelier; +Cc: Linux OMAP
* Vivien Chappelier <vivien.chappelier@free.fr> [070609 10:41]:
> This patch fixes a warning due to omap_timer not belonging to the
> __initdata
> section as it should.
>
> Signed-off-by: Vivien Chappelier <vivien.chappelier@free.fr>
>
> ---
> arch/arm/mach-omap1/time.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
> index 3705d20..0ba739c 100644
> --- a/arch/arm/mach-omap1/time.c
> +++ b/arch/arm/mach-omap1/time.c
> @@ -289,6 +289,6 @@ static void __init omap_timer_init(void)
> omap_init_clocksource(rate);
> }
> -struct sys_timer omap_timer = {
> +struct sys_timer omap_timer __initdata = {
> .init = omap_timer_init,
> };
We cannot drop sys_timer, it's needed. There have been posts about
this on the list before :)
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-06-12 13:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-09 17:35 [PATCH 12/12] Move omap_timer to the initdata section Vivien Chappelier
2007-06-12 13:31 ` Tony Lindgren
-- strict thread matches above, loose matches on Subject: below --
2007-06-09 18:47 Vivien Chappelier
2007-06-09 19:20 ` andrzej zaborowski
2007-06-09 21:13 ` Vivien Chappelier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox