]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc64: allocate irqstacks only for possible cpus
authorPaul Mackerras <paulus@samba.org>
Tue, 31 Aug 2004 03:33:34 +0000 (20:33 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 31 Aug 2004 03:33:34 +0000 (20:33 -0700)
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>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc64/kernel/irq.c
arch/ppc64/kernel/setup.c

index be8aed915abbf23e1a8dbd17af8732432d61eaec..2fc67de5bbc1cf36ec4210a876f484adf742ca2c 100644 (file)
@@ -931,7 +931,7 @@ void irq_ctx_init(void)
        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;
index 9d7f351fc976d0123325414adc90fff17f9c695b..4baa8cf38cd9dcff1943879ef5b4358d23ec1e6e 100644 (file)
@@ -701,7 +701,7 @@ static void __init irqstack_early_init(void)
        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,