aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-05-05 11:05:43 -0400
committerThomas Gleixner <tglx@linutronix.de>2012-05-08 08:08:44 -0400
commit803fc74f06cf3cd23417463ca5a176b41717ec19 (patch)
treea5b7f19e7c3f62249205565d8ffadc31532244cb /arch
parent38e7c572ce7310def003d8bb7c34260f5d8118cb (diff)
cris: Use common threadinfo allocator
There is no functional difference. __get_free_pages() ends up calling alloc_pages_node(). This also allocates only one page which matches THREAD_SIZE instead of an extra page for nothing. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Link: http://lkml.kernel.org/r/20120505150141.681236240@linutronix.de
Diffstat (limited to 'arch')
-rw-r--r--arch/cris/include/asm/processor.h5
-rw-r--r--arch/cris/include/asm/thread_info.h6
2 files changed, 2 insertions, 9 deletions
diff --git a/arch/cris/include/asm/processor.h b/arch/cris/include/asm/processor.h
index 4210d72a6667..8dc56ef08712 100644
--- a/arch/cris/include/asm/processor.h
+++ b/arch/cris/include/asm/processor.h
@@ -25,13 +25,12 @@ struct task_struct;
25 */ 25 */
26#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) 26#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
27 27
28/* THREAD_SIZE is the size of the task_struct/kernel_stack combo. 28/* THREAD_SIZE is the size of the thread_info/kernel_stack combo.
29 * normally, the stack is found by doing something like p + THREAD_SIZE 29 * normally, the stack is found by doing something like p + THREAD_SIZE
30 * in CRIS, a page is 8192 bytes, which seems like a sane size 30 * in CRIS, a page is 8192 bytes, which seems like a sane size
31 */ 31 */
32
33#define THREAD_SIZE PAGE_SIZE 32#define THREAD_SIZE PAGE_SIZE
34#define KERNEL_STACK_SIZE PAGE_SIZE 33#define THREAD_SIZE_ORDER (0)
35 34
36/* 35/*
37 * At user->kernel entry, the pt_regs struct is stacked on the top of the kernel-stack. 36 * At user->kernel entry, the pt_regs struct is stacked on the top of the kernel-stack.
diff --git a/arch/cris/include/asm/thread_info.h b/arch/cris/include/asm/thread_info.h
index 29b92884d793..5b1c448df5c0 100644
--- a/arch/cris/include/asm/thread_info.h
+++ b/arch/cris/include/asm/thread_info.h
@@ -65,12 +65,6 @@ struct thread_info {
65 65
66#define init_thread_info (init_thread_union.thread_info) 66#define init_thread_info (init_thread_union.thread_info)
67 67
68#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
69/* thread information allocation */
70#define alloc_thread_info_node(tsk, node) \
71 ((struct thread_info *) __get_free_pages(GFP_KERNEL, 1))
72#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
73
74#endif /* !__ASSEMBLY__ */ 68#endif /* !__ASSEMBLY__ */
75 69
76/* 70/*