diff options
Diffstat (limited to 'arch/mips/sgi-ip27')
-rw-r--r-- | arch/mips/sgi-ip27/ip27-irq.c | 5 | ||||
-rw-r--r-- | arch/mips/sgi-ip27/ip27-memory.c | 9 |
2 files changed, 5 insertions, 9 deletions
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c index 73e5e52781d8..2854ac4c9be1 100644 --- a/arch/mips/sgi-ip27/ip27-irq.c +++ b/arch/mips/sgi-ip27/ip27-irq.c | |||
@@ -88,12 +88,9 @@ static inline int find_level(cpuid_t *cpunum, int irq) | |||
88 | { | 88 | { |
89 | int cpu, i; | 89 | int cpu, i; |
90 | 90 | ||
91 | for (cpu = 0; cpu <= NR_CPUS; cpu++) { | 91 | for_each_online_cpu(cpu) { |
92 | struct slice_data *si = cpu_data[cpu].data; | 92 | struct slice_data *si = cpu_data[cpu].data; |
93 | 93 | ||
94 | if (!cpu_online(cpu)) | ||
95 | continue; | ||
96 | |||
97 | for (i = BASE_PCI_IRQ; i < LEVELS_PER_SLICE; i++) | 94 | for (i = BASE_PCI_IRQ; i < LEVELS_PER_SLICE; i++) |
98 | if (si->level_to_irq[i] == irq) { | 95 | if (si->level_to_irq[i] == irq) { |
99 | *cpunum = cpu; | 96 | *cpunum = cpu; |
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c index ef20d9ac0ba3..6c00dce9f73f 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/nodemask.h> | 19 | #include <linux/nodemask.h> |
20 | #include <linux/swap.h> | 20 | #include <linux/swap.h> |
21 | #include <linux/bootmem.h> | 21 | #include <linux/bootmem.h> |
22 | #include <linux/pfn.h> | ||
22 | #include <asm/page.h> | 23 | #include <asm/page.h> |
23 | #include <asm/sections.h> | 24 | #include <asm/sections.h> |
24 | 25 | ||
@@ -28,8 +29,6 @@ | |||
28 | #include <asm/sn/sn_private.h> | 29 | #include <asm/sn/sn_private.h> |
29 | 30 | ||
30 | 31 | ||
31 | #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) | ||
32 | |||
33 | #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) | 32 | #define SLOT_PFNSHIFT (SLOT_SHIFT - PAGE_SHIFT) |
34 | #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) | 33 | #define PFN_NASIDSHFT (NASID_SHFT - PAGE_SHIFT) |
35 | 34 | ||
@@ -540,8 +539,8 @@ void __init mem_init(void) | |||
540 | struct page *end, *p; | 539 | struct page *end, *p; |
541 | 540 | ||
542 | /* | 541 | /* |
543 | * This will free up the bootmem, ie, slot 0 memory. | 542 | * This will free up the bootmem, ie, slot 0 memory. |
544 | */ | 543 | */ |
545 | totalram_pages += free_all_bootmem_node(NODE_DATA(node)); | 544 | totalram_pages += free_all_bootmem_node(NODE_DATA(node)); |
546 | 545 | ||
547 | /* | 546 | /* |
@@ -559,7 +558,7 @@ void __init mem_init(void) | |||
559 | /* if (!page_is_ram(pgnr)) continue; */ | 558 | /* if (!page_is_ram(pgnr)) continue; */ |
560 | /* commented out until page_is_ram works */ | 559 | /* commented out until page_is_ram works */ |
561 | ClearPageReserved(p); | 560 | ClearPageReserved(p); |
562 | set_page_count(p, 1); | 561 | init_page_count(p); |
563 | __free_page(p); | 562 | __free_page(p); |
564 | totalram_pages++; | 563 | totalram_pages++; |
565 | } | 564 | } |