diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-05-09 20:44:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-09 22:58:07 -0400 |
commit | aa6f079075d3396d4ac8a5d84ad724bfe8fc1ba9 (patch) | |
tree | c85c72b70ed0e18a7d8a7fde2975e27b77da456f /arch/sparc | |
parent | 799d40cc108b45d74325c10841114fc6449631b7 (diff) |
sparc: fix build fail in mm/init_64.c when NEED_MULTIPLE_NODES is off
Commit 625d693e9784f988371e69c2b41a2172c0be6c11 (linux-next)
"sparc64: Convert over to NO_BOOTMEM."
causes the following compile failure for sparc64 allnoconfig:
arch/sparc/mm/init_64.c:822:16: error: unused variable 'paddr'
arch/sparc/mm/init_64.c:1759:7: error: unused variable 'node'
arch/sparc/mm/init_64.c:809:12: error: 'memblock_nid_range' defined but not used
The paddr decl can easily be shuffled within the ifdef. The
memblock_nid_range is just a stub function for when NEED_MULTIPLE_NODES
is off, but the only caller is within a NEED_MULTIPLE_NODES enabled
section, so we can simply delete it.
The unused "node" is slightly more interesting. In the case of
"# CONFIG_NEED_MULTIPLE_NODES is not set" we no longer get the
definition of:
#define NODE_DATA(nid) (node_data[nid])
from arch/sparc/include/asm/mmzone.h - but instead we get:
#define NODE_DATA(nid) (&contig_page_data)
from include/linux/mmzone.h -- and since the arg is ignored,
the thing really is unused. Rather than put in a confusing
looking __maybe_unused, simply splitting the declaration
from the assignment seemed to me to be the least offensive.
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/mm/init_64.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 067a67773eb3..6026fdd1b2ed 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c | |||
@@ -805,12 +805,6 @@ static u64 memblock_nid_range(u64 start, u64 end, int *nid) | |||
805 | 805 | ||
806 | return start; | 806 | return start; |
807 | } | 807 | } |
808 | #else | ||
809 | static u64 memblock_nid_range(u64 start, u64 end, int *nid) | ||
810 | { | ||
811 | *nid = 0; | ||
812 | return end; | ||
813 | } | ||
814 | #endif | 808 | #endif |
815 | 809 | ||
816 | /* This must be invoked after performing all of the necessary | 810 | /* This must be invoked after performing all of the necessary |
@@ -819,10 +813,11 @@ static u64 memblock_nid_range(u64 start, u64 end, int *nid) | |||
819 | */ | 813 | */ |
820 | static void __init allocate_node_data(int nid) | 814 | static void __init allocate_node_data(int nid) |
821 | { | 815 | { |
822 | unsigned long paddr, start_pfn, end_pfn; | ||
823 | struct pglist_data *p; | 816 | struct pglist_data *p; |
824 | 817 | unsigned long start_pfn, end_pfn; | |
825 | #ifdef CONFIG_NEED_MULTIPLE_NODES | 818 | #ifdef CONFIG_NEED_MULTIPLE_NODES |
819 | unsigned long paddr; | ||
820 | |||
826 | paddr = memblock_alloc_try_nid(sizeof(struct pglist_data), SMP_CACHE_BYTES, nid); | 821 | paddr = memblock_alloc_try_nid(sizeof(struct pglist_data), SMP_CACHE_BYTES, nid); |
827 | if (!paddr) { | 822 | if (!paddr) { |
828 | prom_printf("Cannot allocate pglist_data for nid[%d]\n", nid); | 823 | prom_printf("Cannot allocate pglist_data for nid[%d]\n", nid); |
@@ -1623,6 +1618,7 @@ void __init paging_init(void) | |||
1623 | { | 1618 | { |
1624 | unsigned long end_pfn, shift, phys_base; | 1619 | unsigned long end_pfn, shift, phys_base; |
1625 | unsigned long real_end, i; | 1620 | unsigned long real_end, i; |
1621 | int node; | ||
1626 | 1622 | ||
1627 | /* These build time checkes make sure that the dcache_dirty_cpu() | 1623 | /* These build time checkes make sure that the dcache_dirty_cpu() |
1628 | * page->flags usage will work. | 1624 | * page->flags usage will work. |
@@ -1756,7 +1752,7 @@ void __init paging_init(void) | |||
1756 | * IRQ stacks. | 1752 | * IRQ stacks. |
1757 | */ | 1753 | */ |
1758 | for_each_possible_cpu(i) { | 1754 | for_each_possible_cpu(i) { |
1759 | int node = cpu_to_node(i); | 1755 | node = cpu_to_node(i); |
1760 | 1756 | ||
1761 | softirq_stack[i] = __alloc_bootmem_node(NODE_DATA(node), | 1757 | softirq_stack[i] = __alloc_bootmem_node(NODE_DATA(node), |
1762 | THREAD_SIZE, | 1758 | THREAD_SIZE, |