mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Max Krasnyansky <maxk@qualcomm.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org, a.p.zijlstra@chello.nl, pj@sgi.com,
	Max Krasnyansky <maxk@qualcomm.com>
Subject: [PATCH sched-devel 4/7] cpuisol: Move on-stack array used for boot cmd parsing into __initdata
Date: Fri, 22 Feb 2008 13:09:15 -0800	[thread overview]
Message-ID: <1203714558-20904-4-git-send-email-maxk@qualcomm.com> (raw)
In-Reply-To: <1203714558-20904-3-git-send-email-maxk@qualcomm.com>

Suggested by Andrew Morton:

  isolated_cpu_setup() has an on-stack array of NR_CPUS integers.  This
  will consume 4k of stack on ia64 (at least).  We'll just squeak through
  for a ittle while, but this needs to be fixed.  Just move it into
  __initdata.

Signed-off-by: Max Krasnyansky <maxk@qualcomm.com>
---
 kernel/cpu.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index a0ac386..b3af739 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -446,15 +446,20 @@ out:
 
 #ifdef CONFIG_CPUISOL
 /* Setup the mask of isolated cpus */
+
+static int __initdata isolcpu[NR_CPUS];
+
 static int __init isolated_cpu_setup(char *str)
 {
-	int ints[NR_CPUS], i;
+	int i, n;
+
+	str = get_options(str, ARRAY_SIZE(isolcpu), isolcpu);
+	n   = isolcpu[0];
 
-	str = get_options(str, ARRAY_SIZE(ints), ints);
 	cpus_clear(cpu_isolated_map);
-	for (i = 1; i <= ints[0]; i++)
-		if (ints[i] < NR_CPUS)
-			cpu_set(ints[i], cpu_isolated_map);
+	for (i = 1; i <= n; i++)
+		if (isolcpu[i] < NR_CPUS)
+			cpu_set(isolcpu[i], cpu_isolated_map);
 	return 1;
 }
 
-- 
1.5.4.1


  reply	other threads:[~2008-02-22 21:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22 21:09 [PATCH sched-devel 1/7] cpuisol: Make cpu isolation configrable and export isolated map Max Krasnyansky
2008-02-22 21:09 ` [PATCH sched-devel 2/7] cpuisol: Do not route IRQs to the CPUs isolated at boot Max Krasnyansky
2008-02-22 21:09   ` [PATCH sched-devel 3/7] cpuisol: Do not schedule workqueues on the isolated CPUs Max Krasnyansky
2008-02-22 21:09     ` Max Krasnyansky [this message]
2008-02-22 21:09       ` [PATCH sched-devel 5/7] cpuisol: Documentation updates Max Krasnyansky
2008-02-22 21:09         ` [PATCH sched-devel 6/7] cpuisol: Minor updates to the Kconfig options Max Krasnyansky
2008-02-22 21:09           ` [PATCH sched-devel 7/7] cpuisol: Do not halt isolated CPUs with Stop Machine Max Krasnyansky

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=1203714558-20904-4-git-send-email-maxk@qualcomm.com \
    --to=maxk@qualcomm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pj@sgi.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

all inboxes | Powered by JetHome®