Linux-2.6.12-rc2
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / alpha / kernel / asm-offsets.c
blob8f2e5c718b50fc6a2e081876581f0788f1d25d6c
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/types.h>
8 #include <linux/stddef.h>
9 #include <linux/sched.h>
10 #include <linux/ptrace.h>
11 #include <asm/io.h>
13 #define DEFINE(sym, val) \
14 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
16 #define BLANK() asm volatile("\n->" : : )
18 void foo(void)
20 DEFINE(TI_TASK, offsetof(struct thread_info, task));
21 DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
22 DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
23 BLANK();
25 DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
26 DEFINE(TASK_UID, offsetof(struct task_struct, uid));
27 DEFINE(TASK_EUID, offsetof(struct task_struct, euid));
28 DEFINE(TASK_GID, offsetof(struct task_struct, gid));
29 DEFINE(TASK_EGID, offsetof(struct task_struct, egid));
30 DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent));
31 DEFINE(TASK_TGID, offsetof(struct task_struct, tgid));
32 BLANK();
34 DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
35 DEFINE(PT_PTRACED, PT_PTRACED);
36 DEFINE(CLONE_VM, CLONE_VM);
37 DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);
38 DEFINE(SIGCHLD, SIGCHLD);
39 BLANK();
41 DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache));
42 DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register));