x86: use generic register names in struct sigcontext
[sfrench/cifs-2.6.git] / arch / x86 / kernel / asm-offsets_32.c
index 8029742c0fc127b40cc0249b1abc60a54ab42617..4fc24a61f431da8048caec77807b6802ed5d54cc 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/fixmap.h>
 #include <asm/processor.h>
 #include <asm/thread_info.h>
+#include <asm/bootparam.h>
 #include <asm/elf.h>
 
 #include <xen/interface/xen.h>
@@ -37,15 +38,15 @@ void foo(void);
 
 void foo(void)
 {
-       OFFSET(SIGCONTEXT_eax, sigcontext, eax);
-       OFFSET(SIGCONTEXT_ebx, sigcontext, ebx);
-       OFFSET(SIGCONTEXT_ecx, sigcontext, ecx);
-       OFFSET(SIGCONTEXT_edx, sigcontext, edx);
-       OFFSET(SIGCONTEXT_esi, sigcontext, esi);
-       OFFSET(SIGCONTEXT_edi, sigcontext, edi);
-       OFFSET(SIGCONTEXT_ebp, sigcontext, ebp);
-       OFFSET(SIGCONTEXT_esp, sigcontext, esp);
-       OFFSET(SIGCONTEXT_eip, sigcontext, eip);
+       OFFSET(IA32_SIGCONTEXT_ax, sigcontext, ax);
+       OFFSET(IA32_SIGCONTEXT_bx, sigcontext, bx);
+       OFFSET(IA32_SIGCONTEXT_cx, sigcontext, cx);
+       OFFSET(IA32_SIGCONTEXT_dx, sigcontext, dx);
+       OFFSET(IA32_SIGCONTEXT_si, sigcontext, si);
+       OFFSET(IA32_SIGCONTEXT_di, sigcontext, di);
+       OFFSET(IA32_SIGCONTEXT_bp, sigcontext, bp);
+       OFFSET(IA32_SIGCONTEXT_sp, sigcontext, sp);
+       OFFSET(IA32_SIGCONTEXT_ip, sigcontext, ip);
        BLANK();
 
        OFFSET(CPUINFO_x86, cpuinfo_x86, x86);
@@ -74,26 +75,26 @@ void foo(void)
        OFFSET(GDS_pad, Xgt_desc_struct, pad);
        BLANK();
 
-       OFFSET(PT_EBX, pt_regs, ebx);
-       OFFSET(PT_ECX, pt_regs, ecx);
-       OFFSET(PT_EDX, pt_regs, edx);
-       OFFSET(PT_ESI, pt_regs, esi);
-       OFFSET(PT_EDI, pt_regs, edi);
-       OFFSET(PT_EBP, pt_regs, ebp);
-       OFFSET(PT_EAX, pt_regs, eax);
-       OFFSET(PT_DS,  pt_regs, xds);
-       OFFSET(PT_ES,  pt_regs, xes);
-       OFFSET(PT_FS,  pt_regs, xfs);
-       OFFSET(PT_ORIG_EAX, pt_regs, orig_eax);
-       OFFSET(PT_EIP, pt_regs, eip);
-       OFFSET(PT_CS,  pt_regs, xcs);
-       OFFSET(PT_EFLAGS, pt_regs, eflags);
-       OFFSET(PT_OLDESP, pt_regs, esp);
-       OFFSET(PT_OLDSS,  pt_regs, xss);
+       OFFSET(PT_EBX, pt_regs, bx);
+       OFFSET(PT_ECX, pt_regs, cx);
+       OFFSET(PT_EDX, pt_regs, dx);
+       OFFSET(PT_ESI, pt_regs, si);
+       OFFSET(PT_EDI, pt_regs, di);
+       OFFSET(PT_EBP, pt_regs, bp);
+       OFFSET(PT_EAX, pt_regs, ax);
+       OFFSET(PT_DS,  pt_regs, ds);
+       OFFSET(PT_ES,  pt_regs, es);
+       OFFSET(PT_FS,  pt_regs, fs);
+       OFFSET(PT_ORIG_EAX, pt_regs, orig_ax);
+       OFFSET(PT_EIP, pt_regs, ip);
+       OFFSET(PT_CS,  pt_regs, cs);
+       OFFSET(PT_EFLAGS, pt_regs, flags);
+       OFFSET(PT_OLDESP, pt_regs, sp);
+       OFFSET(PT_OLDSS,  pt_regs, ss);
        BLANK();
 
        OFFSET(EXEC_DOMAIN_handler, exec_domain, handler);
-       OFFSET(RT_SIGFRAME_sigcontext, rt_sigframe, uc.uc_mcontext);
+       OFFSET(IA32_RT_SIGFRAME_sigcontext, rt_sigframe, uc.uc_mcontext);
        BLANK();
 
        OFFSET(pbe_address, pbe, address);
@@ -110,18 +111,18 @@ void foo(void)
        DEFINE(PTRS_PER_PMD, PTRS_PER_PMD);
        DEFINE(PTRS_PER_PGD, PTRS_PER_PGD);
 
-       DEFINE(VDSO_PRELINK_asm, VDSO_PRELINK);
-
        OFFSET(crypto_tfm_ctx_offset, crypto_tfm, __crt_ctx);
 
 #ifdef CONFIG_PARAVIRT
        BLANK();
-       OFFSET(PARAVIRT_enabled, paravirt_ops, paravirt_enabled);
-       OFFSET(PARAVIRT_irq_disable, paravirt_ops, irq_disable);
-       OFFSET(PARAVIRT_irq_enable, paravirt_ops, irq_enable);
-       OFFSET(PARAVIRT_irq_enable_sysexit, paravirt_ops, irq_enable_sysexit);
-       OFFSET(PARAVIRT_iret, paravirt_ops, iret);
-       OFFSET(PARAVIRT_read_cr0, paravirt_ops, read_cr0);
+       OFFSET(PARAVIRT_enabled, pv_info, paravirt_enabled);
+       OFFSET(PARAVIRT_PATCH_pv_cpu_ops, paravirt_patch_template, pv_cpu_ops);
+       OFFSET(PARAVIRT_PATCH_pv_irq_ops, paravirt_patch_template, pv_irq_ops);
+       OFFSET(PV_IRQ_irq_disable, pv_irq_ops, irq_disable);
+       OFFSET(PV_IRQ_irq_enable, pv_irq_ops, irq_enable);
+       OFFSET(PV_CPU_iret, pv_cpu_ops, iret);
+       OFFSET(PV_CPU_irq_enable_syscall_ret, pv_cpu_ops, irq_enable_syscall_ret);
+       OFFSET(PV_CPU_read_cr0, pv_cpu_ops, read_cr0);
 #endif
 
 #ifdef CONFIG_XEN
@@ -133,6 +134,7 @@ void foo(void)
 #ifdef CONFIG_LGUEST_GUEST
        BLANK();
        OFFSET(LGUEST_DATA_irq_enabled, lguest_data, irq_enabled);
+       OFFSET(LGUEST_DATA_pgdir, lguest_data, pgdir);
        OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc);
        OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc);
        OFFSET(LGUEST_PAGES_host_cr3, lguest_pages, state.host_cr3);
@@ -144,4 +146,10 @@ void foo(void)
        OFFSET(LGUEST_PAGES_regs_errcode, lguest_pages, regs.errcode);
        OFFSET(LGUEST_PAGES_regs, lguest_pages, regs);
 #endif
+
+       BLANK();
+       OFFSET(BP_scratch, boot_params, scratch);
+       OFFSET(BP_loadflags, boot_params, hdr.loadflags);
+       OFFSET(BP_hardware_subarch, boot_params, hdr.hardware_subarch);
+       OFFSET(BP_version, boot_params, hdr.version);
 }