]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/alpha/kernel/asm-offsets.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6
[linux-2.6-omap-h63xx.git] / arch / alpha / kernel / asm-offsets.c
index 6c56c754a0b53c2947f662c0e3adde986ebdc513..6ff8886e7e22b9c4af281abe417a99a88596a3d1 100644 (file)
@@ -8,13 +8,9 @@
 #include <linux/stddef.h>
 #include <linux/sched.h>
 #include <linux/ptrace.h>
+#include <linux/kbuild.h>
 #include <asm/io.h>
 
-#define DEFINE(sym, val) \
-        asm volatile("\n->" #sym " %0 " #val : : "i" (val))
-
-#define BLANK() asm volatile("\n->" : : )
-
 void foo(void)
 {
        DEFINE(TI_TASK, offsetof(struct thread_info, task));
@@ -23,15 +19,18 @@ void foo(void)
        BLANK();
 
         DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
-        DEFINE(TASK_UID, offsetof(struct task_struct, uid));
-        DEFINE(TASK_EUID, offsetof(struct task_struct, euid));
-        DEFINE(TASK_GID, offsetof(struct task_struct, gid));
-        DEFINE(TASK_EGID, offsetof(struct task_struct, egid));
+        DEFINE(TASK_CRED, offsetof(struct task_struct, cred));
         DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent));
         DEFINE(TASK_GROUP_LEADER, offsetof(struct task_struct, group_leader));
         DEFINE(TASK_TGID, offsetof(struct task_struct, tgid));
         BLANK();
 
+        DEFINE(CRED_UID,  offsetof(struct cred, uid));
+        DEFINE(CRED_EUID, offsetof(struct cred, euid));
+        DEFINE(CRED_GID,  offsetof(struct cred, gid));
+        DEFINE(CRED_EGID, offsetof(struct cred, egid));
+        BLANK();
+
        DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
        DEFINE(PT_PTRACED, PT_PTRACED);
        DEFINE(CLONE_VM, CLONE_VM);