summaryrefslogtreecommitdiffstats
path: root/sys/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2006-11-18 23:15:25 +0000
committermarcel <marcel@FreeBSD.org>2006-11-18 23:15:25 +0000
commitaee58e2da0c688785939850d85b12b57fbb12396 (patch)
tree90b2fdab0b33e7ffe062399f218ee6cd24e99398 /sys/ia64
parent7a2a030c15e461af3927da3010f9e748368094a7 (diff)
downloadFreeBSD-src-aee58e2da0c688785939850d85b12b57fbb12396.zip
FreeBSD-src-aee58e2da0c688785939850d85b12b57fbb12396.tar.gz
Since printf also has at least one critical section, we need to
initialize pc_curthread. While here, rename early_pcpu to pcpu0 to be conistent (compare thread0 and proc0).
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/machdep.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index d59c5e4..a57fc4f 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -108,7 +108,7 @@ int cold = 1;
u_int64_t pa_bootinfo;
struct bootinfo bootinfo;
-struct pcpu early_pcpu;
+struct pcpu pcpu0;
extern char kstack[];
vm_offset_t proc0kstack;
@@ -601,11 +601,14 @@ ia64_init(void)
bootverbose = 1;
/*
- * Setup the global data for the bootstrap cpu.
+ * Setup the PCPU data for the bootstrap processor. It is needed
+ * by printf(). Also, since printf() has critical sections, we
+ * need to initialize at least pc_curthread.
*/
- pcpup = &early_pcpu;
+ pcpup = &pcpu0;
ia64_set_k4((u_int64_t)pcpup);
- pcpu_init(pcpup, 0, sizeof(early_pcpu));
+ pcpu_init(pcpup, 0, sizeof(pcpu0));
+ PCPU_SET(curthread, &thread0);
/*
* Initialize the console before we print anything out.
@@ -782,7 +785,6 @@ ia64_init(void)
proc0kstack = (vm_offset_t)kstack;
thread0.td_kstack = proc0kstack;
thread0.td_kstack_pages = KSTACK_PAGES;
- PCPU_SET(curthread, &thread0);
mutex_init();
OpenPOWER on IntegriCloud