Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 2018 06:42:01 +0000 (UTC)
From:      Wojciech Macek <wma@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r328616 - head/sys/powerpc/aim
Message-ID:  <201801310642.w0V6g1Am099107@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: wma
Date: Wed Jan 31 06:42:01 2018
New Revision: 328616
URL: https://svnweb.freebsd.org/changeset/base/328616

Log:
  PowerNV: fix compilation on non-NV platforms
  
  Submitted by:          Wojciech Macek <wma@semihalf.com>
  Obtained from:         Semihalf
  Sponsored by:          IBM, QCM Technologies

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

Modified: head/sys/powerpc/aim/mp_cpudep.c
==============================================================================
--- head/sys/powerpc/aim/mp_cpudep.c	Wed Jan 31 05:07:43 2018	(r328615)
+++ head/sys/powerpc/aim/mp_cpudep.c	Wed Jan 31 06:42:01 2018	(r328616)
@@ -85,13 +85,15 @@ cpudep_ap_early_bootstrap(void)
 		break;
 	case IBMPOWER8:
 	case IBMPOWER8E:
-		isync();
-		/* Direct interrupts to SRR instead of HSRR and reset LPCR otherwise */
-		mtspr(SPR_LPID, 0);
-		isync();
+		if (mfmsr() & PSL_HV) {
+			isync();
+			/* Direct interrupts to SRR instead of HSRR and reset LPCR otherwise */
+			mtspr(SPR_LPID, 0);
+			isync();
 
-		mtspr(SPR_LPCR, LPCR_LPES);
-		isync();
+			mtspr(SPR_LPCR, LPCR_LPES);
+			isync();
+		}
 		break;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801310642.w0V6g1Am099107>