ia64/xen-unstable

annotate xen/arch/x86/x86_64/asm-offsets.c @ 11756:eee52c100996

[XEN] Remove unused MULTICALL_arg6, and unnecessary use of STR() macro.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Thu Oct 05 16:36:39 2006 +0100 (2006-10-05)
parents d20e1835c24b
children 1c506820c468
rev   line source
kaf24@3276 1 /*
kaf24@3276 2 * Generate definitions needed by assembly language modules.
kaf24@3276 3 * This code generates raw asm output which is post-processed
kaf24@3276 4 * to extract and format the required data.
kaf24@3276 5 */
kaf24@3276 6
kaf24@3958 7 #include <xen/config.h>
kaf24@4196 8 #include <xen/perfc.h>
kaf24@3276 9 #include <xen/sched.h>
cl349@5287 10 #include <asm/fixmap.h>
cl349@5285 11 #include <asm/hardirq.h>
kaf24@3276 12
kaf24@3276 13 #define DEFINE(_sym, _val) \
kaf24@3276 14 __asm__ __volatile__ ( "\n->" #_sym " %0 " #_val : : "i" (_val) )
kaf24@3276 15 #define BLANK() \
kaf24@3276 16 __asm__ __volatile__ ( "\n->" : : )
kaf24@3276 17 #define OFFSET(_sym, _str, _mem) \
kaf24@3276 18 DEFINE(_sym, offsetof(_str, _mem));
kaf24@3276 19
kaf24@4593 20 /* base-2 logarithm */
kaf24@4593 21 #define __L2(_x) (((_x) & 0x00000002) ? 1 : 0)
kaf24@4593 22 #define __L4(_x) (((_x) & 0x0000000c) ? ( 2 + __L2( (_x)>> 2)) : __L2( _x))
kaf24@4593 23 #define __L8(_x) (((_x) & 0x000000f0) ? ( 4 + __L4( (_x)>> 4)) : __L4( _x))
kaf24@4593 24 #define __L16(_x) (((_x) & 0x0000ff00) ? ( 8 + __L8( (_x)>> 8)) : __L8( _x))
kaf24@4593 25 #define LOG_2(_x) (((_x) & 0xffff0000) ? (16 + __L16((_x)>>16)) : __L16(_x))
kaf24@4593 26
kaf24@3276 27 void __dummy__(void)
kaf24@3276 28 {
kaf24@4683 29 OFFSET(UREGS_r15, struct cpu_user_regs, r15);
kaf24@4683 30 OFFSET(UREGS_r14, struct cpu_user_regs, r14);
kaf24@4683 31 OFFSET(UREGS_r13, struct cpu_user_regs, r13);
kaf24@4683 32 OFFSET(UREGS_r12, struct cpu_user_regs, r12);
kaf24@4683 33 OFFSET(UREGS_rbp, struct cpu_user_regs, rbp);
kaf24@4683 34 OFFSET(UREGS_rbx, struct cpu_user_regs, rbx);
kaf24@4683 35 OFFSET(UREGS_r11, struct cpu_user_regs, r11);
kaf24@4683 36 OFFSET(UREGS_r10, struct cpu_user_regs, r10);
kaf24@4683 37 OFFSET(UREGS_r9, struct cpu_user_regs, r9);
kaf24@4683 38 OFFSET(UREGS_r8, struct cpu_user_regs, r8);
kaf24@4683 39 OFFSET(UREGS_rax, struct cpu_user_regs, rax);
kaf24@4683 40 OFFSET(UREGS_rcx, struct cpu_user_regs, rcx);
kaf24@4683 41 OFFSET(UREGS_rdx, struct cpu_user_regs, rdx);
kaf24@4683 42 OFFSET(UREGS_rsi, struct cpu_user_regs, rsi);
kaf24@4683 43 OFFSET(UREGS_rdi, struct cpu_user_regs, rdi);
kaf24@4683 44 OFFSET(UREGS_error_code, struct cpu_user_regs, error_code);
kaf24@4683 45 OFFSET(UREGS_entry_vector, struct cpu_user_regs, entry_vector);
kaf24@4683 46 OFFSET(UREGS_rip, struct cpu_user_regs, rip);
kaf24@4683 47 OFFSET(UREGS_cs, struct cpu_user_regs, cs);
kaf24@4683 48 OFFSET(UREGS_eflags, struct cpu_user_regs, eflags);
kaf24@4683 49 OFFSET(UREGS_rsp, struct cpu_user_regs, rsp);
kaf24@4683 50 OFFSET(UREGS_ss, struct cpu_user_regs, ss);
kaf24@4683 51 OFFSET(UREGS_kernel_sizeof, struct cpu_user_regs, es);
kaf24@4683 52 DEFINE(UREGS_user_sizeof, sizeof(struct cpu_user_regs));
kaf24@3276 53 BLANK();
kaf24@3276 54
kaf24@5289 55 OFFSET(VCPU_processor, struct vcpu, processor);
kaf24@5289 56 OFFSET(VCPU_vcpu_info, struct vcpu, vcpu_info);
kaf24@5289 57 OFFSET(VCPU_trap_bounce, struct vcpu, arch.trap_bounce);
kaf24@5289 58 OFFSET(VCPU_thread_flags, struct vcpu, arch.flags);
kaf24@5289 59 OFFSET(VCPU_event_addr, struct vcpu,
kaf24@4689 60 arch.guest_context.event_callback_eip);
kaf24@5289 61 OFFSET(VCPU_failsafe_addr, struct vcpu,
kaf24@4689 62 arch.guest_context.failsafe_callback_eip);
kaf24@5289 63 OFFSET(VCPU_syscall_addr, struct vcpu,
kaf24@4689 64 arch.guest_context.syscall_callback_eip);
kaf24@5289 65 OFFSET(VCPU_kernel_sp, struct vcpu,
kaf24@4689 66 arch.guest_context.kernel_sp);
kaf24@10305 67 OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags);
kaf24@8708 68 OFFSET(VCPU_arch_guest_fpu_ctxt, struct vcpu, arch.guest_context.fpu_ctxt);
Ian@8561 69 OFFSET(VCPU_flags, struct vcpu, vcpu_flags);
Ian@8561 70 OFFSET(VCPU_nmi_addr, struct vcpu, nmi_addr);
Ian@8561 71 DEFINE(_VCPUF_nmi_pending, _VCPUF_nmi_pending);
Ian@8561 72 DEFINE(_VCPUF_nmi_masked, _VCPUF_nmi_masked);
kaf24@10305 73 DEFINE(_VGCF_failsafe_disables_events, _VGCF_failsafe_disables_events);
kaf24@10305 74 DEFINE(_VGCF_syscall_disables_events, _VGCF_syscall_disables_events);
kaf24@3276 75 BLANK();
kaf24@3276 76
kaf24@8708 77 OFFSET(VCPU_svm_vmcb_pa, struct vcpu, arch.hvm_svm.vmcb_pa);
kaf24@8708 78 OFFSET(VCPU_svm_vmcb, struct vcpu, arch.hvm_svm.vmcb);
kaf24@8708 79 OFFSET(VCPU_svm_vmexit_tsc, struct vcpu, arch.hvm_svm.vmexit_tsc);
kaf24@8708 80 BLANK();
kaf24@8708 81
kaf24@10356 82 OFFSET(VCPU_vmx_launched, struct vcpu, arch.hvm_vmx.launched);
kaf24@10356 83 BLANK();
kaf24@10356 84
kaf24@8708 85 OFFSET(VMCB_rax, struct vmcb_struct, rax);
kaf24@8708 86 OFFSET(VMCB_tsc_offset, struct vmcb_struct, tsc_offset);
kaf24@8708 87 BLANK();
kaf24@8708 88
kaf24@3754 89 OFFSET(VCPUINFO_upcall_pending, vcpu_info_t, evtchn_upcall_pending);
kaf24@3754 90 OFFSET(VCPUINFO_upcall_mask, vcpu_info_t, evtchn_upcall_mask);
kaf24@3276 91 BLANK();
kaf24@3276 92
kaf24@6470 93 DEFINE(CPUINFO_sizeof, sizeof(struct cpu_info));
kaf24@6470 94 BLANK();
kaf24@6470 95
kaf24@3276 96 OFFSET(TRAPBOUNCE_error_code, struct trap_bounce, error_code);
kaf24@3276 97 OFFSET(TRAPBOUNCE_flags, struct trap_bounce, flags);
kaf24@3276 98 OFFSET(TRAPBOUNCE_cs, struct trap_bounce, cs);
kaf24@3276 99 OFFSET(TRAPBOUNCE_eip, struct trap_bounce, eip);
kaf24@3276 100 BLANK();
kaf24@3276 101
kaf24@3958 102 #if PERF_COUNTERS
kaf24@3958 103 OFFSET(PERFC_hypercalls, struct perfcounter, hypercalls);
kaf24@3958 104 OFFSET(PERFC_exceptions, struct perfcounter, exceptions);
kaf24@3958 105 BLANK();
kaf24@3958 106 #endif
kaf24@3958 107
kaf24@8679 108 OFFSET(MULTICALL_op, struct multicall_entry, op);
kaf24@8679 109 OFFSET(MULTICALL_arg0, struct multicall_entry, args[0]);
kaf24@8679 110 OFFSET(MULTICALL_arg1, struct multicall_entry, args[1]);
kaf24@8679 111 OFFSET(MULTICALL_arg2, struct multicall_entry, args[2]);
kaf24@8679 112 OFFSET(MULTICALL_arg3, struct multicall_entry, args[3]);
kaf24@8679 113 OFFSET(MULTICALL_arg4, struct multicall_entry, args[4]);
kaf24@8679 114 OFFSET(MULTICALL_arg5, struct multicall_entry, args[5]);
kaf24@8679 115 OFFSET(MULTICALL_result, struct multicall_entry, result);
kaf24@4593 116 BLANK();
kaf24@4593 117
kaf24@4593 118 DEFINE(IRQSTAT_shift, LOG_2(sizeof(irq_cpustat_t)));
kaf24@3276 119 }