Commit 548da331 authored by David S. Miller's avatar David S. Miller Committed by Greg Kroah-Hartman

sparc64: Fix cpufreq notifier registry.

[ Upstream commit 7ae93f51 ]

Based upon a report by Daniel Smolik.

We do it too early, which triggers a BUG in
cpufreq_register_notifier().
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent cbbe97a5
...@@ -883,6 +883,16 @@ static struct notifier_block sparc64_cpufreq_notifier_block = { ...@@ -883,6 +883,16 @@ static struct notifier_block sparc64_cpufreq_notifier_block = {
.notifier_call = sparc64_cpufreq_notifier .notifier_call = sparc64_cpufreq_notifier
}; };
static int __init register_sparc64_cpufreq_notifier(void)
{
cpufreq_register_notifier(&sparc64_cpufreq_notifier_block,
CPUFREQ_TRANSITION_NOTIFIER);
return 0;
}
core_initcall(register_sparc64_cpufreq_notifier);
#endif /* CONFIG_CPU_FREQ */ #endif /* CONFIG_CPU_FREQ */
static int sparc64_next_event(unsigned long delta, static int sparc64_next_event(unsigned long delta,
...@@ -1049,11 +1059,6 @@ void __init time_init(void) ...@@ -1049,11 +1059,6 @@ void __init time_init(void)
sparc64_clockevent.mult, sparc64_clockevent.shift); sparc64_clockevent.mult, sparc64_clockevent.shift);
setup_sparc64_timer(); setup_sparc64_timer();
#ifdef CONFIG_CPU_FREQ
cpufreq_register_notifier(&sparc64_cpufreq_notifier_block,
CPUFREQ_TRANSITION_NOTIFIER);
#endif
} }
unsigned long long sched_clock(void) unsigned long long sched_clock(void)
......
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