On 08/14/2020 01:04 PM, Michael Ellerman wrote:
Christophe Leroy <christophe.le...@csgroup.eu> writes:
Le 18/05/2016 à 03:16, Daniel Axtens a écrit :
Sparse picked up a number of functions that are implemented in C and
then only referred to in asm code.

This introduces asm-prototypes.h, which provides a place for
prototypes of these functions.

It looks like this is a mis-use of asm-prototypes.h

On other architectures, asm-prototypes.h is there to allow MODVERSION to
sent versions for exported assembly functions (I checked history of that
file in x86 and arm64).

Look closer :)

42f5b4cacd78 ("powerpc: Introduce asm-prototypes.h") (Jun 2016)
334bb7738764 ("x86/kbuild: enable modversions for symbols exported from asm") 
(Dec 2016)
c3296a1391cb ("arm64: add <asm/asm-prototypes.h>") (Dec 2018)

Aren't you all sitting at the same place in the middle of Pacific Ocean, far far away from Paris ? :)

Looking closer I see: mdr: (Ok, that's Nov 2016 but ...)

commit 4efca4ed05cbdfd13ec3e8cb623fb77d6e4ab187
Author: Nicholas Piggin <npig...@gmail.com>
Date:   Tue Nov 1 12:46:19 2016 +1100

    kbuild: modversions for EXPORT_SYMBOL() for asm

    Allow architectures to create asm/asm-prototypes.h file that
    provides C prototypes for exported asm functions, which enables
    proper CRC versions to be generated for them.

    Signed-off-by: Nicholas Piggin <npig...@gmail.com>
    Signed-off-by: Michal Marek <mma...@suse.com>





It looks like you have used it on the other way round, you have declared
in it C functions used by ASM functions, whereas it is supposed to be
dedicated to declaring exported ASM functions used by C functions.

But yes, it's since been co-opted for the modversions stuff.

I guess the contents should be split out into appropriate headers
depending on what the prototypes are for.



Christophe

Reply via email to