diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-15 05:26:54 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:13:04 -0500 |
commit | 7890f794e0e6f7dce2a5f4a03ba64b0b3fe306bd (patch) | |
tree | a9cc7c67498616a47108c667a9c001f9fe468318 /arch/sparc64 | |
parent | 63c2a0e598c2fa769a08a6e9ad124bf270b4436e (diff) |
[SPARC64]: Add prom_{start,stop}cpu_cpuid().
Use prom_startcpu_cpuid() on SUN4V instead of prom_startcpu().
We should really test for "SUNW,start-cpu-by-cpuid" presence
and use it if present even on SUN4U.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/smp.c | 12 | ||||
-rw-r--r-- | arch/sparc64/prom/misc.c | 16 |
2 files changed, 23 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 64046d37bbf0..527dfd7ae210 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -331,15 +331,21 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu) | |||
331 | unsigned long cookie = | 331 | unsigned long cookie = |
332 | (unsigned long)(&cpu_new_thread); | 332 | (unsigned long)(&cpu_new_thread); |
333 | struct task_struct *p; | 333 | struct task_struct *p; |
334 | int timeout, ret, cpu_node; | 334 | int timeout, ret; |
335 | 335 | ||
336 | p = fork_idle(cpu); | 336 | p = fork_idle(cpu); |
337 | callin_flag = 0; | 337 | callin_flag = 0; |
338 | cpu_new_thread = task_thread_info(p); | 338 | cpu_new_thread = task_thread_info(p); |
339 | cpu_set(cpu, cpu_callout_map); | 339 | cpu_set(cpu, cpu_callout_map); |
340 | 340 | ||
341 | cpu_find_by_mid(cpu, &cpu_node); | 341 | if (tlb_type == hypervisor) { |
342 | prom_startcpu(cpu_node, entry, cookie); | 342 | prom_startcpu_cpuid(cpu, entry, cookie); |
343 | } else { | ||
344 | int cpu_node; | ||
345 | |||
346 | cpu_find_by_mid(cpu, &cpu_node); | ||
347 | prom_startcpu(cpu_node, entry, cookie); | ||
348 | } | ||
343 | 349 | ||
344 | for (timeout = 0; timeout < 5000000; timeout++) { | 350 | for (timeout = 0; timeout < 5000000; timeout++) { |
345 | if (callin_flag) | 351 | if (callin_flag) |
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c index 713cbac5f9bf..36d2b9c1622d 100644 --- a/arch/sparc64/prom/misc.c +++ b/arch/sparc64/prom/misc.c | |||
@@ -308,9 +308,21 @@ int prom_wakeupsystem(void) | |||
308 | } | 308 | } |
309 | 309 | ||
310 | #ifdef CONFIG_SMP | 310 | #ifdef CONFIG_SMP |
311 | void prom_startcpu(int cpunode, unsigned long pc, unsigned long o0) | 311 | void prom_startcpu(int cpunode, unsigned long pc, unsigned long arg) |
312 | { | 312 | { |
313 | p1275_cmd("SUNW,start-cpu", P1275_INOUT(3, 0), cpunode, pc, o0); | 313 | p1275_cmd("SUNW,start-cpu", P1275_INOUT(3, 0), cpunode, pc, arg); |
314 | } | ||
315 | |||
316 | void prom_startcpu_cpuid(int cpuid, unsigned long pc, unsigned long arg) | ||
317 | { | ||
318 | p1275_cmd("SUNW,start-cpu-by-cpuid", P1275_INOUT(3, 0), | ||
319 | cpuid, pc, arg); | ||
320 | } | ||
321 | |||
322 | void prom_stopcpu_cpuid(int cpuid) | ||
323 | { | ||
324 | p1275_cmd("SUNW,stop-cpu-by-cpuid", P1275_INOUT(1, 0), | ||
325 | cpuid); | ||
314 | } | 326 | } |
315 | 327 | ||
316 | void prom_stopself(void) | 328 | void prom_stopself(void) |