linux-sg2042/arch/mips/lib
Masahiro Yamada 78bdbbac08 MIPS: do not compile generic functions for CONFIG_CAVIUM_OCTEON_SOC
MIPS provides multiple definitions for the following functions:

  fw_init_cmdline
  __delay
  __udelay
  __ndelay
  memmove
  __rmemcpy
  memcpy
  __copy_user

The generic ones are defined in lib-y objects, which are overridden by
the Octeon ones when CONFIG_CAVIUM_OCTEON_SOC is enabled.

The use of EXPORT_SYMBOL in static libraries potentially causes a
problem for the llvm linker [1]. So, I want to forcibly link lib-y
objects to vmlinux when CONFIG_MODULES=y.

As a groundwork, we must fix multiple definitions that have previously
been hidden by lib-y.

If you look at lib/string.c, arch can define __HAVE_ARCH_* to opt out
the generic implementation.

Similarly, this commit adds CONFIG_HAVE_PLAT_* to allow a platform
to opt out the MIPS generic code.

[1]: https://github.com/ClangBuiltLinux/linux/issues/515

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2020-03-25 16:07:13 +01:00
..
Makefile MIPS: Use GENERIC_IOMAP 2018-08-30 09:41:16 -07:00
bitops.c MIPS: bitops: Use BIT_WORD() & BITS_PER_LONG 2019-10-07 09:42:55 -07:00
bswapdi.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bswapsi.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
csum_partial.S MIPS: Loongson64: Rename CPU TYPES 2019-10-31 15:03:10 -07:00
delay.c MIPS: do not compile generic functions for CONFIG_CAVIUM_OCTEON_SOC 2020-03-25 16:07:13 +01:00
dump_tlb.c MIPS: MemoryMapID (MMID) Support 2019-02-04 10:56:41 -08:00
iomap-pci.c MIPS: Use GENERIC_IOMAP 2018-08-30 09:41:16 -07:00
iomap_copy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504 2019-06-19 17:09:56 +02:00
libgcc.h MIPS: Implement __multi3 for GCC7 MIPS64r6 builds 2018-01-11 14:40:31 +01:00
memcpy.S MIPS: do not compile generic functions for CONFIG_CAVIUM_OCTEON_SOC 2020-03-25 16:07:13 +01:00
memset.S MIPS: make CPU_HAS_LOAD_STORE_LR opt-out 2020-01-22 10:16:47 -08:00
mips-atomic.c MIPS: Make DIEI support as a config option 2020-01-23 10:26:16 -08:00
multi3.c MIPS: lib: Provide MIPS64r6 __multi3() for GCC < 7 2018-08-21 12:14:11 -07:00
r3k_dump_tlb.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
strncpy_user.S get rid of unused __strncpy_from_user() instances 2017-05-15 23:40:28 -04:00
strnlen_user.S mips: get rid of unused __strnlen_user() 2017-05-15 23:40:32 -04:00
uncached.c mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00