Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Isaku Yamahata and committed by
Tony Luck
c4312511 53129c5c

+21 -4
+5
arch/ia64/include/asm/native/inst.h
··· 166 166 #define RSM_PSR_DT \ 167 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 174 #define SSM_PSR_DT_AND_SRLZ_I \ 170 175 ssm psr.dt \ 171 176 ;; \
+3
arch/ia64/include/asm/native/pvchk_inst.h
··· 251 251 IS_RREG_CLOB(clob2) 252 252 #define RSM_PSR_DT \ 253 253 nop 0 254 + #define RSM_PSR_BE_I(clob0, clob1) \ 255 + IS_RREG_CLOB(clob0) \ 256 + IS_RREG_CLOB(clob1) 254 257 #define SSM_PSR_DT_AND_SRLZ_I \ 255 258 nop 0 256 259 #define BSW_0(clob0, clob1, clob2) \
+13 -4
arch/ia64/kernel/gate.S
··· 13 13 #include <asm/sigcontext.h> 14 14 #include <asm/system.h> 15 15 #include <asm/unistd.h> 16 + #include "paravirt_inst.h" 16 17 17 18 /* 18 19 * We can't easily refer to symbols inside the kernel. To avoid full runtime relocation, ··· 324 323 epc // B causes split-issue 325 324 } 326 325 ;; 327 - rsm psr.be | psr.i // M2 (5 cyc to srlz.d) 326 + RSM_PSR_BE_I(r20, r22) // M2 (5 cyc to srlz.d) 328 327 LOAD_FSYSCALL_TABLE(r14) // X 329 328 ;; 330 329 mov r16=IA64_KR(CURRENT) // M2 (12 cyc) ··· 332 331 mov r19=NR_syscalls-1 // A 333 332 ;; 334 333 lfetch [r18] // M0|1 335 - mov r29=psr // M2 (12 cyc) 334 + MOV_FROM_PSR(p0, r29, r8) // M2 (12 cyc) 336 335 // If r17 is a NaT, p6 will be zero 337 336 cmp.geu p6,p7=r19,r17 // A (sysnr > 0 && sysnr < 1024+NR_syscalls)? 338 337 ;; ··· 348 347 (p6) tbit.z.unc p8,p0=r18,0 // I0 (dual-issues with "mov b7=r18"!) 349 348 nop.i 0 350 349 ;; 351 - (p8) ssm psr.i 350 + SSM_PSR_I(p8, p14, r25) 352 351 (p6) mov b7=r18 // I0 353 352 (p8) br.dptk.many b7 // B 354 353 ··· 369 368 #else 370 369 BRL_COND_FSYS_BUBBLE_DOWN(p6) 371 370 #endif 372 - ssm psr.i 371 + SSM_PSR_I(p0, p14, r10) 373 372 mov r10=-1 374 373 (p10) mov r8=EINVAL 375 374 (p9) mov r8=ENOSYS 376 375 FSYS_RETURN 376 + 377 + #ifdef CONFIG_PARAVIRT 378 + /* 379 + * padd to make the size of this symbol constant 380 + * independent of paravirtualization. 381 + */ 382 + .align PAGE_SIZE / 8 383 + #endif 377 384 END(__kernel_syscall_via_epc)