• Paul Burton's avatar
    MIPS: Only include mmzone.h when CONFIG_NEED_MULTIPLE_NODES=y · fc9e3f49
    Paul Burton authored
    commit 66a4059ba72c23ae74a7c702894ff76c4b7eac1f upstream.
    
    MIPS' asm/mmzone.h includes the machine/platform mmzone.h
    unconditionally, but since commit bb53fdf395ee ("MIPS: c-r4k: Add
    r4k_blast_scache_node for Loongson-3") is included by asm/rk4cache.h for
    all r4k-style configs regardless of CONFIG_NEED_MULTIPLE_NODES.
    
    This is problematic when CONFIG_NEED_MULTIPLE_NODES=n because both the
    loongson3 & ip27 mmzone.h headers unconditionally define the NODE_DATA
    preprocessor macro which is aready defined by linux/mmzone.h, resulting
    in the following build error:
    
      In file included from ./arch/mips/include/asm/mmzone.h:10,
                       from ./arch/mips/include/asm/r4kcache.h:23,
                       from arch/mips/mm/c-r4k.c:33:
      ./arch/mips/include/asm/mach-loongson64/mmzone.h:48: error: "NODE_DATA" redefined [-Werror]
       #define NODE_DATA(n)  (&__node_data[(n)]->pglist)
    
      In file included from ./include/linux/topology.h:32,
                       from ./include/linux/irq.h:19,
                       from ./include/asm-generic/hardirq.h:13,
                       from ./arch/mips/include/asm/hardirq.h:16,
                       from ./include/linux/hardirq.h:9,
                       from arch/mips/mm/c-r4k.c:11:
      ./include/linux/mmzone.h:907: note: this is the location of the previous definition
       #define NODE_DATA(nid)  (&contig_page_data)
    
    Resolve this by only including the machine mmzone.h when
    CONFIG_NEED_MULTIPLE_NODES=y, which also removes the need for the empty
    mach-generic version of the header which we delete.
    Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
    Fixes: bb53fdf395ee ("MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3")
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    fc9e3f49
Name
Last commit
Last update
..
alchemy Loading commit data...
ar7 Loading commit data...
ath25 Loading commit data...
ath79 Loading commit data...
bcm47xx Loading commit data...
bcm63xx Loading commit data...
bmips Loading commit data...
boot Loading commit data...
cavium-octeon Loading commit data...
cobalt Loading commit data...
configs Loading commit data...
dec Loading commit data...
emma Loading commit data...
fw Loading commit data...
generic Loading commit data...
include Loading commit data...
jazz Loading commit data...
jz4740 Loading commit data...
kernel Loading commit data...
kvm Loading commit data...
lantiq Loading commit data...
lasat Loading commit data...
lib Loading commit data...
loongson32 Loading commit data...
loongson64 Loading commit data...
math-emu Loading commit data...
mm Loading commit data...
mti-malta Loading commit data...
net Loading commit data...
netlogic Loading commit data...
oprofile Loading commit data...
paravirt Loading commit data...
pci Loading commit data...
pic32 Loading commit data...
pistachio Loading commit data...
pmcs-msp71xx Loading commit data...
pnx833x Loading commit data...
power Loading commit data...
ralink Loading commit data...
rb532 Loading commit data...
sgi-ip22 Loading commit data...
sgi-ip27 Loading commit data...
sgi-ip32 Loading commit data...
sibyte Loading commit data...
sni Loading commit data...
tools Loading commit data...
txx9 Loading commit data...
vdso Loading commit data...
vr41xx Loading commit data...
xilfpga Loading commit data...
Kbuild Loading commit data...
Kbuild.platforms Loading commit data...
Kconfig Loading commit data...
Kconfig.debug Loading commit data...
Makefile Loading commit data...
Makefile.postlink Loading commit data...