diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-11-09 16:13:53 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-11-09 16:13:53 +0000 |
commit | e6bdb94afec0ee4f2fb8671126daa49b5df6eb3b (patch) | |
tree | f0b25ac9890f34e604c151a380f44d76869ade69 /sys | |
parent | 330d6e4c137bd59ecc4e4d4a1eddc6e4c6feb13b (diff) |
Use the interrupt stack as the initial stack for spinning up secondary CPUs.
Inspired by a change in NetBSD pointed out by miod@.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc64/sparc64/cpu.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/arch/sparc64/sparc64/cpu.c b/sys/arch/sparc64/sparc64/cpu.c index f0bb472d1d0..eda5c156a5e 100644 --- a/sys/arch/sparc64/sparc64/cpu.c +++ b/sys/arch/sparc64/sparc64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.28 2007/10/28 12:34:05 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.29 2007/11/09 16:13:52 kettenis Exp $ */ /* $NetBSD: cpu.c,v 1.13 2001/05/26 21:27:15 chs Exp $ */ /* @@ -100,7 +100,7 @@ struct cpu_info * alloc_cpuinfo(int node) { paddr_t pa0, pa; - vaddr_t va, va0, kstack; + vaddr_t va, va0; vsize_t sz = 8 * PAGE_SIZE; int portid; struct cpu_info *cpi, *ci; @@ -133,10 +133,6 @@ alloc_cpuinfo(int node) memset((void *)va0, 0, sz); - kstack = uvm_km_alloc (kernel_map, USPACE); - if (kstack == 0) - panic("alloc_cpuinfo: unable to allocate pcb"); - /* * Initialize cpuinfo structure. * @@ -154,11 +150,10 @@ alloc_cpuinfo(int node) cpi->ci_spinup = NULL; #endif - cpi->ci_initstack = (void *)(kstack + USPACE); + cpi->ci_initstack = (void *)EINTSTACK; cpi->ci_paddr = pa0; cpi->ci_self = cpi; cpi->ci_node = node; - cpi->ci_cpcb = (struct pcb *)kstack; sched_init_cpu(cpi); |