direct-io.hg

changeset 13486:43115ffc6635

[IA64] Paravirtualize syscall path in file fsys.S

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
author awilliam@xenbuild2.aw
date Tue Jan 16 12:01:03 2007 -0700 (2007-01-16)
parents 7a2c224a9252
children 2056bc71fa55
files linux-2.6-xen-sparse/arch/ia64/kernel/fsys.S
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/kernel/fsys.S	Tue Jan 16 11:51:45 2007 -0700
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/fsys.S	Tue Jan 16 12:01:03 2007 -0700
     1.3 @@ -516,11 +516,34 @@ ENTRY(fsys_fallback_syscall)
     1.4  	adds r17=-1024,r15
     1.5  	movl r14=sys_call_table
     1.6  	;;
     1.7 +#ifdef CONFIG_XEN
     1.8 +	movl r18=running_on_xen;;
     1.9 +	ld4 r18=[r18];;
    1.10 +	// p14 = running_on_xen
    1.11 +	// p15 = !running_on_xen
    1.12 +	cmp.ne p14,p15=r0,r18
    1.13 +	;;    
    1.14 +(p14)	movl r18=XSI_PSR_I_ADDR;;
    1.15 +(p14)	ld8 r18=[r18]
    1.16 +(p14)	mov r29=1;;
    1.17 +(p14)	st1 [r18]=r29
    1.18 +(p15)	rsm psr.i
    1.19 +#else    
    1.20  	rsm psr.i
    1.21 +#endif    
    1.22  	shladd r18=r17,3,r14
    1.23  	;;
    1.24  	ld8 r18=[r18]				// load normal (heavy-weight) syscall entry-point
    1.25 +#ifdef CONFIG_XEN
    1.26 +(p14)	mov r27=r8
    1.27 +(p14)	XEN_HYPER_GET_PSR
    1.28 +	;;
    1.29 +(p14)	mov r29=r8
    1.30 +(p14)	mov r8=r27
    1.31 +(p15)	mov r29=psr				// read psr (12 cyc load latency)
    1.32 +#else    
    1.33  	mov r29=psr				// read psr (12 cyc load latency)
    1.34 +#endif    
    1.35  	mov r27=ar.rsc
    1.36  	mov r21=ar.fpsr
    1.37  	mov r26=ar.pfs
    1.38 @@ -632,7 +655,25 @@ GLOBAL_ENTRY(fsys_bubble_down)
    1.39  	mov rp=r14				// I0   set the real return addr
    1.40  	and r3=_TIF_SYSCALL_TRACEAUDIT,r3	// A
    1.41  	;;
    1.42 +#ifdef CONFIG_XEN
    1.43 +	movl r14=running_on_xen;;
    1.44 +	ld4 r14=[r14];;
    1.45 +	// p14 = running_on_xen
    1.46 +	// p15 = !running_on_xen
    1.47 +	cmp.ne p14,p15=r0,r14
    1.48 +	;; 
    1.49 +(p14)	movl r28=XSI_PSR_I_ADDR;;
    1.50 +(p14)	ld8 r28=[r28];;
    1.51 +(p14)	adds r28=-1,r28;;			// event_pending
    1.52 +(p14)	ld1 r14=[r28];;
    1.53 +(p14)	cmp.ne.unc p13,p14=r14,r0;;
    1.54 +(p13)	XEN_HYPER_SSM_I
    1.55 +(p14)	adds r28=1,r28;;			// event_mask
    1.56 +(p14)	st1 [r28]=r0;;
    1.57 +(p15)	ssm psr.i
    1.58 +#else
    1.59  	ssm psr.i				// M2   we're on kernel stacks now, reenable irqs
    1.60 +#endif    
    1.61  	cmp.eq p8,p0=r3,r0			// A
    1.62  (p10)	br.cond.spnt.many ia64_ret_from_syscall	// B    return if bad call-frame or r15 is a NaT
    1.63