diff options
author | Al Viro <viro@parcelfarce.linux.theplanet.co.uk> | 2005-11-13 19:06:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-13 21:14:14 -0500 |
commit | abd03753bd1532c05eb13231569a5257b007e29c (patch) | |
tree | 339e8c12169a2d04ba209f0bc8902859e6596bbf | |
parent | f037360f2ed111fe89a8f5cb6ba351f4e9934e53 (diff) |
[PATCH] m68k: m68k-specific thread_info changes
a) added embedded thread_info [m68k processor.h]
b) added missing symbols in asm-offsets.c
c) task_thread_info() and friends in asm-m68k/thread_info.h
d) made m68k thread_info.h included by m68k processor.h, not the other way
round.
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/m68k/kernel/asm-offsets.c | 5 | ||||
-rw-r--r-- | include/asm-m68k/processor.h | 2 | ||||
-rw-r--r-- | include/asm-m68k/thread_info.h | 14 |
3 files changed, 17 insertions, 4 deletions
diff --git a/arch/m68k/kernel/asm-offsets.c b/arch/m68k/kernel/asm-offsets.c index cee3317b8665..30beacfef8fb 100644 --- a/arch/m68k/kernel/asm-offsets.c +++ b/arch/m68k/kernel/asm-offsets.c | |||
@@ -31,6 +31,7 @@ int main(void) | |||
31 | DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, thread.work.sigpending)); | 31 | DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, thread.work.sigpending)); |
32 | DEFINE(TASK_NOTIFY_RESUME, offsetof(struct task_struct, thread.work.notify_resume)); | 32 | DEFINE(TASK_NOTIFY_RESUME, offsetof(struct task_struct, thread.work.notify_resume)); |
33 | DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); | 33 | DEFINE(TASK_THREAD, offsetof(struct task_struct, thread)); |
34 | DEFINE(TASK_INFO, offsetof(struct task_struct, thread.info)); | ||
34 | DEFINE(TASK_MM, offsetof(struct task_struct, mm)); | 35 | DEFINE(TASK_MM, offsetof(struct task_struct, mm)); |
35 | DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); | 36 | DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); |
36 | 37 | ||
@@ -45,6 +46,10 @@ int main(void) | |||
45 | DEFINE(THREAD_FPCNTL, offsetof(struct thread_struct, fpcntl)); | 46 | DEFINE(THREAD_FPCNTL, offsetof(struct thread_struct, fpcntl)); |
46 | DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate)); | 47 | DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate)); |
47 | 48 | ||
49 | /* offsets into the thread_info struct */ | ||
50 | DEFINE(TINFO_PREEMPT, offsetof(struct thread_info, preempt_count)); | ||
51 | DEFINE(TINFO_FLAGS, offsetof(struct thread_info, flags)); | ||
52 | |||
48 | /* offsets into the pt_regs */ | 53 | /* offsets into the pt_regs */ |
49 | DEFINE(PT_D0, offsetof(struct pt_regs, d0)); | 54 | DEFINE(PT_D0, offsetof(struct pt_regs, d0)); |
50 | DEFINE(PT_ORIG_D0, offsetof(struct pt_regs, orig_d0)); | 55 | DEFINE(PT_ORIG_D0, offsetof(struct pt_regs, orig_d0)); |
diff --git a/include/asm-m68k/processor.h b/include/asm-m68k/processor.h index df1575db32af..84b4b26df04c 100644 --- a/include/asm-m68k/processor.h +++ b/include/asm-m68k/processor.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) | 14 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) |
15 | 15 | ||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #include <linux/thread_info.h> | ||
17 | #include <asm/segment.h> | 18 | #include <asm/segment.h> |
18 | #include <asm/fpu.h> | 19 | #include <asm/fpu.h> |
19 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
@@ -79,6 +80,7 @@ struct thread_struct { | |||
79 | unsigned long fpcntl[3]; /* fp control regs */ | 80 | unsigned long fpcntl[3]; /* fp control regs */ |
80 | unsigned char fpstate[FPSTATESIZE]; /* floating point state */ | 81 | unsigned char fpstate[FPSTATESIZE]; /* floating point state */ |
81 | struct task_work work; | 82 | struct task_work work; |
83 | struct thread_info info; | ||
82 | }; | 84 | }; |
83 | 85 | ||
84 | #define INIT_THREAD { \ | 86 | #define INIT_THREAD { \ |
diff --git a/include/asm-m68k/thread_info.h b/include/asm-m68k/thread_info.h index 2aed24f6fd2e..4fdbf55f95e5 100644 --- a/include/asm-m68k/thread_info.h +++ b/include/asm-m68k/thread_info.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _ASM_M68K_THREAD_INFO_H | 2 | #define _ASM_M68K_THREAD_INFO_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <asm/processor.h> | ||
6 | #include <asm/page.h> | 5 | #include <asm/page.h> |
7 | 6 | ||
8 | struct thread_info { | 7 | struct thread_info { |
@@ -35,14 +34,21 @@ struct thread_info { | |||
35 | #define free_thread_info(ti) free_pages((unsigned long)(ti),1) | 34 | #define free_thread_info(ti) free_pages((unsigned long)(ti),1) |
36 | #endif /* PAGE_SHIFT == 13 */ | 35 | #endif /* PAGE_SHIFT == 13 */ |
37 | 36 | ||
38 | //#define init_thread_info (init_task.thread.info) | 37 | #define init_thread_info (init_task.thread.info) |
39 | #define init_stack (init_thread_union.stack) | 38 | #define init_stack (init_thread_union.stack) |
40 | 39 | ||
41 | #define current_thread_info() (current->thread_info) | 40 | #define task_thread_info(tsk) (&(tsk)->thread.info) |
42 | 41 | #define current_thread_info() task_thread_info(current) | |
43 | 42 | ||
44 | #define __HAVE_THREAD_FUNCTIONS | 43 | #define __HAVE_THREAD_FUNCTIONS |
45 | 44 | ||
45 | #define setup_thread_stack(p, org) ({ \ | ||
46 | *(struct task_struct **)(p)->thread_info = (p); \ | ||
47 | task_thread_info(p)->task = (p); \ | ||
48 | }) | ||
49 | |||
50 | #define end_of_stack(p) ((unsigned long *)(p)->thread_info + 1) | ||
51 | |||
46 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 52 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
47 | #define TIF_DELAYED_TRACE 1 /* single step a syscall */ | 53 | #define TIF_DELAYED_TRACE 1 /* single step a syscall */ |
48 | #define TIF_NOTIFY_RESUME 2 /* resumption notification requested */ | 54 | #define TIF_NOTIFY_RESUME 2 /* resumption notification requested */ |