diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-05-05 11:05:47 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2012-05-08 07:55:20 -0400 |
commit | d909a81b198a397593495508c4a5755fe95552fb (patch) | |
tree | a768be25c94b68d157d76d537a6bf763ea5fc076 /arch/tile/kernel | |
parent | 41101809a865dd0be1b56eff46c83fad321870b2 (diff) |
tile: Use common threadinfo allocator
Use the core allocator and deal with the extra cleanup in
arch_release_thread_info().
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Link: http://lkml.kernel.org/r/20120505150142.311126440@linutronix.de
Diffstat (limited to 'arch/tile/kernel')
-rw-r--r-- | arch/tile/kernel/process.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c index 2d5ef617bb39..efb9833ce892 100644 --- a/arch/tile/kernel/process.c +++ b/arch/tile/kernel/process.c | |||
@@ -114,27 +114,10 @@ void cpu_idle(void) | |||
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | struct thread_info *alloc_thread_info_node(struct task_struct *task, int node) | ||
118 | { | ||
119 | struct page *page; | ||
120 | gfp_t flags = GFP_KERNEL; | ||
121 | |||
122 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
123 | flags |= __GFP_ZERO; | ||
124 | #endif | ||
125 | |||
126 | page = alloc_pages_node(node, flags, THREAD_SIZE_ORDER); | ||
127 | if (!page) | ||
128 | return NULL; | ||
129 | |||
130 | return (struct thread_info *)page_address(page); | ||
131 | } | ||
132 | |||
133 | /* | 117 | /* |
134 | * Free a thread_info node, and all of its derivative | 118 | * Release a thread_info structure |
135 | * data structures. | ||
136 | */ | 119 | */ |
137 | void free_thread_info(struct thread_info *info) | 120 | void arch_release_thread_info(struct thread_info *info) |
138 | { | 121 | { |
139 | struct single_step_state *step_state = info->step_state; | 122 | struct single_step_state *step_state = info->step_state; |
140 | 123 | ||
@@ -169,8 +152,6 @@ void free_thread_info(struct thread_info *info) | |||
169 | */ | 152 | */ |
170 | kfree(step_state); | 153 | kfree(step_state); |
171 | } | 154 | } |
172 | |||
173 | free_pages((unsigned long)info, THREAD_SIZE_ORDER); | ||
174 | } | 155 | } |
175 | 156 | ||
176 | static void save_arch_state(struct thread_struct *t); | 157 | static void save_arch_state(struct thread_struct *t); |