linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>, Tony Luck <tony.luck@intel.com>
Subject: [patch 18/18] task_allocator: Use config switches instead of magic defines
Date: Sat, 05 May 2012 15:05:48 -0000	[thread overview]
Message-ID: <20120505150142.371309416@linutronix.de> (raw)
In-Reply-To: 20120505150007.543515803@linutronix.de

[-- Attachment #1: task_allocator-use-config-switches-instead-of-magic-defines.patch --]
[-- Type: text/plain, Size: 4048 bytes --]

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>
---
 arch/Kconfig                            |    8 ++++++++
 arch/ia64/Kconfig                       |    2 ++
 arch/ia64/include/asm/thread_info.h     |    3 ---
 arch/sparc/Kconfig                      |    1 +
 arch/sparc/include/asm/thread_info_32.h |    2 --
 kernel/fork.c                           |    7 +++----
 6 files changed, 14 insertions(+), 9 deletions(-)

Index: tip/arch/Kconfig
===================================================================
--- tip.orig/arch/Kconfig
+++ tip/arch/Kconfig
@@ -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
Index: tip/arch/ia64/Kconfig
===================================================================
--- tip.orig/arch/ia64/Kconfig
+++ tip/arch/ia64/Kconfig
@@ -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
Index: tip/arch/ia64/include/asm/thread_info.h
===================================================================
--- tip.orig/arch/ia64/include/asm/thread_info.h
+++ tip/arch/ia64/include/asm/thread_info.h
@@ -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,	\
Index: tip/arch/sparc/Kconfig
===================================================================
--- tip.orig/arch/sparc/Kconfig
+++ tip/arch/sparc/Kconfig
@@ -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
Index: tip/arch/sparc/include/asm/thread_info_32.h
===================================================================
--- tip.orig/arch/sparc/include/asm/thread_info_32.h
+++ tip/arch/sparc/include/asm/thread_info_32.h
@@ -80,8 +80,6 @@ register struct thread_info *current_thr
  */
 #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)
 
Index: tip/kernel/fork.c
===================================================================
--- tip.orig/kernel/fork.c
+++ tip/kernel/fork.c
@@ -111,7 +111,7 @@ int nr_processes(void)
 	return total;
 }
 
-#ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
+#ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR
 static struct kmem_cache *task_struct_cachep;
 
 static inline struct task_struct *alloc_task_struct_node(int node)
@@ -128,8 +128,7 @@ static inline void free_task_struct(stru
 }
 #endif
 
-#ifndef __HAVE_ARCH_THREAD_INFO_ALLOCATOR
-
+#ifndef CONFIG_ARCH_THREAD_INFO_ALLOCATOR
 void __weak arch_release_thread_info(struct thread_info *ti) { }
 
 /*
@@ -243,7 +242,7 @@ void __init __weak arch_task_cache_init(
 
 void __init fork_init(unsigned long mempages)
 {
-#ifndef __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
+#ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR
 #ifndef ARCH_MIN_TASKALIGN
 #define ARCH_MIN_TASKALIGN	L1_CACHE_BYTES
 #endif



  parent reply	other threads:[~2012-05-05 15:05 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-05 15:05 [patch 00/18] fork: Move most archs to generic threadinfo/taskstruct allocators Thomas Gleixner
2012-05-05 15:05 ` [patch 01/18] fork: Remove the weak insanity Thomas Gleixner
2012-05-05 15:58   ` Sam Ravnborg
2012-05-07 20:55     ` Thomas Gleixner
2012-05-07 21:03       ` Sam Ravnborg
2012-05-08 12:31   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 03/18] fork: Move thread info gfp flags to header Thomas Gleixner
2012-05-07  4:34   ` Paul E. McKenney
2012-05-07 13:38     ` Paul E. McKenney
2012-05-07 19:14     ` Thomas Gleixner
2012-05-07 20:53       ` Paul E. McKenney
2012-05-08 17:51         ` Paul E. McKenney
2012-05-08 12:32   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 04/18] fork: Provide kmemcache based thread_info allocator Thomas Gleixner
2012-05-08 12:35   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 02/18] fork: Provide weak arch_release_[task_struct|thread_info] functions Thomas Gleixner
2012-05-08 12:33   ` [tip:smp/hotplug] fork: Provide weak arch_release_[ task_struct|thread_info] functions tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 05/18] x86: Use common threadinfo allocator Thomas Gleixner
2012-05-08 12:37   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 06/18] c6x: " Thomas Gleixner
2012-05-07 19:49   ` Mark Salter
2012-05-08 12:36   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 08/18] frv: " Thomas Gleixner
2012-05-08 12:38   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 07/18] cris: " Thomas Gleixner
2012-05-08 12:37   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-15 12:49   ` [patch 07/18] " Jesper Nilsson
2012-05-05 15:05 ` [patch 09/18] hexagon: " Thomas Gleixner
2012-05-08 12:40   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 10/18] m32r: " Thomas Gleixner
2012-05-08 12:39   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 11/18] mips: " Thomas Gleixner
2012-05-08 12:41   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 12/18] mn10300: " Thomas Gleixner
2012-05-08 12:42   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 13/18] powerpc: " Thomas Gleixner
2012-05-08 12:42   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 14/18] score: " Thomas Gleixner
2012-05-08 12:44   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 15/18] sh: " Thomas Gleixner
2012-05-08 12:43   ` [tip:smp/hotplug] sh-use-common-threadinfo-allocator tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 16/18] sparc: Use common threadinfo allocator Thomas Gleixner
2012-05-06 17:03   ` David Miller
2012-05-08 12:45   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-05 15:05 ` [patch 17/18] tile: " Thomas Gleixner
2012-05-05 15:21   ` Chris Metcalf
2012-05-07 19:45     ` Thomas Gleixner
2012-05-07 20:03       ` Chris Metcalf
2012-05-07 20:33         ` Thomas Gleixner
2012-05-07 20:52           ` Chris Metcalf
2012-05-08 12:04             ` Thomas Gleixner
2012-05-08 12:34   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner
2012-05-08 19:02     ` Chris Metcalf
2012-05-05 15:05 ` Thomas Gleixner [this message]
2012-05-07 20:32   ` [patch 18/18] task_allocator: Use config switches instead of magic defines Sam Ravnborg
2012-05-07 20:43     ` Thomas Gleixner
2012-05-08 12:46   ` [tip:smp/hotplug] " tip-bot for Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120505150142.371309416@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).