[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YbNsI31st3oXleWq@arm.com>
Date: Fri, 10 Dec 2021 15:02:59 +0000
From: Catalin Marinas <catalin.marinas@....com>
To: Mark Rutland <mark.rutland@....com>
Cc: linux-kernel@...r.kernel.org, ardb@...nel.org, bp@...en8.de,
broonie@...nel.org, dave.hansen@...ux.intel.com,
jpoimboe@...hat.com, jslaby@...e.cz,
linux-arm-kernel@...ts.infradead.org, maz@...nel.org,
mingo@...hat.com, peterz@...radead.org, tabba@...gle.com,
tglx@...utronix.de, will@...nel.org
Subject: Re: [RFC PATCH 4/6] arm64: clean up symbol aliasing
On Mon, Dec 06, 2021 at 12:47:13PM +0000, Mark Rutland wrote:
> Now that we have SYM_FUNC_ALIAS() and SYM_FUNC_ALIAS_WEAK(), use those
> to simplify and more consistently define function aliases across
> arch/arm64.
>
> Aliases are now defined in terms of a canonical function name. For
> position-independent functions I've made the __pi_<func> name the
> canonical name, and defined other alises in terms of this.
>
> The SYM_FUNC_{START,END}_PI(func) macros obscure the __pi_<func> name,
> and make this hard to seatch for. The SYM_FUNC_START_WEAK_PI() macro
> also obscures the fact that the __pi_<func> fymbol is global and the
> <func> symbol is weak. For clarity, I have removed these macros and used
> SYM_FUNC_{START,END}() directly with the __pi_<func> name.
>
> For example:
>
> SYM_FUNC_START_WEAK_PI(func)
> ... asm insns ...
> SYM_FUNC_END_PI(func)
> EXPORT_SYMBOL(func)
>
> ... becomes:
>
> SYM_FUNC_START(__pi_func)
> ... asm insns ...
> SYM_FUNC_END(__pi_func)
>
> SYM_FUNC_ALIAS_WEAK(func, __pi_func)
> EXPORT_SYMBOL(func)
>
> For clarity, where there are multiple annotations such as
> EXPORT_SYMBOL(), I've tried to keep annotations grouped by symbol. For
> example, where a function has a name and an alias which are both
> exported, this is organised as:
>
> SYM_FUNC_START(func)
> ... asm insns ...
> SYM_FUNC_END(func)
> EXPORT_SYMBOL(func)
>
> SYM_FUNC_ALAIAS(alias, func)
> EXPORT_SYMBOL(alias)
>
> For consistency with the other string functions, I've defined strrchr as
> a position-independent function, as it can safely be used as such even
> though we have no users today.
>
> As we no longer use SYM_FUNC_{START,END}_ALIAS(), our local copies are
> removed. The common versions will be removed by a subsequent patch.
>
> There should be no functional change as a result of this patch.
>
> Signed-off-by: Mark Rutland <mark.rutland@....com>
> Cc: Ard Biesheuvel <ardb@...nel.org>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Mark Brown <broonie@...nel.org>
> Cc: Will Deacon <will@...nel.org>
Acked-by: Catalin Marinas <catalin.marinas@....com>
Powered by blists - more mailing lists