diff options
author | grehan <grehan@FreeBSD.org> | 2005-02-28 08:47:51 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2005-02-28 08:47:51 +0000 |
commit | 78aa487988c442bcc49973ff7fa9e1fc46710142 (patch) | |
tree | 77d3e8a1bb13ca7da64ab83533b33c6441d56037 | |
parent | 3c7b8be346ce7ae4e71fd5c092a1756e3ae9cccb (diff) | |
download | FreeBSD-src-78aa487988c442bcc49973ff7fa9e1fc46710142.zip FreeBSD-src-78aa487988c442bcc49973ff7fa9e1fc46710142.tar.gz |
- switch pcpu to a struct declaration ala amd64. It may be more efficient to
cache-align this struct, but that's a topic for a far-in-the-future
commit.
- eliminate commented-out reference to a non-existent pcpu field.
-rw-r--r-- | sys/powerpc/aim/machdep.c | 5 | ||||
-rw-r--r-- | sys/powerpc/powerpc/machdep.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index 1588796..a96df41 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -127,7 +127,7 @@ extern vm_offset_t ksym_start, ksym_end; int cold = 1; -char pcpu0[PAGE_SIZE]; +struct pcpu __pcpu[MAXCPU]; struct trapframe frame0; vm_offset_t kstack0; @@ -290,12 +290,11 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) /* * Set up per-cpu data. */ - pc = (struct pcpu *)(pcpu0 + PAGE_SIZE) - 1; + pc = &__pcpu[0]; pcpu_init(pc, 0, sizeof(struct pcpu)); pc->pc_curthread = &thread0; pc->pc_curpcb = thread0.td_pcb; pc->pc_cpuid = 0; - /* pc->pc_mid = mid; */ __asm __volatile("mtsprg 0, %0" :: "r"(pc)); diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index 1588796..a96df41 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -127,7 +127,7 @@ extern vm_offset_t ksym_start, ksym_end; int cold = 1; -char pcpu0[PAGE_SIZE]; +struct pcpu __pcpu[MAXCPU]; struct trapframe frame0; vm_offset_t kstack0; @@ -290,12 +290,11 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) /* * Set up per-cpu data. */ - pc = (struct pcpu *)(pcpu0 + PAGE_SIZE) - 1; + pc = &__pcpu[0]; pcpu_init(pc, 0, sizeof(struct pcpu)); pc->pc_curthread = &thread0; pc->pc_curpcb = thread0.td_pcb; pc->pc_cpuid = 0; - /* pc->pc_mid = mid; */ __asm __volatile("mtsprg 0, %0" :: "r"(pc)); |