Skip to contentSkip to conversation

PPC64 (3/3) Allocate irqstacks only for possible cpus

PATCH New Paul Mackerras 1 participant 1 message Aug 30, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PPC64 (3/3) Allocate irqstacks only for possible cpus

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

arch/ppc64/kernel/irq.c +1 -1
diff -urN akpm-29aug/arch/ppc64/kernel/irq.c akpm/arch/ppc64/kernel/irq.c
@@ -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;
arch/ppc64/kernel/setup.c +1 -1
diff -urN akpm-29aug/arch/ppc64/kernel/setup.c akpm/arch/ppc64/kernel/setup.c
@@ -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,