aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-23 19:21:07 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-23 19:21:07 -0400
commit7ae93f51d7fa8b9130d47e0b7d17979a165c5bc3 (patch)
tree7a2584151bd3f949e407f6016bd5ef006bcff323 /arch
parentb7c2a75725dee9b5643a0aae3a4cb47f52e00a49 (diff)
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>
Diffstat (limited to 'arch')
-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 bedc4c159b1c..a0c6a97eec6e 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 = {
884 .notifier_call = sparc64_cpufreq_notifier 884 .notifier_call = sparc64_cpufreq_notifier
885}; 885};
886 886
887static int __init register_sparc64_cpufreq_notifier(void)
888{
889
890 cpufreq_register_notifier(&sparc64_cpufreq_notifier_block,
891 CPUFREQ_TRANSITION_NOTIFIER);
892 return 0;
893}
894
895core_initcall(register_sparc64_cpufreq_notifier);
896
887#endif /* CONFIG_CPU_FREQ */ 897#endif /* CONFIG_CPU_FREQ */
888 898
889static int sparc64_next_event(unsigned long delta, 899static int sparc64_next_event(unsigned long delta,
@@ -1050,11 +1060,6 @@ void __init time_init(void)
1050 sparc64_clockevent.mult, sparc64_clockevent.shift); 1060 sparc64_clockevent.mult, sparc64_clockevent.shift);
1051 1061
1052 setup_sparc64_timer(); 1062 setup_sparc64_timer();
1053
1054#ifdef CONFIG_CPU_FREQ
1055 cpufreq_register_notifier(&sparc64_cpufreq_notifier_block,
1056 CPUFREQ_TRANSITION_NOTIFIER);
1057#endif
1058} 1063}
1059 1064
1060unsigned long long sched_clock(void) 1065unsigned long long sched_clock(void)