ia64/xen-unstable

view linux-2.6-xen-sparse/arch/x86_64/kernel/xen_entry.S @ 13647:057c4c2991fa

32-on-64: Fix an one-off error in compat_addr_ok().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kaf24@localhost.localdomain
date Fri Jan 26 13:36:52 2007 +0000 (2007-01-26)
parents ae6af19f47d3
children
line source
1 /*
2 * Copied from arch/xen/i386/kernel/entry.S
3 */
4 /* Offsets into shared_info_t. */
5 #define evtchn_upcall_pending /* 0 */
6 #define evtchn_upcall_mask 1
8 #define sizeof_vcpu_shift 6
10 #ifdef CONFIG_SMP
11 //#define preempt_disable(reg) incl threadinfo_preempt_count(reg)
12 //#define preempt_enable(reg) decl threadinfo_preempt_count(reg)
13 #define preempt_disable(reg)
14 #define preempt_enable(reg)
15 #define XEN_GET_VCPU_INFO(reg) preempt_disable(%rbp) ; \
16 movq %gs:pda_cpunumber,reg ; \
17 shl $32, reg ; \
18 shr $32-sizeof_vcpu_shift,reg ; \
19 addq HYPERVISOR_shared_info,reg
20 #define XEN_PUT_VCPU_INFO(reg) preempt_enable(%rbp) ; \
21 #define XEN_PUT_VCPU_INFO_fixup .byte 0xff,0xff,0xff
22 #else
23 #define XEN_GET_VCPU_INFO(reg) movq HYPERVISOR_shared_info,reg
24 #define XEN_PUT_VCPU_INFO(reg)
25 #define XEN_PUT_VCPU_INFO_fixup
26 #endif
28 #define XEN_LOCKED_BLOCK_EVENTS(reg) movb $1,evtchn_upcall_mask(reg)
29 #define XEN_LOCKED_UNBLOCK_EVENTS(reg) movb $0,evtchn_upcall_mask(reg)
30 #define XEN_BLOCK_EVENTS(reg) XEN_GET_VCPU_INFO(reg) ; \
31 XEN_LOCKED_BLOCK_EVENTS(reg) ; \
32 XEN_PUT_VCPU_INFO(reg)
33 #define XEN_UNBLOCK_EVENTS(reg) XEN_GET_VCPU_INFO(reg) ; \
34 XEN_LOCKED_UNBLOCK_EVENTS(reg) ; \
35 XEN_PUT_VCPU_INFO(reg)
36 #define XEN_TEST_PENDING(reg) testb $0xFF,evtchn_upcall_pending(reg)
38 VGCF_IN_SYSCALL = (1<<8)