ia64/xen-unstable

changeset 3382:a6d0ee776c49

bitkeeper revision 1.1159.212.5 (41dd8c833VN1DSNo5vb1QUlsjz5GyA)

Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno/users/cl349/BK/xen-unstable.bk
into arcadians.cl.cam.ac.uk:/local/scratch-2/cl349/xen-unstable.bk-tmp
author cl349@arcadians.cl.cam.ac.uk
date Thu Jan 06 19:07:47 2005 +0000 (2005-01-06)
parents e17a946c7a91 5eccb111a92c
children 3b51a853296f
files linux-2.6.10-xen-sparse/arch/xen/i386/kernel/entry.S
line diff
     1.1 --- a/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/entry.S	Thu Jan 06 13:25:51 2005 +0000
     1.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/entry.S	Thu Jan 06 19:07:47 2005 +0000
     1.3 @@ -91,7 +91,8 @@ VM_MASK		= 0x00020000
     1.4  				shl  $sizeof_vcpu_shift,reg		; \
     1.5  				addl HYPERVISOR_shared_info,reg
     1.6  #define XEN_UNLOCK_VCPU_INFO_SMP(reg) preempt_enable(%ebp)
     1.7 -#define XEN_UNLOCK_VCPU_INFO_SMP_fixup .byte 0x00,0x00,0x00
     1.8 +#define XEN_UNLOCK_VCPU_INFO_SMP_fixup .byte 0xff,0xff,0xff
     1.9 +#define Ux00 0xff
    1.10  #define XEN_BLOCK_EVENTS(reg)	XEN_LOCK_VCPU_INFO_SMP(reg)		; \
    1.11  				movb $1,evtchn_upcall_mask(reg)		; \
    1.12      				XEN_UNLOCK_VCPU_INFO_SMP(reg)
    1.13 @@ -108,6 +109,7 @@ VM_MASK		= 0x00020000
    1.14  #define XEN_LOCK_VCPU_INFO_SMP(reg)
    1.15  #define XEN_UNLOCK_VCPU_INFO_SMP(reg)
    1.16  #define XEN_UNLOCK_VCPU_INFO_SMP_fixup
    1.17 +#define Ux00 0x00
    1.18  #define XEN_BLOCK_EVENTS(reg)	movb $1,evtchn_upcall_mask(reg)
    1.19  #define XEN_UNBLOCK_EVENTS(reg)	movb $0,evtchn_upcall_mask(reg)
    1.20  #define XEN_SAVE_UPCALL_MASK(reg,tmp,off) \
    1.21 @@ -522,24 +524,32 @@ ecrit:  /**** END OF CRITICAL REGION ***
    1.22  critical_region_fixup:
    1.23  	addl $critical_fixup_table-scrit,%eax
    1.24  	movzbl (%eax),%eax		# %eax contains num bytes popped
    1.25 -	mov  %esp,%esi
    1.26 +#ifdef CONFIG_SMP
    1.27 +	cmpb $0xff,%al
    1.28 +	jne  15f
    1.29 +	add  $1,%al
    1.30 +	GET_THREAD_INFO(%ebp)
    1.31 +	XEN_UNLOCK_VCPU_INFO_SMP(%esi)
    1.32 +15:
    1.33 +#endif
    1.34 +    	mov  %esp,%esi
    1.35  	add  %eax,%esi			# %esi points at end of src region
    1.36  	mov  %esp,%edi
    1.37  	add  $0x34,%edi			# %edi points at end of dst region
    1.38  	mov  %eax,%ecx
    1.39  	shr  $2,%ecx			# convert words to bytes
    1.40 -	je   16f			# skip loop if nothing to copy
    1.41 -15:	subl $4,%esi			# pre-decrementing copy loop
    1.42 +	je   17f			# skip loop if nothing to copy
    1.43 +16:	subl $4,%esi			# pre-decrementing copy loop
    1.44  	subl $4,%edi
    1.45  	movl (%esi),%eax
    1.46  	movl %eax,(%edi)
    1.47 -	loop 15b
    1.48 -16:	movl %edi,%esp			# final %edi is top of merged stack
    1.49 +	loop 16b
    1.50 +17:	movl %edi,%esp			# final %edi is top of merged stack
    1.51  	jmp  11b
    1.52  
    1.53  critical_fixup_table:
    1.54 -	.byte 0x00,0x00,0x00		# testb $0xff,(%esi) = XEN_TEST_PENDING
    1.55 -	.byte 0x00,0x00			# jnz  14f
    1.56 +	.byte Ux00,Ux00,Ux00		# testb $0xff,(%esi) = XEN_TEST_PENDING
    1.57 +	.byte Ux00,Ux00			# jnz  14f
    1.58  	XEN_UNLOCK_VCPU_INFO_SMP_fixup
    1.59  	.byte 0x00			# pop  %ebx
    1.60  	.byte 0x04			# pop  %ecx
    1.61 @@ -552,7 +562,7 @@ critical_fixup_table:
    1.62  	.byte 0x20			# pop  %es
    1.63  	.byte 0x24,0x24,0x24		# add  $4,%esp
    1.64  	.byte 0x28			# iret
    1.65 -	.byte 0x00,0x00,0x00,0x00	# movb $1,1(%esi)
    1.66 +	.byte Ux00,Ux00,Ux00,Ux00	# movb $1,1(%esi)
    1.67  	XEN_UNLOCK_VCPU_INFO_SMP_fixup
    1.68  	.byte 0x00,0x00			# jmp  11b
    1.69