diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/tile/include/asm/thread_info.h | 6 | ||||
-rw-r--r-- | arch/tile/kernel/process.c | 23 |
2 files changed, 4 insertions, 25 deletions
diff --git a/arch/tile/include/asm/thread_info.h b/arch/tile/include/asm/thread_info.h index bc4f562bd459..c1cf8a8b0514 100644 --- a/arch/tile/include/asm/thread_info.h +++ b/arch/tile/include/asm/thread_info.h | |||
@@ -77,16 +77,14 @@ struct thread_info { | |||
77 | 77 | ||
78 | #ifndef __ASSEMBLY__ | 78 | #ifndef __ASSEMBLY__ |
79 | 79 | ||
80 | void arch_release_thread_info(struct thread_info *info); | ||
81 | |||
80 | /* How to get the thread information struct from C. */ | 82 | /* How to get the thread information struct from C. */ |
81 | register unsigned long stack_pointer __asm__("sp"); | 83 | register unsigned long stack_pointer __asm__("sp"); |
82 | 84 | ||
83 | #define current_thread_info() \ | 85 | #define current_thread_info() \ |
84 | ((struct thread_info *)(stack_pointer & -THREAD_SIZE)) | 86 | ((struct thread_info *)(stack_pointer & -THREAD_SIZE)) |
85 | 87 | ||
86 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | ||
87 | extern struct thread_info *alloc_thread_info_node(struct task_struct *task, int node); | ||
88 | extern void free_thread_info(struct thread_info *info); | ||
89 | |||
90 | /* Sit on a nap instruction until interrupted. */ | 88 | /* Sit on a nap instruction until interrupted. */ |
91 | extern void smp_nap(void); | 89 | extern void smp_nap(void); |
92 | 90 | ||
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); |