All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix section mismatch: reference to .init.text: from .text warning
@ 2007-05-16 23:50 Kyungmin Park
  2007-05-17 17:38 ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Kyungmin Park @ 2007-05-16 23:50 UTC (permalink / raw)
  To: linux-omap-open-source

Fix section mismatch: reference to .init.text: from .text warning of omap_timer

I tested with OMAP2 only, but OMAP1 also has same warning.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
--

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,
 };
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 8f380a1..948d7ec 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -175,6 +175,6 @@ static void __init omap2_gp_timer_init(void)
 	omap2_gp_clocksource_init();
 }
 
-struct sys_timer omap_timer = {
+struct sys_timer omap_timer __initdata = {
 	.init	= omap2_gp_timer_init,
 };
diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
index 2474597..e7e1960 100644
--- a/arch/arm/plat-omap/timer32k.c
+++ b/arch/arm/plat-omap/timer32k.c
@@ -262,6 +262,6 @@ static void __init omap_timer_init(void)
 	omap_init_32k_timer();
 }
 
-struct sys_timer omap_timer = {
+struct sys_timer omap_timer __initdata = {
 	.init		= omap_timer_init,
 };

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

* Re: [PATCH] Fix section mismatch: reference to .init.text: from .text warning
  2007-05-16 23:50 [PATCH] Fix section mismatch: reference to .init.text: from .text warning Kyungmin Park
@ 2007-05-17 17:38 ` Tony Lindgren
  2007-05-25 18:25   ` Dirk Behme
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2007-05-17 17:38 UTC (permalink / raw)
  To: Kyungmin Park; +Cc: linux-omap-open-source

* Kyungmin Park <kmpark@infradead.org> [070516 16:51]:
> Fix section mismatch: reference to .init.text: from .text warning of omap_timer
> 
> I tested with OMAP2 only, but OMAP1 also has same warning.
> 
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> --
> 
> 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,
>  };
> diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
> index 8f380a1..948d7ec 100644
> --- a/arch/arm/mach-omap2/timer-gp.c
> +++ b/arch/arm/mach-omap2/timer-gp.c
> @@ -175,6 +175,6 @@ static void __init omap2_gp_timer_init(void)
>  	omap2_gp_clocksource_init();
>  }
>  
> -struct sys_timer omap_timer = {
> +struct sys_timer omap_timer __initdata = {
>  	.init	= omap2_gp_timer_init,
>  };
> diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
> index 2474597..e7e1960 100644
> --- a/arch/arm/plat-omap/timer32k.c
> +++ b/arch/arm/plat-omap/timer32k.c
> @@ -262,6 +262,6 @@ static void __init omap_timer_init(void)
>  	omap_init_32k_timer();
>  }
>  
> -struct sys_timer omap_timer = {
> +struct sys_timer omap_timer __initdata = {
>  	.init		= omap_timer_init,
>  };
> 

We cannot mark sys_timer as __initdata as it is used for all
timer stuff. There is a patch on linux-arm-kernel to ignore
sys_timer for the check. So these warnings may not be correct
always.

BTW, we should check that struct omap_board_config_kernel
entries really can be __initdata from modules point of view.

Regards,

Tony

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

* Re: [PATCH] Fix section mismatch: reference to .init.text: from .text warning
  2007-05-17 17:38 ` Tony Lindgren
@ 2007-05-25 18:25   ` Dirk Behme
  2007-05-25 18:42     ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Dirk Behme @ 2007-05-25 18:25 UTC (permalink / raw)
  To: Tony Lindgren, Kyungmin Park; +Cc: linux-omap-open-source

Tony Lindgren wrote:
> * Kyungmin Park <kmpark@infradead.org> [070516 16:51]:
>> Fix section mismatch: reference to .init.text: from .text warning of omap_timer
>>
>> I tested with OMAP2 only, but OMAP1 also has same warning.
>>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> --
>>
>> 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,
>>  };
>> diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
>> index 8f380a1..948d7ec 100644
>> --- a/arch/arm/mach-omap2/timer-gp.c
>> +++ b/arch/arm/mach-omap2/timer-gp.c
>> @@ -175,6 +175,6 @@ static void __init omap2_gp_timer_init(void)
>>  	omap2_gp_clocksource_init();
>>  }
>>  
>> -struct sys_timer omap_timer = {
>> +struct sys_timer omap_timer __initdata = {
>>  	.init	= omap2_gp_timer_init,
>>  };
>> diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
>> index 2474597..e7e1960 100644
>> --- a/arch/arm/plat-omap/timer32k.c
>> +++ b/arch/arm/plat-omap/timer32k.c
>> @@ -262,6 +262,6 @@ static void __init omap_timer_init(void)
>>  	omap_init_32k_timer();
>>  }
>>  
>> -struct sys_timer omap_timer = {
>> +struct sys_timer omap_timer __initdata = {
>>  	.init		= omap_timer_init,
>>  };
>>
> 
> We cannot mark sys_timer as __initdata as it is used for all
> timer stuff. There is a patch on linux-arm-kernel to ignore
> sys_timer for the check. So these warnings may not be correct
> always.
> 
> BTW, we should check that struct omap_board_config_kernel
> entries really can be __initdata from modules point of view.

I think you are talking here about this one

WARNING: arch/arm/plat-omap/built-in.o(.data+0xd68): Section mismatch:
reference to .init.text: (between 'omap_timer' and 'omap_32k_timer_irq')

?

This is the last section mismatch I get after update to recent git.
What's the best way to remove this now? Remove __init/__initdata?

Cheers

Dirk

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

* Re: [PATCH] Fix section mismatch: reference to .init.text: from .text warning
  2007-05-25 18:25   ` Dirk Behme
@ 2007-05-25 18:42     ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2007-05-25 18:42 UTC (permalink / raw)
  To: Dirk Behme; +Cc: linux-omap-open-source, Kyungmin Park

* Dirk Behme <dirk.behme@googlemail.com> [070525 11:25]:
> Tony Lindgren wrote:
>> * Kyungmin Park <kmpark@infradead.org> [070516 16:51]:
>>> Fix section mismatch: reference to .init.text: from .text warning of 
>>> omap_timer
>>>
>>> I tested with OMAP2 only, but OMAP1 also has same warning.
>>>
>>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>>> --
>>>
>>> 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,
>>>  };
>>> diff --git a/arch/arm/mach-omap2/timer-gp.c 
>>> b/arch/arm/mach-omap2/timer-gp.c
>>> index 8f380a1..948d7ec 100644
>>> --- a/arch/arm/mach-omap2/timer-gp.c
>>> +++ b/arch/arm/mach-omap2/timer-gp.c
>>> @@ -175,6 +175,6 @@ static void __init omap2_gp_timer_init(void)
>>>  	omap2_gp_clocksource_init();
>>>  }
>>>  -struct sys_timer omap_timer = {
>>> +struct sys_timer omap_timer __initdata = {
>>>  	.init	= omap2_gp_timer_init,
>>>  };
>>> diff --git a/arch/arm/plat-omap/timer32k.c 
>>> b/arch/arm/plat-omap/timer32k.c
>>> index 2474597..e7e1960 100644
>>> --- a/arch/arm/plat-omap/timer32k.c
>>> +++ b/arch/arm/plat-omap/timer32k.c
>>> @@ -262,6 +262,6 @@ static void __init omap_timer_init(void)
>>>  	omap_init_32k_timer();
>>>  }
>>>  -struct sys_timer omap_timer = {
>>> +struct sys_timer omap_timer __initdata = {
>>>  	.init		= omap_timer_init,
>>>  };
>>>
>> We cannot mark sys_timer as __initdata as it is used for all
>> timer stuff. There is a patch on linux-arm-kernel to ignore
>> sys_timer for the check. So these warnings may not be correct
>> always.
>> BTW, we should check that struct omap_board_config_kernel
>> entries really can be __initdata from modules point of view.
>
> I think you are talking here about this one
>
> WARNING: arch/arm/plat-omap/built-in.o(.data+0xd68): Section mismatch:
> reference to .init.text: (between 'omap_timer' and 'omap_32k_timer_irq')
>
> ?
>
> This is the last section mismatch I get after update to recent git.
> What's the best way to remove this now? Remove __init/__initdata?

I think the right fix would be to ignore struct sys_timer initdata
errors. Removing the __init from timer_init() really just hides the
problem. Here's a link to a related thread:

http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg155753.html

Tony

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

end of thread, other threads:[~2007-05-25 18:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-16 23:50 [PATCH] Fix section mismatch: reference to .init.text: from .text warning Kyungmin Park
2007-05-17 17:38 ` Tony Lindgren
2007-05-25 18:25   ` Dirk Behme
2007-05-25 18:42     ` Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.