Commit d6e3c04a authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds

[PATCH] ppc32: remove hardcoded offsets from ppc asm

This patch by Vincent Hanquez removes some hard coded offsets for accessing
thread info fields from assembly, uses the normal offset generation
mecanism that we already have for other things instead.
Signed-off-by: default avatarVincent Hanquez <tab@snarc.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2fa69d93
......@@ -129,6 +129,13 @@ main(void)
DEFINE(CPU_SPEC_FEATURES, offsetof(struct cpu_spec, cpu_features));
DEFINE(CPU_SPEC_SETUP, offsetof(struct cpu_spec, cpu_setup));
DEFINE(TI_TASK, offsetof(struct thread_info, task));
DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags));
DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
return 0;
}
......@@ -65,16 +65,6 @@ static inline struct thread_info *current_thread_info(void)
*/
#define THREAD_SIZE 8192 /* 2 pages */
/*
* Offsets in thread_info structure, used in assembly code
*/
#define TI_TASK 0
#define TI_EXECDOMAIN 4
#define TI_FLAGS 8
#define TI_LOCAL_FLAGS 12
#define TI_CPU 16
#define TI_PREEMPT 20
#define PREEMPT_ACTIVE 0x4000000
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment