Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/oea Only execute dssall when the CPU has th...
details: https://anonhg.NetBSD.org/src/rev/a5f4f26f8979
branches: trunk
changeset: 838184:a5f4f26f8979
user: phx <phx%NetBSD.org@localhost>
date: Sun Jan 06 11:20:53 2019 +0000
description:
Only execute dssall when the CPU has the Altivec instruction set extension.
diffstat:
sys/arch/powerpc/oea/cpu_subr.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (34 lines):
diff -r eb078a828dee -r a5f4f26f8979 sys/arch/powerpc/oea/cpu_subr.c
--- a/sys/arch/powerpc/oea/cpu_subr.c Sun Jan 06 11:08:34 2019 +0000
+++ b/sys/arch/powerpc/oea/cpu_subr.c Sun Jan 06 11:20:53 2019 +0000
@@ -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 @@
if (powersave <= 0)
return;
+#if defined(_ARCH_PPC64) || defined (PPC_OEA64_BRIDGE)
+ if (cpu_altivec)
+ __asm volatile("dssall");
+#endif
+
__asm volatile(
-#if defined(_ARCH_PPC64) || defined (PPC_OEA64_BRIDGE)
- "dssall;"
-#endif
"sync;"
"mfmsr %0;"
"oris %0,%0,%1@h;" /* enter power saving mode */
Home |
Main Index |
Thread Index |
Old Index