Linux 4.6-rc6
[linux/fpc-iii.git] / arch / x86 / kernel / asm-offsets.c
blob5c042466f274d0f79dac84bba1c6835953565c84
1 /*
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.
5 */
6 #define COMPILE_OFFSETS
8 #include <linux/crypto.h>
9 #include <linux/sched.h>
10 #include <linux/stddef.h>
11 #include <linux/hardirq.h>
12 #include <linux/suspend.h>
13 #include <linux/kbuild.h>
14 #include <asm/processor.h>
15 #include <asm/thread_info.h>
16 #include <asm/sigframe.h>
17 #include <asm/bootparam.h>
18 #include <asm/suspend.h>
20 #ifdef CONFIG_XEN
21 #include <xen/interface/xen.h>
22 #endif
24 #ifdef CONFIG_X86_32
25 # include "asm-offsets_32.c"
26 #else
27 # include "asm-offsets_64.c"
28 #endif
30 void common(void) {
31 BLANK();
32 OFFSET(TI_flags, thread_info, flags);
33 OFFSET(TI_status, thread_info, status);
34 OFFSET(TI_addr_limit, thread_info, addr_limit);
36 BLANK();
37 OFFSET(crypto_tfm_ctx_offset, crypto_tfm, __crt_ctx);
39 BLANK();
40 OFFSET(pbe_address, pbe, address);
41 OFFSET(pbe_orig_address, pbe, orig_address);
42 OFFSET(pbe_next, pbe, next);
44 #if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
45 BLANK();
46 OFFSET(IA32_SIGCONTEXT_ax, sigcontext_32, ax);
47 OFFSET(IA32_SIGCONTEXT_bx, sigcontext_32, bx);
48 OFFSET(IA32_SIGCONTEXT_cx, sigcontext_32, cx);
49 OFFSET(IA32_SIGCONTEXT_dx, sigcontext_32, dx);
50 OFFSET(IA32_SIGCONTEXT_si, sigcontext_32, si);
51 OFFSET(IA32_SIGCONTEXT_di, sigcontext_32, di);
52 OFFSET(IA32_SIGCONTEXT_bp, sigcontext_32, bp);
53 OFFSET(IA32_SIGCONTEXT_sp, sigcontext_32, sp);
54 OFFSET(IA32_SIGCONTEXT_ip, sigcontext_32, ip);
56 BLANK();
57 OFFSET(IA32_RT_SIGFRAME_sigcontext, rt_sigframe_ia32, uc.uc_mcontext);
58 #endif
60 #ifdef CONFIG_PARAVIRT
61 BLANK();
62 OFFSET(PARAVIRT_PATCH_pv_cpu_ops, paravirt_patch_template, pv_cpu_ops);
63 OFFSET(PARAVIRT_PATCH_pv_irq_ops, paravirt_patch_template, pv_irq_ops);
64 OFFSET(PV_IRQ_irq_disable, pv_irq_ops, irq_disable);
65 OFFSET(PV_IRQ_irq_enable, pv_irq_ops, irq_enable);
66 OFFSET(PV_CPU_iret, pv_cpu_ops, iret);
67 OFFSET(PV_CPU_read_cr0, pv_cpu_ops, read_cr0);
68 OFFSET(PV_MMU_read_cr2, pv_mmu_ops, read_cr2);
69 #endif
71 #ifdef CONFIG_XEN
72 BLANK();
73 OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask);
74 OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending);
75 #endif
77 BLANK();
78 OFFSET(BP_scratch, boot_params, scratch);
79 OFFSET(BP_loadflags, boot_params, hdr.loadflags);
80 OFFSET(BP_hardware_subarch, boot_params, hdr.hardware_subarch);
81 OFFSET(BP_version, boot_params, hdr.version);
82 OFFSET(BP_kernel_alignment, boot_params, hdr.kernel_alignment);
83 OFFSET(BP_pref_address, boot_params, hdr.pref_address);
84 OFFSET(BP_code32_start, boot_params, hdr.code32_start);
86 BLANK();
87 DEFINE(PTREGS_SIZE, sizeof(struct pt_regs));