svn commit: r344498 - stable/12/sys/powerpc/powerpc
Justin Hibbits
jhibbits at FreeBSD.org
Sun Feb 24 20:49:18 UTC 2019
Author: jhibbits
Date: Sun Feb 24 20:49:16 2019
New Revision: 344498
URL: https://svnweb.freebsd.org/changeset/base/344498
Log:
MFC r343763, r343944, r343946
r343763: powerpc: Don't idle with the wait instruction on booke
r343944: powerpc: Split out the e500mc idling from rest of Book-E
r343946: powerpc: Fix AIM build
Modified:
stable/12/sys/powerpc/powerpc/cpu.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/powerpc/powerpc/cpu.c
==============================================================================
--- stable/12/sys/powerpc/powerpc/cpu.c Sun Feb 24 20:29:11 2019 (r344497)
+++ stable/12/sys/powerpc/powerpc/cpu.c Sun Feb 24 20:49:16 2019 (r344498)
@@ -89,6 +89,9 @@ int powerpc_pow_enabled;
void (*cpu_idle_hook)(sbintime_t) = NULL;
static void cpu_idle_60x(sbintime_t);
static void cpu_idle_booke(sbintime_t);
+#ifdef BOOKE_E500
+static void cpu_idle_e500mc(sbintime_t sbt);
+#endif
#if defined(__powerpc64__) && defined(AIM)
static void cpu_idle_powerx(sbintime_t);
static void cpu_idle_power9(sbintime_t);
@@ -585,10 +588,12 @@ cpu_booke_setup(int cpuid, uint16_t vers)
switch (vers) {
case FSL_E500mc:
bitmask = HID0_E500MC_BITMASK;
+ cpu_idle_hook = cpu_idle_e500mc;
break;
case FSL_E5500:
case FSL_E6500:
bitmask = HID0_E5500_BITMASK;
+ cpu_idle_hook = cpu_idle_e500mc;
break;
case FSL_E500v1:
case FSL_E500v2:
@@ -753,31 +758,28 @@ cpu_idle_60x(sbintime_t sbt)
#endif
}
+#ifdef BOOKE_E500
static void
+cpu_idle_e500mc(sbintime_t sbt)
+{
+ /*
+ * Base binutils doesn't know what the 'wait' instruction is, so
+ * use the opcode encoding here.
+ */
+ __asm __volatile(".long 0x7c00007c");
+}
+#endif
+
+static void
cpu_idle_booke(sbintime_t sbt)
{
register_t msr;
- uint16_t vers;
msr = mfmsr();
- vers = mfpvr() >> 16;
-#ifdef BOOKE
- switch (vers) {
- case FSL_E500mc:
- case FSL_E5500:
- case FSL_E6500:
- /*
- * Base binutils doesn't know what the 'wait' instruction is, so
- * use the opcode encoding here.
- */
- __asm __volatile(".long 0x7c00007c");
- break;
- default:
- powerpc_sync();
- mtmsr(msr | PSL_WE);
- break;
- }
+#ifdef BOOKE_E500
+ powerpc_sync();
+ mtmsr(msr | PSL_WE);
#endif
}
More information about the svn-src-stable-12
mailing list