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.
7 #include <linux/crypto.h>
8 #include <linux/sched.h>
9 #include <linux/stddef.h>
10 #include <linux/errno.h>
11 #include <linux/hardirq.h>
12 #include <linux/suspend.h>
14 #include <asm/processor.h>
15 #include <asm/segment.h>
16 #include <asm/thread_info.h>
18 #include <asm/bootparam.h>
20 #define DEFINE(sym, val) \
21 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
23 #define BLANK() asm volatile("\n->" : : )
25 #define OFFSET(sym, str, mem) \
26 DEFINE(sym, offsetof(struct str, mem))
30 #undef _ASM_X86_64_UNISTD_H_
31 #define __SYSCALL(nr, sym) [nr] = 1,
32 static char syscalls[] = {
33 #include <asm/unistd.h>
38 #define ENTRY(entry) DEFINE(tsk_ ## entry, offsetof(struct task_struct, entry))
44 #define ENTRY(entry) DEFINE(threadinfo_ ## entry, offsetof(struct thread_info, entry))
49 #ifdef CONFIG_IA32_EMULATION
50 ENTRY(sysenter_return);
54 #define ENTRY(entry) DEFINE(pda_ ## entry, offsetof(struct x8664_pda, entry))
64 #ifdef CONFIG_IA32_EMULATION
65 #define ENTRY(entry) DEFINE(IA32_SIGCONTEXT_ ## entry, offsetof(struct sigcontext_ia32, entry))
77 DEFINE(IA32_RT_SIGFRAME_sigcontext,
78 offsetof (struct rt_sigframe32, uc.uc_mcontext));
81 DEFINE(pbe_address, offsetof(struct pbe, address));
82 DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
83 DEFINE(pbe_next, offsetof(struct pbe, next));
85 #define ENTRY(entry) DEFINE(pt_regs_ ## entry, offsetof(struct pt_regs, entry))
105 #define ENTRY(entry) DEFINE(saved_context_ ## entry, offsetof(struct saved_context, entry))
113 DEFINE(TSS_ist, offsetof(struct tss_struct, ist));
115 DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
117 DEFINE(__NR_syscall_max, sizeof(syscalls) - 1);
120 OFFSET(BP_scratch, boot_params, scratch);
121 OFFSET(BP_loadflags, boot_params, hdr.loadflags);
122 OFFSET(BP_hardware_subarch, boot_params, hdr.hardware_subarch);
123 OFFSET(BP_version, boot_params, hdr.version);