Commit fe501f1e authored by Borislav Petkov's avatar Borislav Petkov Committed by H. Peter Anvin

x86, k8: Fix section mismatch for powernowk8_exit()

Fix the following warning:

"WARNING: arch/x86/kernel/built-in.o(.exit.text+0x72):
Section mismatch in reference from the function powernowk8_exit() to the variable .cpuinit.data:cpb_nb

The function __exit powernowk8_exit() references a variable
__cpuinitdata cpb_nb. 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 of cpb_nb so it may be used outside an init
section."

Cc: <stable@kernel.org>
Reported-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <20100525152858.GA24836@aftab>
Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent 0dbdd1bf
...@@ -1497,8 +1497,8 @@ static struct cpufreq_driver cpufreq_amd64_driver = { ...@@ -1497,8 +1497,8 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
* simply keep the boost-disable flag in sync with the current global * simply keep the boost-disable flag in sync with the current global
* state. * state.
*/ */
static int __cpuinit cpb_notify(struct notifier_block *nb, unsigned long action, static int cpb_notify(struct notifier_block *nb, unsigned long action,
void *hcpu) void *hcpu)
{ {
unsigned cpu = (long)hcpu; unsigned cpu = (long)hcpu;
u32 lo, hi; u32 lo, hi;
...@@ -1528,7 +1528,7 @@ static int __cpuinit cpb_notify(struct notifier_block *nb, unsigned long action, ...@@ -1528,7 +1528,7 @@ static int __cpuinit cpb_notify(struct notifier_block *nb, unsigned long action,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block __cpuinitdata cpb_nb = { static struct notifier_block cpb_nb = {
.notifier_call = cpb_notify, .notifier_call = cpb_notify,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment