]> git.hungrycats.org Git - linux/commitdiff
[IA64] Don't hardcode offsets in thread_info
authorTony Luck <tony.luck@intel.com>
Wed, 6 Oct 2004 17:18:27 +0000 (17:18 +0000)
committerTony Luck <aegl@agluck-lia64.sc.intel.com>
Wed, 6 Oct 2004 17:18:27 +0000 (17:18 +0000)
We had hardcoded defines for TI_TASK TI_EXEC_DOMAIN, TI_FLAGS, TI_CPU,
TI_ADDR_LIMIT, TI_PRE_COUNT, TI_RESTART_BLOCK; but only two of these
were ever used.  Remove all from thread_info.h, and generate the two
that we do use (TI_FLAGS and TI_PRE_COUNT) in asm_offsets.c

Patch supplied by Zou Nan hai

Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/asm-offsets.c
include/asm-ia64/thread_info.h

index 4b023d794b75cf5fe35dd1c5b0213b8a02c666eb..b1ab994b26acfcb0bb409e743bd124a13bfd690f 100644 (file)
@@ -34,6 +34,11 @@ void foo(void)
 
        BLANK();
 
+       DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
+       DEFINE(TI_PRE_COUNT, offsetof(struct thread_info, preempt_count));
+
+       BLANK();
+
        DEFINE(IA64_TASK_BLOCKED_OFFSET,offsetof (struct task_struct, blocked));
        DEFINE(IA64_TASK_CLEAR_CHILD_TID_OFFSET,offsetof (struct task_struct, clear_child_tid));
        DEFINE(IA64_TASK_GROUP_LEADER_OFFSET, offsetof (struct task_struct, group_leader));
index 665623bf42282188b75c63976e3ac55056e87cd2..16831904968151924f129ce062bc9a13662d0248 100644 (file)
@@ -9,14 +9,6 @@
 #include <asm/processor.h>
 #include <asm/ptrace.h>
 
-#define TI_TASK                        0x00
-#define TI_EXEC_DOMAIN         0x08
-#define TI_FLAGS               0x10
-#define TI_CPU                 0x14
-#define TI_ADDR_LIMIT          0x18
-#define TI_PRE_COUNT           0x20
-#define TI_RESTART_BLOCK       0x28
-
 #define PREEMPT_ACTIVE_BIT 30
 #define PREEMPT_ACTIVE (1 << PREEMPT_ACTIVE_BIT)