[PATCH] x86-64: i386/x86-64: Fix time going twice as fast problem on ATI Xpress chipsets
[linux-2.6/mini2440.git] / arch / x86_64 / kernel / asm-offsets.c
blobaaa6d383351798dca10eb8f7402a5c90a0ac1f95
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/sched.h>
8 #include <linux/stddef.h>
9 #include <linux/errno.h>
10 #include <linux/hardirq.h>
11 #include <linux/suspend.h>
12 #include <asm/pda.h>
13 #include <asm/processor.h>
14 #include <asm/segment.h>
15 #include <asm/thread_info.h>
16 #include <asm/ia32.h>
18 #define DEFINE(sym, val) \
19 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
21 #define BLANK() asm volatile("\n->" : : )
23 int main(void)
25 #define ENTRY(entry) DEFINE(tsk_ ## entry, offsetof(struct task_struct, entry))
26 ENTRY(state);
27 ENTRY(flags);
28 ENTRY(thread);
29 ENTRY(pid);
30 BLANK();
31 #undef ENTRY
32 #define ENTRY(entry) DEFINE(threadinfo_ ## entry, offsetof(struct thread_info, entry))
33 ENTRY(flags);
34 ENTRY(addr_limit);
35 ENTRY(preempt_count);
36 BLANK();
37 #undef ENTRY
38 #define ENTRY(entry) DEFINE(pda_ ## entry, offsetof(struct x8664_pda, entry))
39 ENTRY(kernelstack);
40 ENTRY(oldrsp);
41 ENTRY(pcurrent);
42 ENTRY(irqcount);
43 ENTRY(cpunumber);
44 ENTRY(irqstackptr);
45 BLANK();
46 #undef ENTRY
47 #ifdef CONFIG_IA32_EMULATION
48 #define ENTRY(entry) DEFINE(IA32_SIGCONTEXT_ ## entry, offsetof(struct sigcontext_ia32, entry))
49 ENTRY(eax);
50 ENTRY(ebx);
51 ENTRY(ecx);
52 ENTRY(edx);
53 ENTRY(esi);
54 ENTRY(edi);
55 ENTRY(ebp);
56 ENTRY(esp);
57 ENTRY(eip);
58 BLANK();
59 #undef ENTRY
60 DEFINE(IA32_RT_SIGFRAME_sigcontext,
61 offsetof (struct rt_sigframe32, uc.uc_mcontext));
62 BLANK();
63 #endif
64 DEFINE(pbe_address, offsetof(struct pbe, address));
65 DEFINE(pbe_orig_address, offsetof(struct pbe, orig_address));
66 DEFINE(pbe_next, offsetof(struct pbe, next));
67 return 0;