linux/arch/mips/include/asm/mach-ip27
Arnd Bergmann 1742ac2650 MIPS: VDSO: avoid duplicate CAC_BASE definition
vdso.h includes <spaces.h> implicitly after defining CONFIG_32BITS.
This defeats the override in mach-ip27/spaces.h, leading to
a build error that shows up in kernelci.org:

In file included from arch/mips/include/asm/mach-ip27/spaces.h:29:0,
                 from arch/mips/include/asm/page.h:12,
                 from arch/mips/vdso/vdso.h:26,
                 from arch/mips/vdso/gettimeofday.c:11:
arch/mips/include/asm/mach-generic/spaces.h:28:0: error: "CAC_BASE" redefined [-Werror]
 #define CAC_BASE  _AC(0x80000000, UL)

An earlier patch tried to make the second definition conditional,
but that patch had the #ifdef in the wrong place, and would lead
to another warning:

arch/mips/include/asm/io.h: In function 'phys_to_virt':
arch/mips/include/asm/io.h:138:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]

For all I can tell, there is no other reason than vdso32 to ever
include this file with CONFIG_32BITS set, and the vdso itself should
never refer to the base addresses as it is running in user space,
so adding an #ifdef here is safe.

Link: https://patchwork.kernel.org/patch/9418187/
Fixes: 3ffc17d876 ("MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15039/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2017-01-25 02:51:09 +01:00
..
cpu-feature-overrides.h MIPS: IP27: Update/restructure CPU overrides 2015-06-21 21:54:13 +02:00
dma-coherence.h MIPS: IP27: Fix typo 2016-05-28 12:35:07 +02:00
irq.h MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
kernel-entry-init.h MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
kmalloc.h dma-mapping: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN 2010-08-11 08:59:21 -07:00
mangle-port.h
mmzone.h MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
spaces.h MIPS: VDSO: avoid duplicate CAC_BASE definition 2017-01-25 02:51:09 +01:00
topology.h MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
war.h MIPS: PMC-Sierra Yosemite: Remove support. 2012-12-13 18:15:30 +01:00