diff options
author | Isaku Yamahata <yamahata@valinux.co.jp> | 2009-03-04 07:05:45 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2009-03-26 14:01:46 -0400 |
commit | c4312511ba1f3a08f2f64ca8335882ef56ff9bdd (patch) | |
tree | 28f7daee469542573399da64157b12b8a8345d02 /arch | |
parent | 53129c5c553f8d0c45f12f15742ac112e8605ab5 (diff) |
ia64/pv_ops: paravirtualize gate.S.
paravirtualize gate.S.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/include/asm/native/inst.h | 5 | ||||
-rw-r--r-- | arch/ia64/include/asm/native/pvchk_inst.h | 3 | ||||
-rw-r--r-- | arch/ia64/kernel/gate.S | 17 |
3 files changed, 21 insertions, 4 deletions
diff --git a/arch/ia64/include/asm/native/inst.h b/arch/ia64/include/asm/native/inst.h index ad59fc6a6134..d2d46efb3e6e 100644 --- a/arch/ia64/include/asm/native/inst.h +++ b/arch/ia64/include/asm/native/inst.h | |||
@@ -166,6 +166,11 @@ | |||
166 | #define RSM_PSR_DT \ | 166 | #define RSM_PSR_DT \ |
167 | rsm psr.dt | 167 | rsm psr.dt |
168 | 168 | ||
169 | #define RSM_PSR_BE_I(clob0, clob1) \ | ||
170 | rsm psr.be | psr.i \ | ||
171 | CLOBBER(clob0) \ | ||
172 | CLOBBER(clob1) | ||
173 | |||
169 | #define SSM_PSR_DT_AND_SRLZ_I \ | 174 | #define SSM_PSR_DT_AND_SRLZ_I \ |
170 | ssm psr.dt \ | 175 | ssm psr.dt \ |
171 | ;; \ | 176 | ;; \ |
diff --git a/arch/ia64/include/asm/native/pvchk_inst.h b/arch/ia64/include/asm/native/pvchk_inst.h index 13b289ea6173..8d72962ec838 100644 --- a/arch/ia64/include/asm/native/pvchk_inst.h +++ b/arch/ia64/include/asm/native/pvchk_inst.h | |||
@@ -251,6 +251,9 @@ | |||
251 | IS_RREG_CLOB(clob2) | 251 | IS_RREG_CLOB(clob2) |
252 | #define RSM_PSR_DT \ | 252 | #define RSM_PSR_DT \ |
253 | nop 0 | 253 | nop 0 |
254 | #define RSM_PSR_BE_I(clob0, clob1) \ | ||
255 | IS_RREG_CLOB(clob0) \ | ||
256 | IS_RREG_CLOB(clob1) | ||
254 | #define SSM_PSR_DT_AND_SRLZ_I \ | 257 | #define SSM_PSR_DT_AND_SRLZ_I \ |
255 | nop 0 | 258 | nop 0 |
256 | #define BSW_0(clob0, clob1, clob2) \ | 259 | #define BSW_0(clob0, clob1, clob2) \ |
diff --git a/arch/ia64/kernel/gate.S b/arch/ia64/kernel/gate.S index c957228e3f1d..cf5e0a105e16 100644 --- a/arch/ia64/kernel/gate.S +++ b/arch/ia64/kernel/gate.S | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/sigcontext.h> | 13 | #include <asm/sigcontext.h> |
14 | #include <asm/system.h> | 14 | #include <asm/system.h> |
15 | #include <asm/unistd.h> | 15 | #include <asm/unistd.h> |
16 | #include "paravirt_inst.h" | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * We can't easily refer to symbols inside the kernel. To avoid full runtime relocation, | 19 | * We can't easily refer to symbols inside the kernel. To avoid full runtime relocation, |
@@ -323,7 +324,7 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) | |||
323 | epc // B causes split-issue | 324 | epc // B causes split-issue |
324 | } | 325 | } |
325 | ;; | 326 | ;; |
326 | rsm psr.be | psr.i // M2 (5 cyc to srlz.d) | 327 | RSM_PSR_BE_I(r20, r22) // M2 (5 cyc to srlz.d) |
327 | LOAD_FSYSCALL_TABLE(r14) // X | 328 | LOAD_FSYSCALL_TABLE(r14) // X |
328 | ;; | 329 | ;; |
329 | mov r16=IA64_KR(CURRENT) // M2 (12 cyc) | 330 | mov r16=IA64_KR(CURRENT) // M2 (12 cyc) |
@@ -331,7 +332,7 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) | |||
331 | mov r19=NR_syscalls-1 // A | 332 | mov r19=NR_syscalls-1 // A |
332 | ;; | 333 | ;; |
333 | lfetch [r18] // M0|1 | 334 | lfetch [r18] // M0|1 |
334 | mov r29=psr // M2 (12 cyc) | 335 | MOV_FROM_PSR(p0, r29, r8) // M2 (12 cyc) |
335 | // If r17 is a NaT, p6 will be zero | 336 | // If r17 is a NaT, p6 will be zero |
336 | cmp.geu p6,p7=r19,r17 // A (sysnr > 0 && sysnr < 1024+NR_syscalls)? | 337 | cmp.geu p6,p7=r19,r17 // A (sysnr > 0 && sysnr < 1024+NR_syscalls)? |
337 | ;; | 338 | ;; |
@@ -347,7 +348,7 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) | |||
347 | (p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!) | 348 | (p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!) |
348 | nop.i 0 | 349 | nop.i 0 |
349 | ;; | 350 | ;; |
350 | (p8) ssm psr.i | 351 | SSM_PSR_I(p8, p14, r25) |
351 | (p6) mov b7=r18 // I0 | 352 | (p6) mov b7=r18 // I0 |
352 | (p8) br.dptk.many b7 // B | 353 | (p8) br.dptk.many b7 // B |
353 | 354 | ||
@@ -368,9 +369,17 @@ GLOBAL_ENTRY(__kernel_syscall_via_epc) | |||
368 | #else | 369 | #else |
369 | BRL_COND_FSYS_BUBBLE_DOWN(p6) | 370 | BRL_COND_FSYS_BUBBLE_DOWN(p6) |
370 | #endif | 371 | #endif |
371 | ssm psr.i | 372 | SSM_PSR_I(p0, p14, r10) |
372 | mov r10=-1 | 373 | mov r10=-1 |
373 | (p10) mov r8=EINVAL | 374 | (p10) mov r8=EINVAL |
374 | (p9) mov r8=ENOSYS | 375 | (p9) mov r8=ENOSYS |
375 | FSYS_RETURN | 376 | FSYS_RETURN |
377 | |||
378 | #ifdef CONFIG_PARAVIRT | ||
379 | /* | ||
380 | * padd to make the size of this symbol constant | ||
381 | * independent of paravirtualization. | ||
382 | */ | ||
383 | .align PAGE_SIZE / 8 | ||
384 | #endif | ||
376 | END(__kernel_syscall_via_epc) | 385 | END(__kernel_syscall_via_epc) |