mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: akpm@osdl.org
Cc: nathanl@austin.ibm.com, anton@samba.org, linux-kernel@vger.kernel.org
Subject: [PATCH] PPC64 (3/3) Allocate irqstacks only for possible cpus
Date: Mon, 30 Aug 2004 15:07:30 +1000	[thread overview]
Message-ID: <16690.46610.830797.583601@cargo.ozlabs.ibm.com> (raw)

With earlier setup of cpu_possible_map the number of irqstacks shrinks
from NR_CPUS to the number of possible cpus.

Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

diff -urN akpm-29aug/arch/ppc64/kernel/irq.c akpm/arch/ppc64/kernel/irq.c
--- akpm-29aug/arch/ppc64/kernel/irq.c	2004-08-30 10:55:36.000000000 +1000
+++ akpm/arch/ppc64/kernel/irq.c	2004-08-30 15:02:33.104245224 +1000
@@ -929,7 +929,7 @@
 	struct thread_info *tp;
 	int i;
 
-	for (i = 0; i < NR_CPUS; i++) {
+	for_each_cpu(i) {
 		memset((void *)softirq_ctx[i], 0, THREAD_SIZE);
 		tp = softirq_ctx[i];
 		tp->cpu = i;
diff -urN akpm-29aug/arch/ppc64/kernel/setup.c akpm/arch/ppc64/kernel/setup.c
--- akpm-29aug/arch/ppc64/kernel/setup.c	2004-08-30 15:02:42.393296512 +1000
+++ akpm/arch/ppc64/kernel/setup.c	2004-08-30 15:02:33.069250544 +1000
@@ -701,7 +701,7 @@
 	int i;
 
 	/* interrupt stacks must be under 256MB, we cannot afford to take SLB misses on them */
-	for (i = 0; i < NR_CPUS; i++) {
+	for_each_cpu(i) {
 		softirq_ctx[i] = (struct thread_info *)__va(lmb_alloc_base(THREAD_SIZE,
 					THREAD_SIZE, 0x10000000));
 		hardirq_ctx[i] = (struct thread_info *)__va(lmb_alloc_base(THREAD_SIZE,

                 reply	other threads:[~2004-08-30  5:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=16690.46610.830797.583601@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=akpm@osdl.org \
    --cc=anton@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathanl@austin.ibm.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®