From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-mips@vger.kernel.org,
"Maciej W . Rozycki" <macro@linux-mips.org>,
Nick Desaulniers <ndesaulniers@google.com>,
clang-built-linux@googlegroups.com,
Alexander Lobakin <alobakin@dlink.ru>,
Paul Burton <paulburton@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] MIPS: do not compile generic functions for CONFIG_CAVIUM_OCTEON_SOC
Date: Wed, 25 Mar 2020 18:32:15 +0100 [thread overview]
Message-ID: <20200325173215.GC17524@alpha.franken.de> (raw)
In-Reply-To: <20200325074529.24772-1-masahiroy@kernel.org>
On Wed, Mar 25, 2020 at 04:45:29PM +0900, Masahiro Yamada wrote:
> 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>
> ---
>
> Changes in v2:
> - Use #ifdef instead of __weak. This avoids increasing image size.
>
> arch/mips/Kconfig | 12 ++++++++++++
> arch/mips/fw/lib/cmdline.c | 2 ++
> arch/mips/lib/delay.c | 4 ++++
> arch/mips/lib/memcpy.S | 3 +++
> 4 files changed, 21 insertions(+)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
prev parent reply other threads:[~2020-03-25 17:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 7:45 [PATCH v2] MIPS: do not compile generic functions for CONFIG_CAVIUM_OCTEON_SOC Masahiro Yamada
2020-03-25 17:32 ` Thomas Bogendoerfer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200325173215.GC17524@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=alobakin@dlink.ru \
--cc=clang-built-linux@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=masahiroy@kernel.org \
--cc=ndesaulniers@google.com \
--cc=paulburton@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).