summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-23 16:21:07 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-23 16:21:07 -0700
commit7ae93f51d7fa8b9130d47e0b7d17979a165c5bc3 (patch)
tree7a2584151bd3f949e407f6016bd5ef006bcff323
parentb7c2a75725dee9b5643a0aae3a4cb47f52e00a49 (diff)
downloadop-kernel-dev-7ae93f51d7fa8b9130d47e0b7d17979a165c5bc3.zip
op-kernel-dev-7ae93f51d7fa8b9130d47e0b7d17979a165c5bc3.tar.gz
sparc64: Fix cpufreq notifier registry.
Based upon a report by Daniel Smolik. We do it too early, which triggers a BUG in cpufreq_register_notifier(). Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc64/kernel/time.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index bedc4c1..a0c6a97 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -884,6 +884,16 @@ static struct notifier_block sparc64_cpufreq_notifier_block = {
.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 */
static int sparc64_next_event(unsigned long delta,
@@ -1050,11 +1060,6 @@ void __init time_init(void)
sparc64_clockevent.mult, sparc64_clockevent.shift);
setup_sparc64_timer();
-
-#ifdef CONFIG_CPU_FREQ
- cpufreq_register_notifier(&sparc64_cpufreq_notifier_block,
- CPUFREQ_TRANSITION_NOTIFIER);
-#endif
}
unsigned long long sched_clock(void)
OpenPOWER on IntegriCloud