mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
- 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.
This commit is contained in:
parent
6067dba1bf
commit
4d4b91ac81
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142764
@ -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));
|
||||
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user