aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/iseries
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-08-21 23:48:37 -0400
committerPaul Mackerras <paulus@samba.org>2007-08-22 02:48:35 -0400
commit7180e3e636deff82f8810291878a184f21142fa9 (patch)
tree00e6e833269df0dbcaa7b11059fa5c0a7e446812 /arch/powerpc/platforms/iseries
parentdc8f571a26689102f6abe2565a84226edeaacc61 (diff)
[POWERPC] Split out iSeries specific exception macros
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/iseries')
-rw-r--r--arch/powerpc/platforms/iseries/exception.S15
-rw-r--r--arch/powerpc/platforms/iseries/exception.h58
2 files changed, 66 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/iseries/exception.S b/arch/powerpc/platforms/iseries/exception.S
index b5f600616ade..e9a3435b3c18 100644
--- a/arch/powerpc/platforms/iseries/exception.S
+++ b/arch/powerpc/platforms/iseries/exception.S
@@ -30,9 +30,10 @@
30#include <asm/asm-offsets.h> 30#include <asm/asm-offsets.h>
31#include <asm/thread_info.h> 31#include <asm/thread_info.h>
32#include <asm/ptrace.h> 32#include <asm/ptrace.h>
33#include <asm/exception.h>
34#include <asm/cputable.h> 33#include <asm/cputable.h>
35 34
35#include "exception.h"
36
36 .text 37 .text
37 38
38 .globl system_reset_iSeries 39 .globl system_reset_iSeries
@@ -104,15 +105,15 @@ BEGIN_FTR_SECTION
104 mtcrf 0x80,r12 105 mtcrf 0x80,r12
105 mfspr r12,SPRN_SPRG2 106 mfspr r12,SPRN_SPRG2
106END_FTR_SECTION_IFCLR(CPU_FTR_SLB) 107END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
107 EXCEPTION_PROLOG_ISERIES_1(PACA_EXGEN) 108 EXCEPTION_PROLOG_1(PACA_EXGEN)
108 EXCEPTION_PROLOG_ISERIES_2 109 EXCEPTION_PROLOG_ISERIES_1
109 b data_access_common 110 b data_access_common
110 111
111.do_stab_bolted_iSeries: 112.do_stab_bolted_iSeries:
112 mtcrf 0x80,r12 113 mtcrf 0x80,r12
113 mfspr r12,SPRN_SPRG2 114 mfspr r12,SPRN_SPRG2
114 EXCEPTION_PROLOG_ISERIES_1(PACA_EXSLB) 115 EXCEPTION_PROLOG_1(PACA_EXSLB)
115 EXCEPTION_PROLOG_ISERIES_2 116 EXCEPTION_PROLOG_ISERIES_1
116 b .do_stab_bolted 117 b .do_stab_bolted
117 118
118 .globl data_access_slb_iSeries 119 .globl data_access_slb_iSeries
@@ -171,7 +172,7 @@ slb_miss_user_iseries:
171 std r10,PACA_EXGEN+EX_R13(r13) 172 std r10,PACA_EXGEN+EX_R13(r13)
172 std r11,PACA_EXGEN+EX_R9(r13) 173 std r11,PACA_EXGEN+EX_R9(r13)
173 std r12,PACA_EXGEN+EX_R3(r13) 174 std r12,PACA_EXGEN+EX_R3(r13)
174 EXCEPTION_PROLOG_ISERIES_2 175 EXCEPTION_PROLOG_ISERIES_1
175 b slb_miss_user_common 176 b slb_miss_user_common
176#endif 177#endif
177 178
@@ -187,7 +188,7 @@ slb_miss_user_iseries:
187system_call_iSeries: 188system_call_iSeries:
188 mr r9,r13 189 mr r9,r13
189 mfspr r13,SPRN_SPRG3 190 mfspr r13,SPRN_SPRG3
190 EXCEPTION_PROLOG_ISERIES_2 191 EXCEPTION_PROLOG_ISERIES_1
191 b system_call_common 192 b system_call_common
192 193
193 STD_EXCEPTION_ISERIES( 0xd00, single_step, PACA_EXGEN) 194 STD_EXCEPTION_ISERIES( 0xd00, single_step, PACA_EXGEN)
diff --git a/arch/powerpc/platforms/iseries/exception.h b/arch/powerpc/platforms/iseries/exception.h
new file mode 100644
index 000000000000..5b3f285e8168
--- /dev/null
+++ b/arch/powerpc/platforms/iseries/exception.h
@@ -0,0 +1,58 @@
1#ifndef _ASM_POWERPC_ISERIES_EXCEPTION_H
2#define _ASM_POWERPC_ISERIES_EXCEPTION_H
3/*
4 * Extracted from head_64.S
5 *
6 * PowerPC version
7 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
8 *
9 * Rewritten by Cort Dougan (cort@cs.nmt.edu) for PReP
10 * Copyright (C) 1996 Cort Dougan <cort@cs.nmt.edu>
11 * Adapted for Power Macintosh by Paul Mackerras.
12 * Low-level exception handlers and MMU support
13 * rewritten by Paul Mackerras.
14 * Copyright (C) 1996 Paul Mackerras.
15 *
16 * Adapted for 64bit PowerPC by Dave Engebretsen, Peter Bergner, and
17 * Mike Corrigan {engebret|bergner|mikejc}@us.ibm.com
18 *
19 * This file contains the low-level support and setup for the
20 * PowerPC-64 platform, including trap and interrupt dispatch.
21 *
22 * This program is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU General Public License
24 * as published by the Free Software Foundation; either version
25 * 2 of the License, or (at your option) any later version.
26 */
27#include <asm/exception.h>
28
29#define EXCEPTION_PROLOG_ISERIES_1 \
30 mfmsr r10; \
31 ld r12,PACALPPACAPTR(r13); \
32 ld r11,LPPACASRR0(r12); \
33 ld r12,LPPACASRR1(r12); \
34 ori r10,r10,MSR_RI; \
35 mtmsrd r10,1
36
37#define STD_EXCEPTION_ISERIES(n, label, area) \
38 .globl label##_iSeries; \
39label##_iSeries: \
40 HMT_MEDIUM; \
41 mtspr SPRN_SPRG1,r13; /* save r13 */ \
42 EXCEPTION_PROLOG_1(area); \
43 EXCEPTION_PROLOG_ISERIES_1; \
44 b label##_common
45
46#define MASKABLE_EXCEPTION_ISERIES(n, label) \
47 .globl label##_iSeries; \
48label##_iSeries: \
49 HMT_MEDIUM; \
50 mtspr SPRN_SPRG1,r13; /* save r13 */ \
51 EXCEPTION_PROLOG_1(PACA_EXGEN); \
52 lbz r10,PACASOFTIRQEN(r13); \
53 cmpwi 0,r10,0; \
54 beq- label##_iSeries_masked; \
55 EXCEPTION_PROLOG_ISERIES_1; \
56 b label##_common; \
57
58#endif /* _ASM_POWERPC_ISERIES_EXCEPTION_H */