public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Travis <travis@sgi.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org
Subject: [PATCH] sched: fix-local_cpu_mask
Date: Mon, 24 Nov 2008 11:19:48 -0800	[thread overview]
Message-ID: <492AFE54.6030906@sgi.com> (raw)
In-Reply-To: <20081124172343.GB11971@elte.hu>

Ingo Molnar wrote:
> plus there's a build failure as well on 32-bit:
> 
> kernel/sched_rt.c:1561: error: 'per_cpu__local_cpu_mask' undeclared (first use in this function)
> kernel/sched_rt.c:1561: error: (Each undeclared identifier is reported only once
> kernel/sched_rt.c:1561: error: for each function it appears in.)
> kernel/sched.c:8348: error: 'nohz' undeclared (first use in this function)
> kernel/sched.c:8350: error: 'cpu_isolated_map' undeclared (first use in this function)
> 
> with the attached config, caused by your patches. Please send delta 
> fixes against tip/cpus4096.
> 
> Thanks,
> 
> 	Ingo
> 
sched: fix-local_cpu_mask

This should fix the errors for the i386 non-smp case.  I've also
checked it against the 32/64 allnoconfigs and allyesconfigs.

Based on tip/cpus4096 @ v2.6.28-rc6-254-g96f874e

Signed-off-by: Mike Travis <travis@sgi.com>
---
 kernel/sched.c    |    6 ++++--
 kernel/sched_rt.c |    4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

--- linux-2.6.28-tip-cpumasks.orig/kernel/sched.c
+++ linux-2.6.28-tip-cpumasks/kernel/sched.c
@@ -8347,12 +8347,14 @@ void __init sched_init(void)
 	 */
 	current->sched_class = &fair_sched_class;
 
-	/* Allocate the nohz_cpu_mask if CONFIG_CPUMASK_OFFSTACK */
-	alloc_bootmem_cpumask_var(&nohz_cpu_mask);
+#ifdef CONFIG_SMP
 #ifdef CONFIG_NO_HZ
+	/* Allocate the nohz_cpu_mask if CONFIG_CPUMASK_OFFSTACK */
 	alloc_bootmem_cpumask_var(&nohz.cpu_mask);
 #endif
+	/* Allocate the cpu_isolated_map if CONFIG_CPUMASK_OFFSTACK */
 	alloc_bootmem_cpumask_var(&cpu_isolated_map);
+#endif
 
 	scheduler_running = 1;
 }
--- linux-2.6.28-tip-cpumasks.orig/kernel/sched_rt.c
+++ linux-2.6.28-tip-cpumasks/kernel/sched_rt.c
@@ -1552,7 +1552,8 @@ static void print_rt_stats(struct seq_fi
 }
 #endif /* CONFIG_SCHED_DEBUG */
 
-/* Note that this is never called for !SMP, but that's OK. */
+#ifdef CONFIG_SMP
+/* Note that this is never called for !SMP */
 static inline void init_sched_rt_class(void)
 {
 	unsigned int i;
@@ -1560,3 +1561,4 @@ static inline void init_sched_rt_class(v
 	for_each_possible_cpu(i)
 		alloc_cpumask_var(&per_cpu(local_cpu_mask, i), GFP_KERNEL);
 }
+#endif


  reply	other threads:[~2008-11-24 19:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 16:08 [PULL] cpumask conversion patches for sched Rusty Russell
2008-11-24 17:17 ` Ingo Molnar
2008-11-24 17:22   ` Ingo Molnar
2008-11-24 17:23   ` Ingo Molnar
2008-11-24 19:19     ` Mike Travis [this message]
2008-11-25 15:10       ` [PATCH] sched: fix-local_cpu_mask Mike Travis
2008-11-24 23:27     ` [PULL] cpumask conversion patches for sched Rusty Russell
2008-11-26  6:59       ` Ingo Molnar
2008-11-24 23:27     ` [PATCH 1/3] Fix commits 7d1e6a9b and dcc30a35 for UP build Rusty Russell
2008-11-24 23:28       ` [PATCH 2/3] Fix commit 0e3900e6 " Rusty Russell
2008-11-24 23:29         ` [PATCH 3/3] Fix locking error caused by e76bd8d9850c2296a7e8e24c9dce9b5e6b55fe2f Rusty Russell
2008-11-25 16:52           ` Mike Travis
2008-11-25 16:55           ` [PATCH 1/1] Slight fix for locking-fix patch to remove compiler warning Mike Travis
2008-11-26  7:56             ` Rusty Russell

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=492AFE54.6030906@sgi.com \
    --to=travis@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    /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