diff options
Diffstat (limited to 'arch/parisc/kernel/real2.S')
-rw-r--r-- | arch/parisc/kernel/real2.S | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/arch/parisc/kernel/real2.S b/arch/parisc/kernel/real2.S index 8dd5defb7316..8c2859cca77e 100644 --- a/arch/parisc/kernel/real2.S +++ b/arch/parisc/kernel/real2.S | |||
@@ -7,8 +7,10 @@ | |||
7 | * Copyright (C) 2000 Hewlett Packard (Paul Bame bame@puffin.external.hp.com) | 7 | * Copyright (C) 2000 Hewlett Packard (Paul Bame bame@puffin.external.hp.com) |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | #include <asm/assembly.h> | 10 | #include <linux/config.h> |
11 | |||
11 | #include <asm/psw.h> | 12 | #include <asm/psw.h> |
13 | #include <asm/assembly.h> | ||
12 | 14 | ||
13 | .section .bss | 15 | .section .bss |
14 | .export real_stack | 16 | .export real_stack |
@@ -20,7 +22,7 @@ real32_stack: | |||
20 | real64_stack: | 22 | real64_stack: |
21 | .block 8192 | 23 | .block 8192 |
22 | 24 | ||
23 | #ifdef __LP64__ | 25 | #ifdef CONFIG_64BIT |
24 | # define REG_SZ 8 | 26 | # define REG_SZ 8 |
25 | #else | 27 | #else |
26 | # define REG_SZ 4 | 28 | # define REG_SZ 4 |
@@ -50,7 +52,7 @@ save_cr_end: | |||
50 | 52 | ||
51 | real32_call_asm: | 53 | real32_call_asm: |
52 | STREG %rp, -RP_OFFSET(%sp) /* save RP */ | 54 | STREG %rp, -RP_OFFSET(%sp) /* save RP */ |
53 | #ifdef __LP64__ | 55 | #ifdef CONFIG_64BIT |
54 | callee_save | 56 | callee_save |
55 | ldo 2*REG_SZ(%sp), %sp /* room for a couple more saves */ | 57 | ldo 2*REG_SZ(%sp), %sp /* room for a couple more saves */ |
56 | STREG %r27, -1*REG_SZ(%sp) | 58 | STREG %r27, -1*REG_SZ(%sp) |
@@ -77,7 +79,7 @@ real32_call_asm: | |||
77 | b,l save_control_regs,%r2 /* modifies r1, r2, r28 */ | 79 | b,l save_control_regs,%r2 /* modifies r1, r2, r28 */ |
78 | nop | 80 | nop |
79 | 81 | ||
80 | #ifdef __LP64__ | 82 | #ifdef CONFIG_64BIT |
81 | rsm PSW_SM_W, %r0 /* go narrow */ | 83 | rsm PSW_SM_W, %r0 /* go narrow */ |
82 | #endif | 84 | #endif |
83 | 85 | ||
@@ -85,7 +87,7 @@ real32_call_asm: | |||
85 | bv 0(%r31) | 87 | bv 0(%r31) |
86 | nop | 88 | nop |
87 | ric_ret: | 89 | ric_ret: |
88 | #ifdef __LP64__ | 90 | #ifdef CONFIG_64BIT |
89 | ssm PSW_SM_W, %r0 /* go wide */ | 91 | ssm PSW_SM_W, %r0 /* go wide */ |
90 | #endif | 92 | #endif |
91 | /* restore CRs before going virtual in case we page fault */ | 93 | /* restore CRs before going virtual in case we page fault */ |
@@ -97,7 +99,7 @@ ric_ret: | |||
97 | 99 | ||
98 | tovirt_r1 %sp | 100 | tovirt_r1 %sp |
99 | LDREG -REG_SZ(%sp), %sp /* restore SP */ | 101 | LDREG -REG_SZ(%sp), %sp /* restore SP */ |
100 | #ifdef __LP64__ | 102 | #ifdef CONFIG_64BIT |
101 | LDREG -1*REG_SZ(%sp), %r27 | 103 | LDREG -1*REG_SZ(%sp), %r27 |
102 | LDREG -2*REG_SZ(%sp), %r29 | 104 | LDREG -2*REG_SZ(%sp), %r29 |
103 | ldo -2*REG_SZ(%sp), %sp | 105 | ldo -2*REG_SZ(%sp), %sp |
@@ -143,24 +145,21 @@ restore_control_regs: | |||
143 | /* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for | 145 | /* rfi_virt2real() and rfi_real2virt() could perhaps be adapted for |
144 | * more general-purpose use by the several places which need RFIs | 146 | * more general-purpose use by the several places which need RFIs |
145 | */ | 147 | */ |
146 | .align 128 | ||
147 | .text | 148 | .text |
149 | .align 128 | ||
148 | rfi_virt2real: | 150 | rfi_virt2real: |
149 | /* switch to real mode... */ | 151 | /* switch to real mode... */ |
150 | ssm 0,0 /* See "relied upon translation" */ | 152 | rsm PSW_SM_I,%r0 |
151 | nop /* PA 2.0 Arch. F-5 */ | 153 | load32 PA(rfi_v2r_1), %r1 |
152 | nop | ||
153 | nop | ||
154 | nop | 154 | nop |
155 | nop | 155 | nop |
156 | nop | 156 | nop |
157 | nop | 157 | nop |
158 | nop | 158 | nop |
159 | 159 | ||
160 | rsm (PSW_SM_Q|PSW_SM_I),%r0 /* disable Q & I bits to load iia queue */ | 160 | rsm PSW_SM_Q,%r0 /* disable Q & I bits to load iia queue */ |
161 | mtctl %r0, %cr17 /* Clear IIASQ tail */ | 161 | mtctl %r0, %cr17 /* Clear IIASQ tail */ |
162 | mtctl %r0, %cr17 /* Clear IIASQ head */ | 162 | mtctl %r0, %cr17 /* Clear IIASQ head */ |
163 | load32 PA(rfi_v2r_1), %r1 | ||
164 | mtctl %r1, %cr18 /* IIAOQ head */ | 163 | mtctl %r1, %cr18 /* IIAOQ head */ |
165 | ldo 4(%r1), %r1 | 164 | ldo 4(%r1), %r1 |
166 | mtctl %r1, %cr18 /* IIAOQ tail */ | 165 | mtctl %r1, %cr18 /* IIAOQ tail */ |
@@ -184,10 +183,8 @@ rfi_v2r_1: | |||
184 | .text | 183 | .text |
185 | .align 128 | 184 | .align 128 |
186 | rfi_real2virt: | 185 | rfi_real2virt: |
187 | ssm 0,0 /* See "relied upon translation" */ | 186 | rsm PSW_SM_I,%r0 |
188 | nop /* PA 2.0 Arch. F-5 */ | 187 | load32 (rfi_r2v_1), %r1 |
189 | nop | ||
190 | nop | ||
191 | nop | 188 | nop |
192 | nop | 189 | nop |
193 | nop | 190 | nop |
@@ -197,7 +194,6 @@ rfi_real2virt: | |||
197 | rsm PSW_SM_Q,%r0 /* disable Q bit to load iia queue */ | 194 | rsm PSW_SM_Q,%r0 /* disable Q bit to load iia queue */ |
198 | mtctl %r0, %cr17 /* Clear IIASQ tail */ | 195 | mtctl %r0, %cr17 /* Clear IIASQ tail */ |
199 | mtctl %r0, %cr17 /* Clear IIASQ head */ | 196 | mtctl %r0, %cr17 /* Clear IIASQ head */ |
200 | load32 (rfi_r2v_1), %r1 | ||
201 | mtctl %r1, %cr18 /* IIAOQ head */ | 197 | mtctl %r1, %cr18 /* IIAOQ head */ |
202 | ldo 4(%r1), %r1 | 198 | ldo 4(%r1), %r1 |
203 | mtctl %r1, %cr18 /* IIAOQ tail */ | 199 | mtctl %r1, %cr18 /* IIAOQ tail */ |
@@ -218,7 +214,7 @@ rfi_r2v_1: | |||
218 | bv 0(%r2) | 214 | bv 0(%r2) |
219 | nop | 215 | nop |
220 | 216 | ||
221 | #ifdef __LP64__ | 217 | #ifdef CONFIG_64BIT |
222 | 218 | ||
223 | /************************ 64-bit real-mode calls ***********************/ | 219 | /************************ 64-bit real-mode calls ***********************/ |
224 | /* This is only usable in wide kernels right now and will probably stay so */ | 220 | /* This is only usable in wide kernels right now and will probably stay so */ |
@@ -296,7 +292,7 @@ pc_in_user_space: | |||
296 | ** comparing function pointers. | 292 | ** comparing function pointers. |
297 | */ | 293 | */ |
298 | __canonicalize_funcptr_for_compare: | 294 | __canonicalize_funcptr_for_compare: |
299 | #ifdef __LP64__ | 295 | #ifdef CONFIG_64BIT |
300 | bve (%r2) | 296 | bve (%r2) |
301 | #else | 297 | #else |
302 | bv %r0(%r2) | 298 | bv %r0(%r2) |