use mtspr64() in bridge mode

This commit is contained in:
macallan 2018-02-16 18:02:10 +00:00
parent e34e5e3adb
commit 404ba8a804

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu_subr.c,v 1.88 2018/01/21 08:46:48 mrg Exp $ */
/* $NetBSD: cpu_subr.c,v 1.89 2018/02/16 18:02:10 macallan Exp $ */
/*-
* Copyright (c) 2001 Matt Thomas.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.88 2018/01/21 08:46:48 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.89 2018/02/16 18:02:10 macallan Exp $");
#include "opt_ppcparam.h"
#include "opt_ppccache.h"
@ -644,17 +644,7 @@ cpu_setup(device_t self, struct cpu_info *ci)
if ((oeacpufeat & OEACPU_64_BRIDGE) != 0) {
#endif
if (hid64_0 != hid64_0_save) {
/* ppc970 needs extra goop around writes to HID0 */
__asm volatile( "sync;" \
"mtspr %0,%1;" \
"mfspr %1,%0;" \
"mfspr %1,%0;" \
"mfspr %1,%0;" \
"mfspr %1,%0;" \
"mfspr %1,%0;" \
"mfspr %1,%0;" \
: : "K"(SPR_HID0), "r"(hid64_0));
__asm volatile("sync;isync");
mtspr64(SPR_HID0, hid64_0);
}
#if defined(PPC_OEA64_BRIDGE)
} else {