2 * Generate definitions needed by assembly language modules.
3 * This code generates raw asm output which is post-processed to extract
4 * and format the required data.
6 #define COMPILE_OFFSETS
8 #include <linux/crypto.h>
9 #include <linux/sched.h>
10 #include <linux/stddef.h>
11 #include <linux/errno.h>
12 #include <linux/hardirq.h>
13 #include <linux/suspend.h>
14 #include <linux/kbuild.h>
15 #include <asm/processor.h>
16 #include <asm/segment.h>
17 #include <asm/thread_info.h>
19 #include <asm/bootparam.h>
20 #include <asm/suspend.h>
22 #include <xen/interface/xen.h>
24 #include <asm/sigframe.h>
28 #undef _ASM_X86_UNISTD_64_H
29 #define __SYSCALL(nr, sym) [nr] = 1,
30 static char syscalls
[] = {
31 #include <asm/unistd.h>
36 #define ENTRY(entry) DEFINE(tsk_ ## entry, offsetof(struct task_struct, entry))
42 #define ENTRY(entry) DEFINE(TI_ ## entry, offsetof(struct thread_info, entry))
47 #ifdef CONFIG_IA32_EMULATION
48 ENTRY(sysenter_return
);
52 #ifdef CONFIG_PARAVIRT
54 OFFSET(PARAVIRT_enabled
, pv_info
, paravirt_enabled
);
55 OFFSET(PARAVIRT_PATCH_pv_cpu_ops
, paravirt_patch_template
, pv_cpu_ops
);
56 OFFSET(PARAVIRT_PATCH_pv_irq_ops
, paravirt_patch_template
, pv_irq_ops
);
57 OFFSET(PV_IRQ_irq_disable
, pv_irq_ops
, irq_disable
);
58 OFFSET(PV_IRQ_irq_enable
, pv_irq_ops
, irq_enable
);
59 OFFSET(PV_IRQ_adjust_exception_frame
, pv_irq_ops
, adjust_exception_frame
);
60 OFFSET(PV_CPU_iret
, pv_cpu_ops
, iret
);
61 OFFSET(PV_CPU_usergs_sysret32
, pv_cpu_ops
, usergs_sysret32
);
62 OFFSET(PV_CPU_usergs_sysret64
, pv_cpu_ops
, usergs_sysret64
);
63 OFFSET(PV_CPU_irq_enable_sysexit
, pv_cpu_ops
, irq_enable_sysexit
);
64 OFFSET(PV_CPU_swapgs
, pv_cpu_ops
, swapgs
);
65 OFFSET(PV_MMU_read_cr2
, pv_mmu_ops
, read_cr2
);
69 #ifdef CONFIG_IA32_EMULATION
70 #define ENTRY(entry) DEFINE(IA32_SIGCONTEXT_ ## entry, offsetof(struct sigcontext_ia32, entry))
82 DEFINE(IA32_RT_SIGFRAME_sigcontext
,
83 offsetof (struct rt_sigframe_ia32
, uc
.uc_mcontext
));
86 DEFINE(pbe_address
, offsetof(struct pbe
, address
));
87 DEFINE(pbe_orig_address
, offsetof(struct pbe
, orig_address
));
88 DEFINE(pbe_next
, offsetof(struct pbe
, next
));
90 #define ENTRY(entry) DEFINE(pt_regs_ ## entry, offsetof(struct pt_regs, entry))
110 #define ENTRY(entry) DEFINE(saved_context_ ## entry, offsetof(struct saved_context, entry))
118 DEFINE(TSS_ist
, offsetof(struct tss_struct
, x86_tss
.ist
));
120 DEFINE(crypto_tfm_ctx_offset
, offsetof(struct crypto_tfm
, __crt_ctx
));
122 DEFINE(__NR_syscall_max
, sizeof(syscalls
) - 1);
125 OFFSET(BP_scratch
, boot_params
, scratch
);
126 OFFSET(BP_loadflags
, boot_params
, hdr
.loadflags
);
127 OFFSET(BP_hardware_subarch
, boot_params
, hdr
.hardware_subarch
);
128 OFFSET(BP_version
, boot_params
, hdr
.version
);
129 OFFSET(BP_kernel_alignment
, boot_params
, hdr
.kernel_alignment
);
132 DEFINE(PAGE_SIZE_asm
, PAGE_SIZE
);
135 OFFSET(XEN_vcpu_info_mask
, vcpu_info
, evtchn_upcall_mask
);
136 OFFSET(XEN_vcpu_info_pending
, vcpu_info
, evtchn_upcall_pending
);