Index: sys/mips/include/pcpu.h =================================================================== --- sys/mips/include/pcpu.h (revision 203390) +++ sys/mips/include/pcpu.h (working copy) @@ -45,7 +45,7 @@ extern char pcpu_space[MAXCPU][PAGE_SIZE * 2]; #define PCPU_ADDR(cpu) (struct pcpu *)(pcpu_space[(cpu)]) -extern struct pcpu *pcpup; +extern struct pcpu *const pcpup; #define PCPUP pcpup #define PCPU_ADD(member, value) (PCPUP->pc_ ## member += (value)) Index: sys/mips/mips/pmap.c =================================================================== --- sys/mips/mips/pmap.c (revision 203390) +++ sys/mips/mips/pmap.c (working copy) @@ -359,8 +359,13 @@ /* * Steal some virtual address space to map the pcpu area. */ - virtual_avail = roundup2(virtual_avail, PAGE_SIZE * 2); - pcpup = (struct pcpu *)virtual_avail; + KASSERT((vm_offset_t)pcpup == virtual_avail, + ("pcpup %p and virtual_avail 0x%0lx mismatch", + pcpup, (long)virtual_avail)); + + KASSERT(((vm_offset_t)pcpup & (PAGE_SIZE * 2 - 1)) == 0, + ("pcpup %p not aligned on a 8192 byte boundary.", pcpup)); + virtual_avail += PAGE_SIZE * 2; if (bootverbose) printf("pcpu is available at virtual address %p.\n", pcpup); Index: sys/mips/mips/machdep.c =================================================================== --- sys/mips/mips/machdep.c (revision 203390) +++ sys/mips/mips/machdep.c (working copy) @@ -134,9 +134,10 @@ __aligned(PAGE_SIZE * 2) __section(".data"); #ifdef SMP -struct pcpu *pcpup = 0; /* initialized in pmap_bootstrap() */ +struct pcpu *const pcpup = (struct pcpu *) + (VM_MIN_KERNEL_ADDRESS + VM_KERNEL_ALLOC_OFFSET); #else -struct pcpu *pcpup = (struct pcpu *)pcpu_space; +struct pcpu *const pcpup = (struct pcpu *)pcpu_space; #endif vm_offset_t phys_avail[PHYS_AVAIL_ENTRIES + 2];