ia64/xen-unstable
changeset 3196:3e0c45a8c812
bitkeeper revision 1.1159.1.470 (41ab0341Yle1QeLl7k10R_yib2Y3-Q)
entry.S:
Reload %esi when needed.
entry.S:
Reload %esi when needed.
author | cl349@arcadians.cl.cam.ac.uk |
---|---|
date | Mon Nov 29 11:08:49 2004 +0000 (2004-11-29) |
parents | 2c2d547ca702 |
children | ddbbd48e3254 |
files | linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S |
line diff
1.1 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S Sun Nov 28 12:21:16 2004 +0000 1.2 +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S Mon Nov 29 11:08:49 2004 +0000 1.3 @@ -85,10 +85,12 @@ VM_MASK = 0x00020000 1.4 #ifdef CONFIG_SMP 1.5 #define XEN_GET_VCPU_INFO(reg) movl TI_cpu(%ebp),reg ; \ 1.6 shl $sizeof_vcpu_shift,reg ; \ 1.7 - addl HYPERVISOR_shared_info,reg 1.8 + addl HYPERVISOR_shared_info,reg 1.9 +#define XEN_GET_VCPU_INFO_IF_SMP(reg) XEN_GET_VCPU_INFO(reg) 1.10 #define GET_THREAD_INFO_IF_SMP(reg) GET_THREAD_INFO(reg) 1.11 #else 1.12 #define XEN_GET_VCPU_INFO(reg) movl HYPERVISOR_shared_info,reg 1.13 +#define XEN_GET_VCPU_INFO_IF_SMP(reg) 1.14 #define GET_THREAD_INFO_IF_SMP(reg) 1.15 #endif 1.16 1.17 @@ -207,7 +209,7 @@ ENTRY(ret_from_fork) 1.18 call schedule_tail 1.19 GET_THREAD_INFO(%ebp) 1.20 popl %eax 1.21 - movl HYPERVISOR_shared_info, %esi 1.22 + XEN_GET_VCPU_INFO(%esi) 1.23 jmp syscall_exit 1.24 1.25 /* 1.26 @@ -220,6 +222,7 @@ ENTRY(ret_from_fork) 1.27 # userspace resumption stub bypassing syscall exit tracing 1.28 ALIGN 1.29 ret_from_exception: 1.30 + XEN_GET_VCPU_INFO_IF_SMP(%esi) 1.31 preempt_stop 1.32 ret_from_intr: 1.33 GET_THREAD_INFO(%ebp) 1.34 @@ -228,7 +231,7 @@ ret_from_intr: 1.35 testl $(VM_MASK | 2), %eax 1.36 jz resume_kernel # returning to kernel or vm86-space 1.37 ENTRY(resume_userspace) 1.38 - movl HYPERVISOR_shared_info, %esi 1.39 + XEN_GET_VCPU_INFO(%esi) 1.40 XEN_BLOCK_EVENTS(%esi) # make sure we don't miss an interrupt 1.41 # setting need_resched or sigpending 1.42 # between sampling and the iret 1.43 @@ -240,7 +243,7 @@ ENTRY(resume_userspace) 1.44 1.45 #ifdef CONFIG_PREEMPT 1.46 ENTRY(resume_kernel) 1.47 - movl HYPERVISOR_shared_info, %esi 1.48 + XEN_GET_VCPU_INFO(%esi) 1.49 cmpl $0,TI_preempt_count(%ebp) # non-zero preempt_count ? 1.50 jnz restore_all 1.51 need_resched: 1.52 @@ -253,6 +256,7 @@ need_resched: 1.53 XEN_UNBLOCK_EVENTS(%esi) 1.54 call schedule 1.55 movl $0,TI_preempt_count(%ebp) 1.56 + XEN_GET_VCPU_INFO_IF_SMP(%esi) 1.57 XEN_BLOCK_EVENTS(%esi) 1.58 jmp need_resched 1.59 #endif 1.60 @@ -318,6 +322,7 @@ syscall_call: 1.61 call *sys_call_table(,%eax,4) 1.62 movl %eax,EAX(%esp) # store the return value 1.63 syscall_exit: 1.64 + XEN_GET_VCPU_INFO_IF_SMP(%esi) 1.65 XEN_BLOCK_EVENTS(%esi) # make sure we don't miss an interrupt 1.66 # setting need_resched or sigpending 1.67 # between sampling and the iret 1.68 @@ -349,6 +354,7 @@ work_pending: 1.69 jz work_notifysig 1.70 work_resched: 1.71 call schedule 1.72 + XEN_GET_VCPU_INFO_IF_SMP(%esi) 1.73 XEN_BLOCK_EVENTS(%esi) # make sure we don't miss an interrupt 1.74 # setting need_resched or sigpending 1.75 # between sampling and the iret 1.76 @@ -394,6 +400,7 @@ syscall_trace_entry: 1.77 # perform syscall exit tracing 1.78 ALIGN 1.79 syscall_exit_work: 1.80 + XEN_GET_VCPU_INFO_IF_SMP(%esi) 1.81 testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP), %cl 1.82 jz work_pending 1.83 XEN_UNBLOCK_EVENTS(%esi) # could let do_syscall_trace() call 1.84 @@ -705,6 +712,7 @@ ENTRY(int3) 1.85 pushl %edx 1.86 call do_int3 1.87 addl $8,%esp 1.88 + XEN_GET_VCPU_INFO_IF_SMP(%esi) 1.89 testl %eax,%eax 1.90 jnz restore_all 1.91 jmp ret_from_exception