summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-11-06 21:42:57 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-11-06 21:42:57 +0000
commitba416710b9c76049b048214a4d74b14973c2e019 (patch)
tree511ee5c2aa536bc5e4527d2c399f3f2594b06b69 /sys
parent21f8fd673c0b6267dd6bcfd06e73e7cff03acf5d (diff)
Remove the now unused idle_u, and call the secondary processors startup
stack a startup stack.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/aviion/aviion/locore.S14
-rw-r--r--sys/arch/aviion/aviion/machdep.c12
-rw-r--r--sys/arch/luna88k/luna88k/locore.S19
-rw-r--r--sys/arch/luna88k/luna88k/machdep.c10
-rw-r--r--sys/arch/m88k/include/cpu.h4
-rw-r--r--sys/arch/m88k/m88k/genassym.cf6
-rw-r--r--sys/arch/m88k/m88k/m88k_machdep.c4
-rw-r--r--sys/arch/mvme88k/mvme88k/locore.S14
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c11
9 files changed, 35 insertions, 59 deletions
diff --git a/sys/arch/aviion/aviion/locore.S b/sys/arch/aviion/aviion/locore.S
index dae5f31e0c4..0bfe3e69713 100644
--- a/sys/arch/aviion/aviion/locore.S
+++ b/sys/arch/aviion/aviion/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.4 2007/10/10 15:53:51 art Exp $ */
+/* $OpenBSD: locore.S,v 1.5 2007/11/06 21:42:55 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -339,9 +339,9 @@ GLOBAL(secondary_start)
bsr _C_LABEL(secondary_pre_main) /* set cpu number */
ldcr r2, CPU
- ld r3, r2, CI_IDLE_PCB
+ ld r3, r2, CI_INIT_STACK
bsr.n _C_LABEL(secondary_main)
- addu r31, r3, USIZE /* switch to idle stack */
+ addu r31, r3, USIZE /* switch to startup stack */
#endif /* MULTIPROCESSOR */
@@ -383,14 +383,6 @@ ASLOCAL(slavestack_end)
#endif
/*
- * Main processor's idle pcb and stack.
- * Should be page aligned.
- */
- .align PAGE_SIZE
-GLOBAL(idle_u)
- space USIZE
-
-/*
* Process 0's u.
* Should be page aligned.
*/
diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c
index 4e7077db979..588900afba2 100644
--- a/sys/arch/aviion/aviion/machdep.c
+++ b/sys/arch/aviion/aviion/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.12 2007/10/13 12:55:20 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.13 2007/11/06 21:42:55 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -585,11 +585,13 @@ secondary_pre_main()
pmap_bootstrap_cpu(ci->ci_cpuid);
/*
- * Allocate UPAGES contiguous pages for the idle PCB and stack.
+ * Allocate UPAGES contiguous pages for the startup stack.
*/
- ci->ci_idle_pcb = (struct pcb *)uvm_km_zalloc(kernel_map, USPACE);
- if (ci->ci_idle_pcb == NULL) {
- printf("cpu%d: unable to allocate idle stack\n", ci->ci_cpuid);
+ ci->ci_init_stack = uvm_km_zalloc(kernel_map, USPACE);
+ if (ci->ci_init_stack == (vaddr_t)NULL) {
+ printf("cpu%d: unable to allocate startup stack\n",
+ ci->ci_cpuid);
+ for (;;) ;
}
}
diff --git a/sys/arch/luna88k/luna88k/locore.S b/sys/arch/luna88k/luna88k/locore.S
index 9f8e0ec9a2e..cf53da516a9 100644
--- a/sys/arch/luna88k/luna88k/locore.S
+++ b/sys/arch/luna88k/luna88k/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.14 2007/10/10 15:53:52 art Exp $ */
+/* $OpenBSD: locore.S,v 1.15 2007/11/06 21:42:56 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -283,12 +283,9 @@ ASLOCAL(secondary_init)
or r31, r31, lo16(_ASM_LABEL(slavestack_end))
ldcr r2, CPU
-1:
- ld r3, r2, CI_CURPCB
- bcnd eq0, r3, 1b
-
- br.n _C_LABEL(secondary_main)
- add r31, r3, USIZE /* switch to idle stack */
+ ld r3, r2, CI_INIT_STACK
+ bsr.n _C_LABEL(secondary_main)
+ addu r31, r3, USIZE /* switch to startup stack */
#else
@@ -338,14 +335,6 @@ ASLOCAL(slavestack_end)
#endif
/*
- * Main processor's idle pcb and stack.
- * Should be page aligned.
- */
- .align PAGE_SIZE
-GLOBAL(idle_u)
- space USIZE
-
-/*
* Process 0's u.
* Should be page aligned.
*/
diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c
index 5dabd40ea8b..42a7fa8895f 100644
--- a/sys/arch/luna88k/luna88k/machdep.c
+++ b/sys/arch/luna88k/luna88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.46 2007/10/13 12:55:21 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.47 2007/11/06 21:42:56 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -791,9 +791,11 @@ secondary_pre_main()
/*
* Allocate UPAGES contiguous pages for the idle PCB and stack.
*/
- ci->ci_idle_pcb = (struct pcb *)uvm_km_zalloc(kernel_map, USPACE);
- if (ci->ci_idle_pcb == NULL) {
- printf("cpu%d: unable to allocate idle stack\n", ci->ci_cpuid);
+ ci->ci_init_stack = uvm_km_zalloc(kernel_map, USPACE);
+ if (ci->ci_init_stack == (vaddr_t)NULL) {
+ printf("cpu%d: unable to allocate startup stack\n",
+ ci->ci_cpuid);
+ for (;;) ;
}
}
diff --git a/sys/arch/m88k/include/cpu.h b/sys/arch/m88k/include/cpu.h
index 2b3e95e81a2..b6b5e6d479a 100644
--- a/sys/arch/m88k/include/cpu.h
+++ b/sys/arch/m88k/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.27 2007/10/29 19:57:46 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.28 2007/11/06 21:42:56 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* Copyright (c) 1992, 1993
@@ -95,7 +95,7 @@ struct cpu_info {
struct schedstate_percpu ci_schedstate; /* scheduling state */
int ci_want_resched; /* need_resched() invoked */
- struct pcb *ci_idle_pcb; /* idle pcb (and stack) */
+ vaddr_t ci_init_stack; /* startup stack */
u_int ci_intrdepth; /* interrupt depth */
diff --git a/sys/arch/m88k/m88k/genassym.cf b/sys/arch/m88k/m88k/genassym.cf
index 2afe41589d1..bc3a96c2e71 100644
--- a/sys/arch/m88k/m88k/genassym.cf
+++ b/sys/arch/m88k/m88k/genassym.cf
@@ -1,4 +1,4 @@
-# $OpenBSD: genassym.cf,v 1.9 2007/10/10 15:53:52 art Exp $
+# $OpenBSD: genassym.cf,v 1.10 2007/11/06 21:42:56 miod Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
@@ -28,7 +28,7 @@
# SUCH DAMAGE.
#
# @(#)genassym.c 7.8 (Berkeley) 5/7/91
-# $Id: genassym.cf,v 1.9 2007/10/10 15:53:52 art Exp $
+# $Id: genassym.cf,v 1.10 2007/11/06 21:42:56 miod Exp $
#
include <sys/param.h>
@@ -65,7 +65,7 @@ member ci_pfsr_i0
member ci_pfsr_i1
member ci_pfsr_d0
member ci_pfsr_d1
-member ci_idle_pcb
+member ci_init_stack
member ci_want_resched
# general constants
diff --git a/sys/arch/m88k/m88k/m88k_machdep.c b/sys/arch/m88k/m88k/m88k_machdep.c
index a6a90aec410..fbd05d1e5dd 100644
--- a/sys/arch/m88k/m88k/m88k_machdep.c
+++ b/sys/arch/m88k/m88k/m88k_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88k_machdep.c,v 1.25 2007/10/29 19:57:48 miod Exp $ */
+/* $OpenBSD: m88k_machdep.c,v 1.26 2007/11/06 21:42:56 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -275,7 +275,6 @@ void
set_cpu_number(cpuid_t number)
{
struct cpu_info *ci;
- extern struct pcb idle_u;
#ifdef MULTIPROCESSOR
ci = &m88k_cpus[number];
@@ -292,7 +291,6 @@ set_cpu_number(cpuid_t number)
#endif
{
ci->ci_primary = 1;
- ci->ci_idle_pcb = &idle_u;
}
}
diff --git a/sys/arch/mvme88k/mvme88k/locore.S b/sys/arch/mvme88k/mvme88k/locore.S
index 2cf4cfc7b3d..c0690a808a6 100644
--- a/sys/arch/mvme88k/mvme88k/locore.S
+++ b/sys/arch/mvme88k/mvme88k/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.51 2007/10/28 19:45:52 miod Exp $ */
+/* $OpenBSD: locore.S,v 1.52 2007/11/06 21:42:56 miod Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -319,9 +319,9 @@ GLOBAL(secondary_start)
bsr _C_LABEL(secondary_pre_main) /* set cpu number */
ldcr r2, CPU
- ld r3, r2, CI_IDLE_PCB
+ ld r3, r2, CI_INIT_STACK
bsr.n _C_LABEL(secondary_main)
- addu r31, r3, USIZE /* switch to idle stack */
+ addu r31, r3, USIZE /* switch to startup stack */
#endif /* MULTIPROCESSOR */
@@ -413,14 +413,6 @@ ASLOCAL(slavestack_end)
#endif
/*
- * Main processor's idle pcb and stack.
- * Should be page aligned.
- */
- .align PAGE_SIZE
-GLOBAL(idle_u)
- space USIZE
-
-/*
* Process 0's u.
* Should be page aligned.
*/
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 2b97d66c08b..b881f9a5190 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.197 2007/10/28 19:48:47 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.198 2007/11/06 21:42:56 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -701,11 +701,12 @@ secondary_pre_main()
pmap_bootstrap_cpu(ci->ci_cpuid);
/*
- * Allocate UPAGES contiguous pages for the idle PCB and stack.
+ * Allocate UPAGES contiguous pages for the startup stack.
*/
- ci->ci_idle_pcb = (struct pcb *)uvm_km_zalloc(kernel_map, USPACE);
- if (ci->ci_idle_pcb == NULL) {
- printf("cpu%d: unable to allocate idle stack\n", ci->ci_cpuid);
+ ci->ci_init_stack = uvm_km_zalloc(kernel_map, USPACE);
+ if (ci->ci_init_stack == (vaddr_t)NULL) {
+ printf("cpu%d: unable to allocate startup stack\n",
+ ci->ci_cpuid);
__cpu_simple_unlock(&cpu_boot_mutex);
for (;;) ;
}