Re: [patch 03/10] sched: add exported arch_reinit_sched_domains() to header file.

Previous thread: [patch 02/10] Export stfle. by Martin Schwidefsky on Wednesday, March 12, 2008 - 10:31 am. (1 message)

Next thread: [patch 04/10] sched: Add arch_update_cpu_topology hook. by Martin Schwidefsky on Wednesday, March 12, 2008 - 10:31 am. (2 messages)
From: Martin Schwidefsky
Date: Wednesday, March 12, 2008 - 10:31 am

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Needed so it can be called from outside of sched.c.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 include/linux/sched.h |    4 ++++
 kernel/sched.c        |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

Index: quilt-2.6/include/linux/sched.h
===================================================================
--- quilt-2.6.orig/include/linux/sched.h
+++ quilt-2.6/include/linux/sched.h
@@ -791,6 +791,10 @@ struct sched_domain {
 
 extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new);
 
+#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
+extern int arch_reinit_sched_domains(void);
+#endif
+
 #endif	/* CONFIG_SMP */
 
 /*
Index: quilt-2.6/kernel/sched.c
===================================================================
--- quilt-2.6.orig/kernel/sched.c
+++ quilt-2.6/kernel/sched.c
@@ -6917,7 +6917,7 @@ match2:
 }
 
 #if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
-static int arch_reinit_sched_domains(void)
+int arch_reinit_sched_domains(void)
 {
 	int err;
 

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

--

From: Andrew Morton
Date: Wednesday, March 12, 2008 - 4:03 pm

On Wed, 12 Mar 2008 18:31:58 +0100

I tend to recommend that the ifdefs be omitted here.

It has the downside that the build will then fail at link-time rather than
at compile-time, but I haven't seen anyone complain about that.


--

From: Martin Schwidefsky
Date: Thursday, March 13, 2008 - 2:48 am

Ok, I've removed the #if.

-- 
blue skies,
  Martin.

"Reality continues to ruin my life." - Calvin.


--

From: Ingo Molnar
Date: Friday, March 21, 2008 - 5:29 am

i removed the #ifdefs around this.

	Ingo
--

Previous thread: [patch 02/10] Export stfle. by Martin Schwidefsky on Wednesday, March 12, 2008 - 10:31 am. (1 message)

Next thread: [patch 04/10] sched: Add arch_update_cpu_topology hook. by Martin Schwidefsky on Wednesday, March 12, 2008 - 10:31 am. (2 messages)