Module Name: src
Committed By: macallan
Date: Fri May 25 23:00:34 UTC 2018
Modified Files:
src/sys/arch/powerpc/include: cpu.h
src/sys/arch/powerpc/oea: cpu_subr.c
Log Message:
copy HID1 from the boot CPU to secondary CPUs as well on 64bit CPUs
now the 2nd CPU on my G5s runs at full speed
To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/powerpc/include/cpu.h
cvs rdiff -u -r1.93 -r1.94 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/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.105 src/sys/arch/powerpc/include/cpu.h:1.106
--- src/sys/arch/powerpc/include/cpu.h:1.105 Fri May 4 17:01:29 2018
+++ src/sys/arch/powerpc/include/cpu.h Fri May 25 23:00:34 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.105 2018/05/04 17:01:29 macallan Exp $ */
+/* $NetBSD: cpu.h,v 1.106 2018/05/25 23:00:34 macallan Exp $ */
/*
* Copyright (C) 1999 Wolfgang Solfrank.
@@ -164,6 +164,7 @@ struct cpu_hatch_data {
uint32_t hatch_tbl;
#if defined(PPC_OEA64_BRIDGE) || defined (_ARCH_PPC64)
uint64_t hatch_hid0;
+ uint64_t hatch_hid1;
uint64_t hatch_hid4;
uint64_t hatch_hid5;
#else
Index: src/sys/arch/powerpc/oea/cpu_subr.c
diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.93 src/sys/arch/powerpc/oea/cpu_subr.c:1.94
--- src/sys/arch/powerpc/oea/cpu_subr.c:1.93 Fri May 4 17:01:29 2018
+++ src/sys/arch/powerpc/oea/cpu_subr.c Fri May 25 23:00:34 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_subr.c,v 1.93 2018/05/04 17:01:29 macallan Exp $ */
+/* $NetBSD: cpu_subr.c,v 1.94 2018/05/25 23:00:34 macallan Exp $ */
/*-
* Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.93 2018/05/04 17:01:29 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.94 2018/05/25 23:00:34 macallan Exp $");
#include "opt_ppcparam.h"
#include "opt_ppccache.h"
@@ -1316,6 +1316,7 @@ cpu_spinup(device_t self, struct cpu_inf
h->hatch_hid0 = mfspr(SPR_HID0);
#if defined(PPC_OEA64_BRIDGE) || defined (_ARCH_PPC64)
+ h->hatch_hid1 = mfspr(SPR_HID1);
h->hatch_hid4 = mfspr(SPR_HID4);
h->hatch_hid5 = mfspr(SPR_HID5);
printf("HIDs: %016llx %016llx\n", h->hatch_hid4, h->hatch_hid5);
@@ -1439,6 +1440,7 @@ cpu_hatch(void)
if ((oeacpufeat & OEACPU_64_BRIDGE) != 0) {
mtspr64(SPR_HID0, h->hatch_hid0);
+ mtspr64(SPR_HID1, h->hatch_hid1);
mtspr64(SPR_HID4, h->hatch_hid4);
mtspr64(SPR_HID5, h->hatch_hid5);
mtspr64(SPR_HIOR, 0);