[PATCH 2/4] powerpc: Introduce asm-prototypes.h

Michael Ellerman mpe at ellerman.id.au
Fri Aug 14 23:04:01 AEST 2020


Christophe Leroy <christophe.leroy at 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)

> 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.

chers


More information about the Linuxppc-dev mailing list