Module Name: src
Committed By: phx
Date: Sun Jan 6 11:20:53 UTC 2019
Modified Files:
src/sys/arch/powerpc/oea: cpu_subr.c
Log Message:
Only execute dssall when the CPU has the Altivec instruction set extension.
To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/powerpc/oea/cpu_subr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/powerpc/oea/cpu_subr.c
diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.97 src/sys/arch/powerpc/oea/cpu_subr.c:1.98
--- src/sys/arch/powerpc/oea/cpu_subr.c:1.97 Fri Jun 15 23:11:39 2018
+++ src/sys/arch/powerpc/oea/cpu_subr.c Sun Jan 6 11:20:53 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_subr.c,v 1.97 2018/06/15 23:11:39 uwe Exp $ */
+/* $NetBSD: cpu_subr.c,v 1.98 2019/01/06 11:20:53 phx Exp $ */
/*-
* Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.97 2018/06/15 23:11:39 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.98 2019/01/06 11:20:53 phx Exp $");
#include "opt_ppcparam.h"
#include "opt_ppccache.h"
@@ -329,10 +329,12 @@ cpu_idlespin(void)
if (powersave <= 0)
return;
- __asm volatile(
#if defined(_ARCH_PPC64) || defined (PPC_OEA64_BRIDGE)
- "dssall;"
+ if (cpu_altivec)
+ __asm volatile("dssall");
#endif
+
+ __asm volatile(
"sync;"
"mfmsr %0;"
"oris %0,%0,%1@h;" /* enter power saving mode */