Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5e10287 authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

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: default avatarThomas 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
parent 66bb4cda
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -152,6 +152,14 @@ config GENERIC_SMP_IDLE_THREAD
config ARCH_INIT_TASK
       bool

# Select if arch has its private alloc_task_struct() function
config ARCH_TASK_STRUCT_ALLOCATOR
	bool

# Select if arch has its private alloc_thread_info() function
config ARCH_THREAD_INFO_ALLOCATOR
	bool

config HAVE_REGS_AND_STACK_ACCESS_API
	bool
	help
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ config IA64
	select GENERIC_IOMAP
	select GENERIC_SMP_IDLE_THREAD
	select ARCH_INIT_TASK
	select ARCH_TASK_STRUCT_ALLOCATOR
	select ARCH_THREAD_INFO_ALLOCATOR
	default y
	help
	  The Itanium Processor Family is Intel's 64-bit successor to
+0 −3
Original line number Diff line number Diff line
@@ -54,8 +54,6 @@ struct thread_info {
	},					\
}

#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR

#ifndef ASM_OFFSETS_C
/* how to get the thread information struct from C */
#define current_thread_info()	((struct thread_info *) ((char *) current + IA64_TASK_SIZE))
@@ -84,7 +82,6 @@ struct thread_info {
#endif
#define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)

#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
#define alloc_task_struct_node(node)						\
({										\
	struct page *page = alloc_pages_node(node, GFP_KERNEL | __GFP_COMP,	\
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ config SPARC32
	def_bool !64BIT
	select GENERIC_ATOMIC64
	select CLZ_TAB
	select ARCH_THREAD_INFO_ALLOCATOR

config SPARC64
	def_bool 64BIT
+0 −2
Original line number Diff line number Diff line
@@ -80,8 +80,6 @@ register struct thread_info *current_thread_info_reg asm("g6");
 */
#define THREAD_INFO_ORDER  1

#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR

BTFIXUPDEF_CALL(struct thread_info *, alloc_thread_info_node, int)
#define alloc_thread_info_node(tsk, node) BTFIXUP_CALL(alloc_thread_info_node)(node)

Loading