diff options
author | Greg Ungerer <gerg@uclinux.org> | 2011-09-02 00:29:34 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2011-12-24 06:47:56 -0500 |
commit | d25ba98afce7c87afa39f553a3ff8effed87db03 (patch) | |
tree | e7158225d753e7dad7b885116672b4485fb3809e /arch/m68k/include | |
parent | 8d362b0dea1a35bea8d7d281317eb7ccb713edcb (diff) |
m68k: remove thread_info struct from thread struct
Currently on m68k we have a comeplete thread_info structure stored inside
of the thread_struct, and we also have it in the initial part of the kernel
stack. Mostly the code currently uses the one inside of the thread_struct,
only using the "task" pointer from the stack based one.
This is wasteful and confusing, we should only have the single instance of
thread_info inside the stack page. And this is the norm for all other
architectures.
This change makes m68k handle thread_info consistently on both MMU enabled
and non-MMU setups.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/include')
-rw-r--r-- | arch/m68k/include/asm/processor.h | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/thread_info.h | 30 |
2 files changed, 0 insertions, 32 deletions
diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h index 568facf30276..7ec06096a6fb 100644 --- a/arch/m68k/include/asm/processor.h +++ b/arch/m68k/include/asm/processor.h | |||
@@ -88,14 +88,12 @@ struct thread_struct { | |||
88 | unsigned long fp[8*3]; | 88 | unsigned long fp[8*3]; |
89 | unsigned long fpcntl[3]; /* fp control regs */ | 89 | unsigned long fpcntl[3]; /* fp control regs */ |
90 | unsigned char fpstate[FPSTATESIZE]; /* floating point state */ | 90 | unsigned char fpstate[FPSTATESIZE]; /* floating point state */ |
91 | struct thread_info info; | ||
92 | }; | 91 | }; |
93 | 92 | ||
94 | #define INIT_THREAD { \ | 93 | #define INIT_THREAD { \ |
95 | .ksp = sizeof(init_stack) + (unsigned long) init_stack, \ | 94 | .ksp = sizeof(init_stack) + (unsigned long) init_stack, \ |
96 | .sr = PS_S, \ | 95 | .sr = PS_S, \ |
97 | .fs = __KERNEL_DS, \ | 96 | .fs = __KERNEL_DS, \ |
98 | .info = INIT_THREAD_INFO(init_task), \ | ||
99 | } | 97 | } |
100 | 98 | ||
101 | #ifdef CONFIG_MMU | 99 | #ifdef CONFIG_MMU |
diff --git a/arch/m68k/include/asm/thread_info.h b/arch/m68k/include/asm/thread_info.h index e4e2159ca6ec..01cef3ceff46 100644 --- a/arch/m68k/include/asm/thread_info.h +++ b/arch/m68k/include/asm/thread_info.h | |||
@@ -47,34 +47,6 @@ struct thread_info { | |||
47 | 47 | ||
48 | #define init_stack (init_thread_union.stack) | 48 | #define init_stack (init_thread_union.stack) |
49 | 49 | ||
50 | #ifdef CONFIG_MMU | ||
51 | |||
52 | #ifndef __ASSEMBLY__ | ||
53 | #include <asm/current.h> | ||
54 | #endif | ||
55 | |||
56 | #ifdef ASM_OFFSETS_C | ||
57 | #define task_thread_info(tsk) ((struct thread_info *) NULL) | ||
58 | #else | ||
59 | #include <asm/asm-offsets.h> | ||
60 | #define task_thread_info(tsk) ((struct thread_info *)((char *)tsk+TASK_INFO)) | ||
61 | #endif | ||
62 | |||
63 | #define init_thread_info (init_task.thread.info) | ||
64 | #define task_stack_page(tsk) ((tsk)->stack) | ||
65 | #define current_thread_info() task_thread_info(current) | ||
66 | |||
67 | #define __HAVE_THREAD_FUNCTIONS | ||
68 | |||
69 | #define setup_thread_stack(p, org) ({ \ | ||
70 | *(struct task_struct **)(p)->stack = (p); \ | ||
71 | task_thread_info(p)->task = (p); \ | ||
72 | }) | ||
73 | |||
74 | #define end_of_stack(p) ((unsigned long *)(p)->stack + 1) | ||
75 | |||
76 | #else /* !CONFIG_MMU */ | ||
77 | |||
78 | #ifndef __ASSEMBLY__ | 50 | #ifndef __ASSEMBLY__ |
79 | /* how to get the thread information struct from C */ | 51 | /* how to get the thread information struct from C */ |
80 | static inline struct thread_info *current_thread_info(void) | 52 | static inline struct thread_info *current_thread_info(void) |
@@ -92,8 +64,6 @@ static inline struct thread_info *current_thread_info(void) | |||
92 | 64 | ||
93 | #define init_thread_info (init_thread_union.thread_info) | 65 | #define init_thread_info (init_thread_union.thread_info) |
94 | 66 | ||
95 | #endif /* CONFIG_MMU */ | ||
96 | |||
97 | /* entry.S relies on these definitions! | 67 | /* entry.S relies on these definitions! |
98 | * bits 0-7 are tested at every exception exit | 68 | * bits 0-7 are tested at every exception exit |
99 | * bits 8-15 are also tested at syscall exit | 69 | * bits 8-15 are also tested at syscall exit |