Remove PIR from PCPU data. It has an implementation-defined meaning that
is of limited utility outside of platform-specific code and can vary at runtime when running as a hypervisor guest, so does not even have the virtue of being a static identifier. Reviewed by: jhibbits
This commit is contained in:
parent
29f61a2f42
commit
3972f4c1d4
@ -46,7 +46,6 @@ struct pvo_entry;
|
||||
struct thread *pc_fputhread; /* current fpu user */ \
|
||||
struct thread *pc_vecthread; /* current vec user */ \
|
||||
uintptr_t pc_hwref; \
|
||||
uint32_t pc_pir; \
|
||||
int pc_bsp; \
|
||||
volatile int pc_awake; \
|
||||
uint32_t pc_ipimask; \
|
||||
|
@ -91,5 +91,4 @@ db_show_mdpcpu(struct pcpu *pc)
|
||||
|
||||
db_printf("PPC: hwref = %#zx\n", pc->pc_hwref);
|
||||
db_printf("PPC: ipimask = %#x\n", pc->pc_ipimask);
|
||||
db_printf("PPC: pir = %#x\n", pc->pc_pir);
|
||||
}
|
||||
|
@ -368,7 +368,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp,
|
||||
thread0.td_oncpu = bsp.cr_cpuid;
|
||||
pc->pc_cpuid = bsp.cr_cpuid;
|
||||
pc->pc_hwref = bsp.cr_hwref;
|
||||
pc->pc_pir = mfspr(SPR_PIR);
|
||||
__asm __volatile("mtsprg 0, %0" :: "r"(pc));
|
||||
|
||||
/*
|
||||
|
@ -74,8 +74,6 @@ void
|
||||
machdep_ap_bootstrap(void)
|
||||
{
|
||||
|
||||
/* Set PIR */
|
||||
PCPU_SET(pir, mfspr(SPR_PIR));
|
||||
PCPU_SET(awake, 1);
|
||||
__asm __volatile("msync; isync");
|
||||
|
||||
@ -224,13 +222,13 @@ cpu_mp_unleash(void *dummy)
|
||||
DELAY(1000);
|
||||
|
||||
} else {
|
||||
PCPU_SET(pir, mfspr(SPR_PIR));
|
||||
pc->pc_awake = 1;
|
||||
}
|
||||
if (pc->pc_awake) {
|
||||
if (bootverbose)
|
||||
printf("Adding CPU %d, pir=%x, awake=%x\n",
|
||||
pc->pc_cpuid, pc->pc_pir, pc->pc_awake);
|
||||
printf("Adding CPU %d, hwref=%jx, awake=%x\n",
|
||||
pc->pc_cpuid, (uintmax_t)pc->pc_hwref,
|
||||
pc->pc_awake);
|
||||
smp_cpus++;
|
||||
} else
|
||||
CPU_SET(pc->pc_cpuid, &stopped_cpus);
|
||||
|
Loading…
Reference in New Issue
Block a user