section mismatch in intel_idle
Hi,
this just showed up in 2.6.38-rc1:
WARNING: drivers/idle/built-in.o(.text+0x112): Section mismatch in reference from the function intel_idle_probe() to the variable .cpuinit.data:setup_broadcast_notifier The function intel_idle_probe() references
the variable __cpuinitdata setup_broadcast_notifier.
This is often because intel_idle_probe lacks a __cpuinitdata
annotation or the annotation of setup_broadcast_notifier is wrong.
WARNING: drivers/idle/built-in.o(.exit.text+0x2d): Section mismatch in reference from the function intel_idle_exit() to the variable .cpuinit.data:setup_broadcast_notifier The function __exit intel_idle_exit() references
a variable __cpuinitdata setup_broadcast_notifier.
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __cpuinitdata annotation ofsetup_broadcast_notifier so it may be used outside an init section.
Signature · 3 lines
Stefan Richter -=====-==-== ---= =-=-- http://arcgraph.de/sr/
Quoted 10 lines · Stefan Richter
Hi,
this just showed up in 2.6.38-rc1:
WARNING: drivers/idle/built-in.o(.text+0x112): Section mismatch in reference from the function
intel_idle_probe()to the variable .cpuinit.data:setup_broadcast_notifier The functionintel_idle_probe()references
the variable__cpuinitdatasetup_broadcast_notifier.
This is often becauseintel_idle_probelacks a__cpuinitdata
annotation or the annotation ofsetup_broadcast_notifieris wrong.
Quoted 7 lines
WARNING: drivers/idle/built-in.o(.exit.text+0x2d): Section mismatch in reference from the function
intel_idle_exit()to the variable .cpuinit.data:setup_broadcast_notifier The function__exitintel_idle_exit()references
a variable__cpuinitdatasetup_broadcast_notifier.
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the__cpuinitdataannotation ofsetup_broadcast_notifierso it may be used outside an init section.
Len, please add this to your tree.
Fix annotation warning.
drivers/idle/intel_idle.c +2 -2
@@ -263,7 +263,7 @@ static void __setup_broadcast_timer(void *arg)clockevents_notify (reason, &cpu); } -static int __cpuinit setup_broadcast_cpuhp_notify (struct notifier_block *n, +static int setup_broadcast_cpuhp_notify (struct notifier_block *n,unsigned long action,void *hcpu) {int hotcpu = (unsigned long )hcpu;
@@ -281,7 +281,7 @@ static int __cpuinit setup_broadcast_cpuhp_notify(struct notifier_block *n,return NOTIFY_OK ; } -static struct notifier_block __cpuinitdata setup_broadcast_notifier = { +static struct notifier_block setup_broadcast_notifier = { .notifier_call = setup_broadcast_cpuhp_notify, };