mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [2.6.35-rc1, patch] fix cpu_chain section mismatch...
@ 2010-06-01 11:15 Daniel J Blueman
  2010-06-01 15:49 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel J Blueman @ 2010-06-01 11:15 UTC (permalink / raw)
  To: Linus Torvalds, Linux Kernel

In 2.6.35-rc1, __cpu_notify access cpu_chain, which shouldn't be
marked __cpuinitdata (via section mismatch warning).

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 8b92539..97d1b42 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -34,7 +34,7 @@ void cpu_maps_update_done(void)
 	mutex_unlock(&cpu_add_remove_lock);
 }

-static __cpuinitdata RAW_NOTIFIER_HEAD(cpu_chain);
+static RAW_NOTIFIER_HEAD(cpu_chain);

 /* If set, cpu_up and cpu_down will return -EBUSY and do nothing.
  * Should always be manipulated under cpu_add_remove_lock
-- 
Daniel J Blueman

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

* Re: [2.6.35-rc1, patch] fix cpu_chain section mismatch...
  2010-06-01 11:15 [2.6.35-rc1, patch] fix cpu_chain section mismatch Daniel J Blueman
@ 2010-06-01 15:49 ` Linus Torvalds
  2010-06-01 16:02   ` Linus Torvalds
  2010-06-01 20:49   ` Daniel J Blueman
  0 siblings, 2 replies; 4+ messages in thread
From: Linus Torvalds @ 2010-06-01 15:49 UTC (permalink / raw)
  To: Daniel J Blueman, Akinobu Mita, Andrew Morton; +Cc: Linux Kernel



On Tue, 1 Jun 2010, Daniel J Blueman wrote:
>
> In 2.6.35-rc1, __cpu_notify access cpu_chain, which shouldn't be
> marked __cpuinitdata (via section mismatch warning).

Hmm. Does this section mismatch go away if you instead mark cpu_notify(), 
__cpu_notify() and cpu_notify_nofail as "inline"? Or alternatively, maybe 
they should all be marked as __ref?

I think the section mismatch started happening when those wrapper 
functions were created, but all the callers seem to be __ref or __cpuinit. 

Or maybe we should just make that variable be non-cpuinitdata like your 
patch suggests.

Does anybody have strong preferences (patch appended for reference)?

		Linus
---
> Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
> 
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index 8b92539..97d1b42 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -34,7 +34,7 @@ void cpu_maps_update_done(void)
>  	mutex_unlock(&cpu_add_remove_lock);
>  }
> 
> -static __cpuinitdata RAW_NOTIFIER_HEAD(cpu_chain);
> +static RAW_NOTIFIER_HEAD(cpu_chain);
> 
>  /* If set, cpu_up and cpu_down will return -EBUSY and do nothing.
>   * Should always be manipulated under cpu_add_remove_lock
> -- 
> Daniel J Blueman
> 

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

* Re: [2.6.35-rc1, patch] fix cpu_chain section mismatch...
  2010-06-01 15:49 ` Linus Torvalds
@ 2010-06-01 16:02   ` Linus Torvalds
  2010-06-01 20:49   ` Daniel J Blueman
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2010-06-01 16:02 UTC (permalink / raw)
  To: Daniel J Blueman, Akinobu Mita, Andrew Morton; +Cc: Linux Kernel



On Tue, 1 Jun 2010, Linus Torvalds wrote:
> 
> Does anybody have strong preferences (patch appended for reference)?

Never mind. I'll just apply the patch. If somebody _does_ have strong 
preferences, holler with a new patch that updates it to inline or 
whatever..

		Linus

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

* Re: [2.6.35-rc1, patch] fix cpu_chain section mismatch...
  2010-06-01 15:49 ` Linus Torvalds
  2010-06-01 16:02   ` Linus Torvalds
@ 2010-06-01 20:49   ` Daniel J Blueman
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel J Blueman @ 2010-06-01 20:49 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Akinobu Mita, Andrew Morton, Linux Kernel

Hi Linus,

On Tue, Jun 1, 2010 at 4:49 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
>
> On Tue, 1 Jun 2010, Daniel J Blueman wrote:
>>
>> In 2.6.35-rc1, __cpu_notify access cpu_chain, which shouldn't be
>> marked __cpuinitdata (via section mismatch warning).
>
> Hmm. Does this section mismatch go away if you instead mark cpu_notify(),
> __cpu_notify() and cpu_notify_nofail as "inline"? Or alternatively, maybe
> they should all be marked as __ref?

Indeed the inline and __ref approaches quench the warning too.

> I think the section mismatch started happening when those wrapper
> functions were created, but all the callers seem to be __ref or __cpuinit.
>
> Or maybe we should just make that variable be non-cpuinitdata like your
> patch suggests.

At least this is the minimal change until a good reason comes along.

Thanks,
  Daniel

> Does anybody have strong preferences (patch appended for reference)?
>
>                Linus
> ---
>> Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
>>
>> diff --git a/kernel/cpu.c b/kernel/cpu.c
>> index 8b92539..97d1b42 100644
>> --- a/kernel/cpu.c
>> +++ b/kernel/cpu.c
>> @@ -34,7 +34,7 @@ void cpu_maps_update_done(void)
>>       mutex_unlock(&cpu_add_remove_lock);
>>  }
>>
>> -static __cpuinitdata RAW_NOTIFIER_HEAD(cpu_chain);
>> +static RAW_NOTIFIER_HEAD(cpu_chain);
>>
>>  /* If set, cpu_up and cpu_down will return -EBUSY and do nothing.
>>   * Should always be manipulated under cpu_add_remove_lock
-- 
Daniel J Blueman

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

end of thread, other threads:[~2010-06-01 20:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-01 11:15 [2.6.35-rc1, patch] fix cpu_chain section mismatch Daniel J Blueman
2010-06-01 15:49 ` Linus Torvalds
2010-06-01 16:02   ` Linus Torvalds
2010-06-01 20:49   ` Daniel J Blueman

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

all inboxes | Powered by JetHome®