Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21461
b: refs/heads/master
c: 7890f79
h: refs/heads/master
i:
  21459: bed4163
v: v3
  • Loading branch information
David S. Miller committed Mar 20, 2006
1 parent 26da10e commit 5679d8e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 63c2a0e598c2fa769a08a6e9ad124bf270b4436e
refs/heads/master: 7890f794e0e6f7dce2a5f4a03ba64b0b3fe306bd
12 changes: 9 additions & 3 deletions trunk/arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,21 @@ static int __devinit smp_boot_one_cpu(unsigned int cpu)
unsigned long cookie =
(unsigned long)(&cpu_new_thread);
struct task_struct *p;
int timeout, ret, cpu_node;
int timeout, ret;

p = fork_idle(cpu);
callin_flag = 0;
cpu_new_thread = task_thread_info(p);
cpu_set(cpu, cpu_callout_map);

cpu_find_by_mid(cpu, &cpu_node);
prom_startcpu(cpu_node, entry, cookie);
if (tlb_type == hypervisor) {
prom_startcpu_cpuid(cpu, entry, cookie);
} else {
int cpu_node;

cpu_find_by_mid(cpu, &cpu_node);
prom_startcpu(cpu_node, entry, cookie);
}

for (timeout = 0; timeout < 5000000; timeout++) {
if (callin_flag)
Expand Down
16 changes: 14 additions & 2 deletions trunk/arch/sparc64/prom/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,21 @@ int prom_wakeupsystem(void)
}

#ifdef CONFIG_SMP
void prom_startcpu(int cpunode, unsigned long pc, unsigned long o0)
void prom_startcpu(int cpunode, unsigned long pc, unsigned long arg)
{
p1275_cmd("SUNW,start-cpu", P1275_INOUT(3, 0), cpunode, pc, o0);
p1275_cmd("SUNW,start-cpu", P1275_INOUT(3, 0), cpunode, pc, arg);
}

void prom_startcpu_cpuid(int cpuid, unsigned long pc, unsigned long arg)
{
p1275_cmd("SUNW,start-cpu-by-cpuid", P1275_INOUT(3, 0),
cpuid, pc, arg);
}

void prom_stopcpu_cpuid(int cpuid)
{
p1275_cmd("SUNW,stop-cpu-by-cpuid", P1275_INOUT(1, 0),
cpuid);
}

void prom_stopself(void)
Expand Down
14 changes: 11 additions & 3 deletions trunk/include/asm-sparc64/oplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,18 @@ extern enum prom_output_device prom_query_output_device(void);

/* Multiprocessor operations... */
#ifdef CONFIG_SMP
/* Start the CPU with the given device tree node, context table, and context
* at the passed program counter.
/* Start the CPU with the given device tree node at the passed program
* counter with the given arg passed in via register %o0.
*/
extern void prom_startcpu(int cpunode, unsigned long pc, unsigned long o0);
extern void prom_startcpu(int cpunode, unsigned long pc, unsigned long arg);

/* Start the CPU with the given cpu ID at the passed program
* counter with the given arg passed in via register %o0.
*/
extern void prom_startcpu_cpuid(int cpuid, unsigned long pc, unsigned long arg);

/* Stop the CPU with the given cpu ID. */
extern void prom_stopcpu_cpuid(int cpuid);

/* Stop the current CPU. */
extern void prom_stopself(void);
Expand Down

0 comments on commit 5679d8e

Please sign in to comment.