From 5d5a1c7fb35a11a8fff6b21f375cffa819271ae4 Mon Sep 17 00:00:00 2001 From: John Birrell Date: Sat, 4 Nov 2006 05:27:21 +0000 Subject: [PATCH] Backout the previous change. It was not intended to be part of the commit and, while something like that is probably required for sparc64, it hadn't been tested. --- sys/sparc64/sparc64/machdep.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index ab9d74efab17..84eea0b50734 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -329,12 +329,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) OF_getprop(child, "clock-frequency", &clock, sizeof(clock)); tick_init(clock); - /* - * Initialize global registers. - */ - pc = (struct pcpu *)(pcpu0 + (PCPU_PAGES * PAGE_SIZE)) - 1; - cpu_setregs(pc); - /* * Initialize the console before printing anything. */ @@ -415,6 +409,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) * stack, so don't pass the real size (PAGE_SIZE) to pcpu_init or * it'll zero it out from under us. */ + pc = (struct pcpu *)(pcpu0 + (PCPU_PAGES * PAGE_SIZE)) - 1; pcpu_init(pc, 0, sizeof(struct pcpu)); pc->pc_curthread = &thread0; pc->pc_curpcb = thread0.td_pcb; @@ -425,6 +420,11 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) pc->pc_tlb_ctx_min = TLB_CTX_USER_MIN; pc->pc_tlb_ctx_max = TLB_CTX_USER_MAX; + /* + * Initialize global registers. + */ + cpu_setregs(pc); + /* * Initialize the message buffer (after setting trap table). */