Mon Jul 6 10:16:12 2020 UTC ()
Include required opt_*.h for sure.


(rin)
diff -r1.12 -r1.13 src/sys/arch/powerpc/booke/trap_subr.S

cvs diff -r1.12 -r1.13 src/sys/arch/powerpc/booke/trap_subr.S (expand / switch to unified diff)

--- src/sys/arch/powerpc/booke/trap_subr.S 2015/01/26 04:47:53 1.12
+++ src/sys/arch/powerpc/booke/trap_subr.S 2020/07/06 10:16:12 1.13
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: trap_subr.S,v 1.12 2015/01/26 04:47:53 nonaka Exp $ */ 1/* $NetBSD: trap_subr.S,v 1.13 2020/07/06 10:16:12 rin Exp $ */
2/*- 2/*-
3 * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. 3 * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * This code is derived from software contributed to The NetBSD Foundation 6 * This code is derived from software contributed to The NetBSD Foundation
7 * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects 7 * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects
8 * Agency and which was developed by Matt Thomas of 3am Software Foundry. 8 * Agency and which was developed by Matt Thomas of 3am Software Foundry.
9 * 9 *
10 * This material is based upon work supported by the Defense Advanced Research 10 * This material is based upon work supported by the Defense Advanced Research
11 * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under 11 * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under
12 * Contract No. N66001-09-C-2073. 12 * Contract No. N66001-09-C-2073.
13 * Approved for Public Release, Distribution Unlimited 13 * Approved for Public Release, Distribution Unlimited
14 * 14 *
@@ -24,27 +24,34 @@ @@ -24,27 +24,34 @@
24 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 24 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
25 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 25 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 26 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 27 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
28 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE. 34 * POSSIBILITY OF SUCH DAMAGE.
35 */ 35 */
36 36
37RCSID("$NetBSD: trap_subr.S,v 1.12 2015/01/26 04:47:53 nonaka Exp $") 37RCSID("$NetBSD: trap_subr.S,v 1.13 2020/07/06 10:16:12 rin Exp $")
 38
 39#ifdef _KERNEL_OPT
 40#include "opt_altivec.h"
 41#include "opt_ddb.h"
 42#include "opt_mpc85xx.h"
 43#include "opt_multiprocessor.h"
 44#endif
38 45
39 .globl _C_LABEL(sctrapexit), _C_LABEL(trapexit), _C_LABEL(intrcall) 46 .globl _C_LABEL(sctrapexit), _C_LABEL(trapexit), _C_LABEL(intrcall)
40 47
41 /* 48 /*
42 * We have a problem with critical (MSR[CE] or machine check (MSR[ME]) 49 * We have a problem with critical (MSR[CE] or machine check (MSR[ME])
43 * or debug (MSR[DE]) interrupts/exception in that they could happen 50 * or debug (MSR[DE]) interrupts/exception in that they could happen
44 * inbetween the mtsprg1 %r2 and mfsprg1 %r2. If that happens, %r2 51 * inbetween the mtsprg1 %r2 and mfsprg1 %r2. If that happens, %r2
45 * will be lost. Even if we moved to a different sprg, subsequent 52 * will be lost. Even if we moved to a different sprg, subsequent
46 * expceptions would use SPRG1 and its value would be lost. The only 53 * expceptions would use SPRG1 and its value would be lost. The only
47 * way to be safe for CE/ME/DE faults to save and restore SPRG1. 54 * way to be safe for CE/ME/DE faults to save and restore SPRG1.
48 * 55 *
49 * Since CE/ME/DE faults may happen anytime, we need r1 to always 56 * Since CE/ME/DE faults may happen anytime, we need r1 to always
50 * contain a valid kernel stack pointer. Therefore we use r2 as 57 * contain a valid kernel stack pointer. Therefore we use r2 as