Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Fix octeon_reset_vector to work in non-MP...
details: https://anonhg.NetBSD.org/src/rev/9e84a27f7dbe
branches: trunk
changeset: 338789:9e84a27f7dbe
user: matt <matt%NetBSD.org@localhost>
date: Mon Jun 08 14:24:20 2015 +0000
description:
Fix octeon_reset_vector to work in non-MP kernels.
diffstat:
sys/arch/mips/mips/locore_octeon.S | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (48 lines):
diff -r bf0a9ad6d94e -r 9e84a27f7dbe sys/arch/mips/mips/locore_octeon.S
--- a/sys/arch/mips/mips/locore_octeon.S Mon Jun 08 12:38:57 2015 +0000
+++ b/sys/arch/mips/mips/locore_octeon.S Mon Jun 08 14:24:20 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore_octeon.S,v 1.5 2015/06/07 08:03:10 matt Exp $ */
+/* $NetBSD: locore_octeon.S,v 1.6 2015/06/08 14:24:20 matt Exp $ */
/*
* Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -27,7 +27,7 @@
*/
#include <mips/asm.h>
-RCSID("$NetBSD: locore_octeon.S,v 1.5 2015/06/07 08:03:10 matt Exp $")
+RCSID("$NetBSD: locore_octeon.S,v 1.6 2015/06/08 14:24:20 matt Exp $")
#include "cpunode.h" /* for NWDOG */
#include "opt_cputype.h"
@@ -154,6 +154,7 @@
j _C_LABEL(cpu_trampoline)
nop
END(octeon_cpu_spinup)
+#endif /* MULTIPROCESSOR */
#if NWDOG > 0 || defined(DDB)
@@ -167,12 +168,16 @@
ins k0, zero, V_MIPS_SR_BEV, 1 # clear boot exception vectors
mtc0 k0, MIPS_COP_0_STATUS # write cp0 status
ehb # hazard barrier
+#ifdef MULTIPROCESSOR
mfc0 k0, MIPS_COP_0_EBASE # get EBASE
ext k0, k0, 0, 10 # select cpunum
dsll k0, k0, PTR_SCALESHIFT # cpunum -> array index
PTR_LA k1, _C_LABEL(cpuid_infos)
PTR_ADDU k1, k1, k0 # add to array start
PTR_L k0, (k1) # get cpu_info
+#else
+ PTR_LA k0, _C_LABEL(cpu_info_store) # get cpu_info
+#endif
PTR_LA k1, CIU_BASE # CIU base
j _C_LABEL(mips64r2_kern_nonmaskable_intr)
sd zero, CIU_NMI_OFFSET(k1)# clear NMI
@@ -188,4 +193,3 @@
nop
END(octeon_reset_vector)
#endif
-#endif /* MULTIPROCESSOR */
Home |
Main Index |
Thread Index |
Old Index