summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/exception-64s.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-05 14:27:11 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-20 11:03:23 +1000
commitb3e6b5dfcf0974069a8ddcce7dd071120d20d79c (patch)
tree96b8b9446ad134d9aab9021d97c292c0fafd8e90 /arch/powerpc/include/asm/exception-64s.h
parenta5d4f3ad3a28cf046836b9bfae61d532b8f77036 (diff)
downloadop-kernel-dev-b3e6b5dfcf0974069a8ddcce7dd071120d20d79c.zip
op-kernel-dev-b3e6b5dfcf0974069a8ddcce7dd071120d20d79c.tar.gz
powerpc: More work to support HV exceptions
Rework exception macros a bit to split offset from vector and add some basic support for HDEC, HDSI, HISI and a few more. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/exception-64s.h')
-rw-r--r--arch/powerpc/include/asm/exception-64s.h37
1 files changed, 24 insertions, 13 deletions
diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
index 1d98e05..fb5b0af 100644
--- a/arch/powerpc/include/asm/exception-64s.h
+++ b/arch/powerpc/include/asm/exception-64s.h
@@ -150,28 +150,27 @@
/*
* Exception vectors.
*/
-#define STD_EXCEPTION_PSERIES(n, label) \
- . = n; \
+#define STD_EXCEPTION_PSERIES(loc, vec, label) \
+ . = loc; \
.globl label##_pSeries; \
label##_pSeries: \
HMT_MEDIUM; \
- DO_KVM n; \
+ DO_KVM vec; \
mtspr SPRN_SPRG_SCRATCH0,r13; /* save r13 */ \
EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common, EXC_STD)
-#define HSTD_EXCEPTION_PSERIES(n, label) \
- . = n; \
- .globl label##_pSeries; \
-label##_pSeries: \
+#define STD_EXCEPTION_HV(loc, vec, label) \
+ . = loc; \
+ .globl label##_hv; \
+label##_hv: \
HMT_MEDIUM; \
- DO_KVM n; \
+ DO_KVM vec; \
mtspr SPRN_SPRG_HSCRATCH0,r13;/* save r13 */ \
EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, label##_common, EXC_HV)
-
-#define __MASKABLE_EXCEPTION_PSERIES(n, label, h) \
+#define __MASKABLE_EXCEPTION_PSERIES(vec, label, h) \
HMT_MEDIUM; \
- DO_KVM n; \
+ DO_KVM vec; \
mtspr SPRN_SPRG_##h##SCRATCH0,r13; /* save r13 */ \
GET_PACA(r13); \
std r9,PACA_EXGEN+EX_R9(r13); /* save r9, r10 */ \
@@ -193,8 +192,20 @@ label##_pSeries: \
mtspr SPRN_##h##SRR1,r10; \
h##rfid; \
b . /* prevent speculative execution */
-#define MASKABLE_EXCEPTION_PSERIES(n, label, h) \
- __MASKABLE_EXCEPTION_PSERIES(n, label, h)
+#define _MASKABLE_EXCEPTION_PSERIES(vec, label, h) \
+ __MASKABLE_EXCEPTION_PSERIES(vec, label, h)
+
+#define MASKABLE_EXCEPTION_PSERIES(loc, vec, label) \
+ . = loc; \
+ .globl label##_pSeries; \
+label##_pSeries: \
+ _MASKABLE_EXCEPTION_PSERIES(vec, label, EXC_STD)
+
+#define MASKABLE_EXCEPTION_HV(loc, vec, label) \
+ . = loc; \
+ .globl label##_hv; \
+label##_hv: \
+ _MASKABLE_EXCEPTION_PSERIES(vec, label, EXC_HV)
#ifdef CONFIG_PPC_ISERIES
#define DISABLE_INTS \
OpenPOWER on IntegriCloud