ia64/xen-unstable

changeset 16767:ed7d55e8cd34

[IA64] Fix ia64_swith_to() so that it doesn't check with init_task

init_task isn't used directly so that comparison with init_task in
ia64_switch_to() is pointless. Remove the comparison.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Thu Jan 17 12:05:43 2008 -0700 (2008-01-17)
parents 8909a5717cd7
children fb47d7f0d84b
files xen/arch/ia64/linux-xen/entry.S
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/entry.S	Thu Jan 17 12:05:43 2008 -0700
     1.2 +++ b/xen/arch/ia64/linux-xen/entry.S	Thu Jan 17 12:05:43 2008 -0700
     1.3 @@ -194,13 +194,13 @@ GLOBAL_ENTRY(ia64_switch_to)
     1.4  	.body
     1.5  
     1.6  	adds r22=IA64_TASK_THREAD_KSP_OFFSET,r13
     1.7 -	movl r25=init_task
     1.8  #ifdef XEN
     1.9  	movl r27=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_STACK_OFFSET;;
    1.10  	ld8 r27=[r27]
    1.11  	adds r21=IA64_TASK_THREAD_KSP_OFFSET,in0
    1.12  	dep r20=0,in0,60,4		// physical address of "next"
    1.13  #else
    1.14 +	movl r25=init_task
    1.15  	mov r27=IA64_KR(CURRENT_STACK)
    1.16  	adds r21=IA64_TASK_THREAD_KSP_OFFSET,in0
    1.17  	dep r20=0,in0,61,3		// physical address of "next"
    1.18 @@ -208,6 +208,14 @@ GLOBAL_ENTRY(ia64_switch_to)
    1.19  	;;
    1.20  	st8 [r22]=sp			// save kernel stack pointer of old task
    1.21  	shr.u r26=r20,IA64_GRANULE_SHIFT
    1.22 +#ifdef XEN
    1.23 +	;;
    1.24 +	/*
    1.25 +	 * If we've already mapped this task's page, we can skip doing it again.
    1.26 +	 */
    1.27 +	cmp.eq p7,p6=r26,r27
    1.28 +	br.cond.dpnt .map
    1.29 +#else	
    1.30  	cmp.eq p7,p6=r25,in0
    1.31  	;;
    1.32  	/*
    1.33 @@ -215,6 +223,7 @@ GLOBAL_ENTRY(ia64_switch_to)
    1.34  	 */
    1.35  (p6)	cmp.eq p7,p6=r26,r27
    1.36  (p6)	br.cond.dpnt .map
    1.37 +#endif	
    1.38  	;;
    1.39  .done:
    1.40  (p6)	ssm psr.ic			// if we had to map, reenable the psr.ic bit FIRST!!!