ia64/xen-unstable

view linux-2.6-xen-sparse/arch/x86_64/kernel/asm-offsets.c @ 13647:057c4c2991fa

32-on-64: Fix an one-off error in compat_addr_ok().
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kaf24@localhost.localdomain
date Fri Jan 26 13:36:52 2007 +0000 (2007-01-26)
parents 3adf00179a63
children
line source
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 */
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>
13 #include <asm/pda.h>
14 #include <asm/processor.h>
15 #include <asm/segment.h>
16 #include <asm/thread_info.h>
17 #include <asm/ia32.h>
19 #define DEFINE(sym, val) \
20 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
22 #define BLANK() asm volatile("\n->" : : )
24 int main(void)
25 {
26 #define ENTRY(entry) DEFINE(tsk_ ## entry, offsetof(struct task_struct, entry))
27 ENTRY(state);
28 ENTRY(flags);
29 ENTRY(thread);
30 ENTRY(pid);
31 BLANK();
32 #undef ENTRY
33 #define ENTRY(entry) DEFINE(threadinfo_ ## entry, offsetof(struct thread_info, entry))
34 ENTRY(flags);
35 ENTRY(addr_limit);
36 ENTRY(preempt_count);
37 ENTRY(status);
38 BLANK();
39 #undef ENTRY
40 #define ENTRY(entry) DEFINE(pda_ ## entry, offsetof(struct x8664_pda, entry))
41 ENTRY(kernelstack);
42 ENTRY(oldrsp);
43 ENTRY(pcurrent);
44 ENTRY(irqcount);
45 ENTRY(cpunumber);
46 ENTRY(irqstackptr);
47 ENTRY(data_offset);
48 BLANK();
49 #undef ENTRY
50 #ifdef CONFIG_IA32_EMULATION
51 #define ENTRY(entry) DEFINE(IA32_SIGCONTEXT_ ## entry, offsetof(struct sigcontext_ia32, entry))
52 ENTRY(eax);
53 ENTRY(ebx);
54 ENTRY(ecx);
55 ENTRY(edx);
56 ENTRY(esi);
57 ENTRY(edi);
58 ENTRY(ebp);
59 ENTRY(esp);
60 ENTRY(eip);
61 BLANK();
62 #undef ENTRY
63 DEFINE(IA32_RT_SIGFRAME_sigcontext,
64 offsetof (struct rt_sigframe32, uc.uc_mcontext));
65 BLANK();
66 #endif
67 DEFINE(pbe_address, offsetof(struct pbe, address));
68 DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
69 DEFINE(pbe_next, offsetof(struct pbe, next));
70 #ifndef CONFIG_X86_NO_TSS
71 BLANK();
72 DEFINE(TSS_ist, offsetof(struct tss_struct, ist));
73 #endif
74 BLANK();
75 DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
76 return 0;
77 }