svn commit: r326207 - head/sys/powerpc/aim

Nathan Whitehorn nwhitehorn at FreeBSD.org
Sat Nov 25 22:03:26 UTC 2017


Author: nwhitehorn
Date: Sat Nov 25 22:03:25 2017
New Revision: 326207
URL: https://svnweb.freebsd.org/changeset/base/326207

Log:
  Preserve the LPCR on new-ish (POWER7 and POWER8) CPUs, preventing exceptions
  and such from ending on the wrong CPU on SMP systems. It would be good to
  have this be more generic somehow as POWER9s appear, but PPC does not
  have features bits, unfortunately.
  
  MFC after:	3 weeks

Modified:
  head/sys/powerpc/aim/mp_cpudep.c

Modified: head/sys/powerpc/aim/mp_cpudep.c
==============================================================================
--- head/sys/powerpc/aim/mp_cpudep.c	Sat Nov 25 22:01:55 2017	(r326206)
+++ head/sys/powerpc/aim/mp_cpudep.c	Sat Nov 25 22:03:25 2017	(r326207)
@@ -374,6 +374,13 @@ cpudep_ap_setup()
 		reg = mpc74xx_l1i_enable();
 
 		break;
+	case IBMPOWER7:
+	case IBMPOWER7PLUS:
+	case IBMPOWER8:
+	case IBMPOWER8E:
+		if (mfmsr() & PSL_HV)
+			mtspr(SPR_LPCR, mfspr(SPR_LPCR) | LPCR_LPES);
+		break;
 	default:
 #ifdef __powerpc64__
 		if (!(mfmsr() & PSL_HV)) /* Rely on HV to have set things up */


More information about the svn-src-head mailing list