aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-05-05 11:05:48 -0400
committerThomas Gleixner <tglx@linutronix.de>2012-05-08 08:08:46 -0400
commitf5e10287367dcffb5504d19c83e85ca041ca2596 (patch)
treecaa6684a16ed32809b328f858711758dc7b0c9bb /arch
parent66bb4cda55477efeb1be5c2cbd3785a69b088a8a (diff)
task_allocator: Use config switches instead of magic defines
Replace __HAVE_ARCH_TASK_ALLOCATOR and __HAVE_ARCH_THREAD_ALLOCATOR with proper config switches. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Tony Luck <tony.luck@intel.com> Link: http://lkml.kernel.org/r/20120505150142.371309416@linutronix.de
Diffstat (limited to 'arch')
-rw-r--r--arch/Kconfig8
-rw-r--r--arch/ia64/Kconfig2
-rw-r--r--arch/ia64/include/asm/thread_info.h3
-rw-r--r--arch/sparc/Kconfig1
-rw-r--r--arch/sparc/include/asm/thread_info_32.h2
5 files changed, 11 insertions, 5 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index 597b132b3902..bd265a217bd2 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -152,6 +152,14 @@ config GENERIC_SMP_IDLE_THREAD
152config ARCH_INIT_TASK 152config ARCH_INIT_TASK
153 bool 153 bool
154 154
155# Select if arch has its private alloc_task_struct() function
156config ARCH_TASK_STRUCT_ALLOCATOR
157 bool
158
159# Select if arch has its private alloc_thread_info() function
160config ARCH_THREAD_INFO_ALLOCATOR
161 bool
162
155config HAVE_REGS_AND_STACK_ACCESS_API 163config HAVE_REGS_AND_STACK_ACCESS_API
156 bool 164 bool
157 help 165 help
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 022ea3a9d1ab..ba667b60f32d 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -35,6 +35,8 @@ config IA64
35 select GENERIC_IOMAP 35 select GENERIC_IOMAP
36 select GENERIC_SMP_IDLE_THREAD 36 select GENERIC_SMP_IDLE_THREAD
37 select ARCH_INIT_TASK 37 select ARCH_INIT_TASK
38 select ARCH_TASK_STRUCT_ALLOCATOR
39 select ARCH_THREAD_INFO_ALLOCATOR
38 default y 40 default y
39 help 41 help
40 The Itanium Processor Family is Intel's 64-bit successor to 42 The Itanium Processor Family is Intel's 64-bit successor to
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h
index e054bcc4273c..310d9734f02d 100644
--- a/arch/ia64/include/asm/thread_info.h
+++ b/arch/ia64/include/asm/thread_info.h
@@ -54,8 +54,6 @@ struct thread_info {
54 }, \ 54 }, \
55} 55}
56 56
57#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
58
59#ifndef ASM_OFFSETS_C 57#ifndef ASM_OFFSETS_C
60/* how to get the thread information struct from C */ 58/* how to get the thread information struct from C */
61#define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) 59#define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE))
@@ -84,7 +82,6 @@ struct thread_info {
84#endif 82#endif
85#define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) 83#define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)
86 84
87#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
88#define alloc_task_struct_node(node) \ 85#define alloc_task_struct_node(node) \
89({ \ 86({ \
90 struct page *page = alloc_pages_node(node, GFP_KERNEL | __GFP_COMP, \ 87 struct page *page = alloc_pages_node(node, GFP_KERNEL | __GFP_COMP, \
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index e417f35d5912..ec0347aaeaa8 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -36,6 +36,7 @@ config SPARC32
36 def_bool !64BIT 36 def_bool !64BIT
37 select GENERIC_ATOMIC64 37 select GENERIC_ATOMIC64
38 select CLZ_TAB 38 select CLZ_TAB
39 select ARCH_THREAD_INFO_ALLOCATOR
39 40
40config SPARC64 41config SPARC64
41 def_bool 64BIT 42 def_bool 64BIT
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h
index c2a1080cdd3b..b29498dea6b7 100644
--- a/arch/sparc/include/asm/thread_info_32.h
+++ b/arch/sparc/include/asm/thread_info_32.h
@@ -80,8 +80,6 @@ register struct thread_info *current_thread_info_reg asm("g6");
80 */ 80 */
81#define THREAD_INFO_ORDER 1 81#define THREAD_INFO_ORDER 1
82 82
83#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR
84
85BTFIXUPDEF_CALL(struct thread_info *, alloc_thread_info_node, int) 83BTFIXUPDEF_CALL(struct thread_info *, alloc_thread_info_node, int)
86#define alloc_thread_info_node(tsk, node) BTFIXUP_CALL(alloc_thread_info_node)(node) 84#define alloc_thread_info_node(tsk, node) BTFIXUP_CALL(alloc_thread_info_node)(node)
87 85