diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-07-14 05:23:37 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-16 07:05:02 -0400 |
commit | 8b99cfb8cc51adae7f5294c8962a026c63100959 (patch) | |
tree | 349cebcae3eda608f1ed52fa3afcf661fca075a9 /arch/sparc64/kernel/smp.c | |
parent | 27a2ef382c7935a4dd02bff9fd361ce118df98c6 (diff) |
[SPARC64]: More sensible udelay implementation.
Take a page from the powerpc folks and just calculate the
delay factor directly.
Since frequency scaling chips use a system-tick register,
the value is going to be the same system-wide.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/smp.c')
-rw-r--r-- | arch/sparc64/kernel/smp.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 9d02b3a9bb85..69a1183c622d 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -49,9 +49,6 @@ extern void calibrate_delay(void); | |||
49 | 49 | ||
50 | int sparc64_multi_core __read_mostly; | 50 | int sparc64_multi_core __read_mostly; |
51 | 51 | ||
52 | /* Please don't make this stuff initdata!!! --DaveM */ | ||
53 | unsigned char boot_cpu_id; | ||
54 | |||
55 | cpumask_t cpu_possible_map __read_mostly = CPU_MASK_NONE; | 52 | cpumask_t cpu_possible_map __read_mostly = CPU_MASK_NONE; |
56 | cpumask_t cpu_online_map __read_mostly = CPU_MASK_NONE; | 53 | cpumask_t cpu_online_map __read_mostly = CPU_MASK_NONE; |
57 | cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly = | 54 | cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly = |
@@ -82,10 +79,7 @@ void smp_bogo(struct seq_file *m) | |||
82 | 79 | ||
83 | for_each_online_cpu(i) | 80 | for_each_online_cpu(i) |
84 | seq_printf(m, | 81 | seq_printf(m, |
85 | "Cpu%dBogo\t: %lu.%02lu\n" | ||
86 | "Cpu%dClkTck\t: %016lx\n", | 82 | "Cpu%dClkTck\t: %016lx\n", |
87 | i, cpu_data(i).udelay_val / (500000/HZ), | ||
88 | (cpu_data(i).udelay_val / (5000/HZ)) % 100, | ||
89 | i, cpu_data(i).clock_tick); | 83 | i, cpu_data(i).clock_tick); |
90 | } | 84 | } |
91 | 85 | ||
@@ -112,8 +106,6 @@ void __devinit smp_callin(void) | |||
112 | 106 | ||
113 | local_irq_enable(); | 107 | local_irq_enable(); |
114 | 108 | ||
115 | calibrate_delay(); | ||
116 | cpu_data(cpuid).udelay_val = loops_per_jiffy; | ||
117 | callin_flag = 1; | 109 | callin_flag = 1; |
118 | __asm__ __volatile__("membar #Sync\n\t" | 110 | __asm__ __volatile__("membar #Sync\n\t" |
119 | "flush %%g6" : : : "memory"); | 111 | "flush %%g6" : : : "memory"); |
@@ -1231,11 +1223,6 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs) | |||
1231 | preempt_enable(); | 1223 | preempt_enable(); |
1232 | } | 1224 | } |
1233 | 1225 | ||
1234 | void __init smp_tick_init(void) | ||
1235 | { | ||
1236 | boot_cpu_id = hard_smp_processor_id(); | ||
1237 | } | ||
1238 | |||
1239 | /* /proc/profile writes can call this, don't __init it please. */ | 1226 | /* /proc/profile writes can call this, don't __init it please. */ |
1240 | int setup_profiling_timer(unsigned int multiplier) | 1227 | int setup_profiling_timer(unsigned int multiplier) |
1241 | { | 1228 | { |
@@ -1244,7 +1231,6 @@ int setup_profiling_timer(unsigned int multiplier) | |||
1244 | 1231 | ||
1245 | void __init smp_prepare_cpus(unsigned int max_cpus) | 1232 | void __init smp_prepare_cpus(unsigned int max_cpus) |
1246 | { | 1233 | { |
1247 | cpu_data(boot_cpu_id).udelay_val = loops_per_jiffy; | ||
1248 | } | 1234 | } |
1249 | 1235 | ||
1250 | void __devinit smp_prepare_boot_cpu(void) | 1236 | void __devinit smp_prepare_boot_cpu(void) |
@@ -1323,16 +1309,6 @@ void __cpu_die(unsigned int cpu) | |||
1323 | 1309 | ||
1324 | void __init smp_cpus_done(unsigned int max_cpus) | 1310 | void __init smp_cpus_done(unsigned int max_cpus) |
1325 | { | 1311 | { |
1326 | unsigned long bogosum = 0; | ||
1327 | int i; | ||
1328 | |||
1329 | for_each_online_cpu(i) | ||
1330 | bogosum += cpu_data(i).udelay_val; | ||
1331 | printk("Total of %ld processors activated " | ||
1332 | "(%lu.%02lu BogoMIPS).\n", | ||
1333 | (long) num_online_cpus(), | ||
1334 | bogosum/(500000/HZ), | ||
1335 | (bogosum/(5000/HZ))%100); | ||
1336 | } | 1312 | } |
1337 | 1313 | ||
1338 | void smp_send_reschedule(int cpu) | 1314 | void smp_send_reschedule(int cpu) |