rcu: fix section mismatch
PATCH 1/1 rcu: fix section mismatch
From: Randy Dunlap <[email protected]>
rcu_online_cpu() should be __cpuinit instead of __devinit.
WARNING: vmlinux.o(.text+0x4b6d5): Section mismatch: reference to .init.text: (between 'rcu_cpu_notify' and 'wakeme_after_rcu')
--- kernel/rcupdate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/rcupdate.c +1 -1
@@ -549,7 +549,7 @@ static void rcu_init_percpu_data(int cpu rdp->blimit = blimit; } -static void __devinit rcu_online_cpu (int cpu) +static void __cpuinit rcu_online_cpu (int cpu) {struct rcu_data *rdp = &per_cpu (rcu_data, cpu);struct rcu_data *bh_rdp = &per_cpu (rcu_bh_data, cpu);
Quoted 7 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
rcu_online_cpu()should be__cpuinitinstead of__devinit.WARNING:
vmlinux.o(.text+0x4b6d5): Section mismatch: reference to .init.text: (between 'rcu_cpu_notify' and 'wakeme_after_rcu')Signed-off-by Randy Dunlap <[email protected]>
So if we have:CONFIG_HOTPLUG=nCONFIG_HOTPLUG_CPU=y
then this is a oops candidate.
Andrew - this looks like a 2.6.24 candidate.
Sam
Quoted 20 lines
--- kernel/rcupdate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/rcupdate.c +1
-2@@ -549,7 +549,7 @@ static void rcu_init_percpu_data(int cpu rdp->blimit = blimit; } -static void __devinit rcu_online_cpu (int cpu) +static void __cpuinit rcu_online_cpu (int cpu) {struct rcu_data *rdp = &per_cpu (rcu_data, cpu);struct rcu_data *bh_rdp = &per_cpu (rcu_bh_data, cpu); --To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 8 lines · On Sunday 20 January 2008 08:25:49 Sam Ravnborg wrote:
Quoted 1 line · Randy Dunlap
rcu_online_cpu()should be__cpuinitinstead of__devinit.So if we have:
CONFIG_HOTPLUG=nCONFIG_HOTPLUG_CPU=ythen this is a oops candidate.
At first glance, this can't happen because all CONFIG_HOTPLUG_CPU depends on CONFIG_HOTPLUG or selects it, for all archs.
But CONFIG_PM_SLEEP_SMP selects CONFIG_HOTPLUG_CPU, without requiringCONFIG_HOTPLUG: turning on SUSPEND or HIBERNATION does this.
Perhaps it's time to revisit reverse-depends for select?
Cheers,
Rusty.
Quoted 8 lines · Rusty Russell
Quoted 7 lines · On Sunday 20 January 2008 08:25:49 Sam Ravnborg wrote:
Quoted 1 line · Randy Dunlap
rcu_online_cpu()should be__cpuinitinstead of__devinit.So if we have:
CONFIG_HOTPLUG=nCONFIG_HOTPLUG_CPU=y
Quoted 7 lines
Quoted 1 line
then this is a oops candidate.
At first glance, this can't happen because all
CONFIG_HOTPLUG_CPUdepends onCONFIG_HOTPLUGor selects it, for all archs.But
CONFIG_PM_SLEEP_SMPselectsCONFIG_HOTPLUG_CPU, without requiringCONFIG_HOTPLUG: turning on SUSPEND or HIBERNATION does this.
For now it is a bug to select a symbol with dependencies...
If we could say that we always have HOTPLUG when we have HOTPLUG_CPU that would kill a lot of a lot of Section Mismatch warnings. But as things stands out we can build a kernel with HOTPLUG_CPU but without HOTPLUG.
#if defined(CONFIG_HOTPLUG_CPU && !defined(CONFIG_HOTPLUG)
# error illegal configuration - talk to the PM guys #endif
could do it?
Quoted 2 lines
Perhaps it's time to revisit reverse-depends for select?
Or maybe a higer level solution.
select is used for three pruposes:
- to include specific minimalitic functionality as for example done on the ARM Kconfig file with success
- to enable general functionality (the HAVE_* way to do it)
- to enable subsystems of different sizes
And it is only when people try to do the latter it blows up. And they do so to make it easier for people to configure the kernel but the end result is the opposite.
Sam
Quoted 4 lines · On Mon, 21 Jan 2008 11:38:38 +1100 Rusty Russell wrote:
Quoted 3 lines · On Sunday 20 January 2008 08:25:49 Sam Ravnborg wrote:
Quoted 1 line · Randy Dunlap
rcu_online_cpu()should be__cpuinitinstead of__devinit.
Quoted 8 lines
Quoted 5 lines
So if we have:
CONFIG_HOTPLUG=nCONFIG_HOTPLUG_CPU=ythen this is a oops candidate.
At first glance, this can't happen because all
CONFIG_HOTPLUG_CPUdepends onCONFIG_HOTPLUGor selects it, for all archs.
Mostly, but arch/mips/ seems to be different (neither depends nor selects) unless it has changed very recently (I looked at 2.6.24-rc8).
Quoted 4 lines
But
CONFIG_PM_SLEEP_SMPselectsCONFIG_HOTPLUG_CPU, without requiringCONFIG_HOTPLUG: turning on SUSPEND or HIBERNATION does this.Perhaps it's time to revisit reverse-depends for select?
It would be nice if someone did that.
---
~Randy
Quoted 10 lines · Randy Dunlap
Quoted 8 lines · On Mon, 21 Jan 2008 11:38:38 +1100 Rusty Russell wrote:
Quoted 7 lines · On Sunday 20 January 2008 08:25:49 Sam Ravnborg wrote:
Quoted 1 line · Randy Dunlap
rcu_online_cpu()should be__cpuinitinstead of__devinit.So if we have:
CONFIG_HOTPLUG=nCONFIG_HOTPLUG_CPU=y
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
then this is a oops candidate.
At first glance, this can't happen because all
CONFIG_HOTPLUG_CPUdepends onCONFIG_HOTPLUGor selects it, for all archs.Mostly, but
arch/mips/seems to be different (neither depends nor selects) unless it has changed very recently (I looked at 2.6.24-rc8).
mips has
default n
So they at least try to turn off this feature.
Sam
Quoted 11 lines · Sam Ravnborg
Quoted 10 lines · Randy Dunlap
Quoted 8 lines · On Mon, 21 Jan 2008 11:38:38 +1100 Rusty Russell wrote:
Quoted 7 lines · On Sunday 20 January 2008 08:25:49 Sam Ravnborg wrote:
Quoted 1 line · Randy Dunlap
rcu_online_cpu()should be__cpuinitinstead of__devinit.So if we have:
CONFIG_HOTPLUG=nCONFIG_HOTPLUG_CPU=ythen this is a oops candidate.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
At first glance, this can't happen because all
CONFIG_HOTPLUG_CPUdepends onCONFIG_HOTPLUGor selects it, for all archs.Mostly, but
arch/mips/seems to be different (neither depends nor selects) unless it has changed very recently (I looked at 2.6.24-rc8).mips has
default nSo they at least try to turn off this feature.
OK.
ISTM that conflating CONFIG_HOTPLUG and CONFIG_HOTPLUG_CPU is both a mistake and confusing. CONFIG_HOTPLUG help text specifically talks about hot-pluggable devices and /dev. I can imagine some engineers saying that CPUs and MEM are (abstract) devices, but I don't think that most users would go that far, so I think that HOTPLUG and HOTPLUG_CPU should be totally independent.
Signature · 1 line
~Randy