2008-03-12 17:33:27

by Martin Schwidefsky

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

From: Heiko Carstens <[email protected]>

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

Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
---

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.


2008-03-12 23:03:46

by Andrew Morton

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

On Wed, 12 Mar 2008 18:31:58 +0100
Martin Schwidefsky <[email protected]> wrote:

> +#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
> +extern int arch_reinit_sched_domains(void);
> +#endif

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.

2008-03-13 09:49:13

by Martin Schwidefsky

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

On Wed, 2008-03-12 at 16:03 -0700, Andrew Morton wrote:
> > +#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
> > +extern int arch_reinit_sched_domains(void);
> > +#endif
>
> 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.

Ok, I've removed the #if.

--
blue skies,
Martin.

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

2008-03-21 12:30:16

by Ingo Molnar

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


* Martin Schwidefsky <[email protected]> wrote:

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

thanks, applied.

> +#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
> +extern int arch_reinit_sched_domains(void);
> +#endif

i removed the #ifdefs around this.

Ingo