svn commit: r215123 - stable/8/sys/powerpc/aim
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Thu Nov 11 14:13:57 UTC 2010
Author: nwhitehorn
Date: Thu Nov 11 14:13:56 2010
New Revision: 215123
URL: http://svn.freebsd.org/changeset/base/215123
Log:
MFC r198588:
Turn off Altivec data-stream prefetching before going into power-save
mode on those CPUs that need it.
Modified:
stable/8/sys/powerpc/aim/machdep.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/powerpc/aim/machdep.c
==============================================================================
--- stable/8/sys/powerpc/aim/machdep.c Thu Nov 11 13:48:48 2010 (r215122)
+++ stable/8/sys/powerpc/aim/machdep.c Thu Nov 11 14:13:56 2010 (r215123)
@@ -614,8 +614,10 @@ void
cpu_idle(int busy)
{
uint32_t msr;
+ uint16_t vers;
msr = mfmsr();
+ vers = mfpvr() >> 16;
#ifdef INVARIANTS
if ((msr & PSL_EE) != PSL_EE) {
@@ -625,9 +627,25 @@ cpu_idle(int busy)
}
#endif
if (powerpc_pow_enabled) {
- powerpc_sync();
- mtmsr(msr | PSL_POW);
- isync();
+ switch (vers) {
+ case IBM970:
+ case IBM970FX:
+ case IBM970MP:
+ case MPC7447A:
+ case MPC7448:
+ case MPC7450:
+ case MPC7455:
+ case MPC7457:
+ __asm __volatile("\
+ dssall; sync; mtmsr %0; isync"
+ :: "r"(msr | PSL_POW));
+ break;
+ default:
+ powerpc_sync();
+ mtmsr(msr | PSL_POW);
+ isync();
+ break;
+ }
}
}
More information about the svn-src-stable
mailing list