Author: nwhitehorn Date: Sun Dec 31 20:23:39 2017 New Revision: 327445 URL: https://svnweb.freebsd.org/changeset/base/327445
Log: 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 Modified: head/sys/powerpc/include/pcpu.h head/sys/powerpc/powerpc/db_interface.c head/sys/powerpc/powerpc/machdep.c head/sys/powerpc/powerpc/mp_machdep.c Modified: head/sys/powerpc/include/pcpu.h ============================================================================== --- head/sys/powerpc/include/pcpu.h Sun Dec 31 20:21:05 2017 (r327444) +++ head/sys/powerpc/include/pcpu.h Sun Dec 31 20:23:39 2017 (r327445) @@ -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; \ Modified: head/sys/powerpc/powerpc/db_interface.c ============================================================================== --- head/sys/powerpc/powerpc/db_interface.c Sun Dec 31 20:21:05 2017 (r327444) +++ head/sys/powerpc/powerpc/db_interface.c Sun Dec 31 20:23:39 2017 (r327445) @@ -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); } Modified: head/sys/powerpc/powerpc/machdep.c ============================================================================== --- head/sys/powerpc/powerpc/machdep.c Sun Dec 31 20:21:05 2017 (r327444) +++ head/sys/powerpc/powerpc/machdep.c Sun Dec 31 20:23:39 2017 (r327445) @@ -368,7 +368,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offs 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)); /* Modified: head/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/mp_machdep.c Sun Dec 31 20:21:05 2017 (r327444) +++ head/sys/powerpc/powerpc/mp_machdep.c Sun Dec 31 20:23:39 2017 (r327445) @@ -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); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"