powerpc: Move C prototypes out of asm-prototypes.h
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Fri, 4 Mar 2022 17:04:05 +0000 (18:04 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Mar 2022 11:06:25 +0000 (22:06 +1100)
commit76222808fc253cb9ea66c3e0e8d1946933f25b70
tree462558e4bae743d4fd0e33b90969f2f74e702ffe
parenta4abd55a2490fd6407ddb6810e41f64ebd66d3af
powerpc: Move C prototypes out of asm-prototypes.h

We originally added asm-prototypes.h in commit 42f5b4cacd78 ("powerpc:
Introduce asm-prototypes.h"). It's purpose was for prototypes of C
functions that are only called from asm, in order to fix sparse
warnings about missing prototypes.

A few months later Nick added a different use case in
commit 4efca4ed05cb ("kbuild: modversions for EXPORT_SYMBOL() for asm")
for C prototypes for exported asm functions. This is basically the
inverse of our original usage.

Since then we've added various prototypes to asm-prototypes.h for both
reasons, meaning we now need to unstitch it all.

Dispatch prototypes of C functions into relevant headers and keep
only the prototypes for functions defined in assembly.

For the time being, leave prom_init() there because moving it
into asm/prom.h or asm/setup.h conflicts with
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.o
This will be fixed later by untaggling asm/pci.h and asm/prom.h
or by renaming the function in shadowrom.c

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/62d46904eca74042097acf4cb12c175e3067f3d1.1646413435.git.christophe.leroy@csgroup.eu
29 files changed:
arch/powerpc/include/asm/asm-prototypes.h
arch/powerpc/include/asm/ftrace.h
arch/powerpc/include/asm/hvcall.h
arch/powerpc/include/asm/interrupt.h
arch/powerpc/include/asm/kexec.h
arch/powerpc/include/asm/processor.h
arch/powerpc/include/asm/setup.h
arch/powerpc/include/asm/smp.h
arch/powerpc/include/asm/syscalls.h
arch/powerpc/kernel/early_32.c
arch/powerpc/kernel/interrupt.c
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/mce.c
arch/powerpc/kernel/ptrace/ptrace.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/smp.c
arch/powerpc/kernel/syscalls.c
arch/powerpc/kernel/tau_6xx.c
arch/powerpc/kernel/time.c
arch/powerpc/kernel/trace/ftrace.c
arch/powerpc/kexec/core_64.c
arch/powerpc/kvm/book3s_hv_builtin.c
arch/powerpc/kvm/book3s_hv_rm_xive.c
arch/powerpc/lib/vmx-helper.c
arch/powerpc/mm/book3s64/slb.c
arch/powerpc/mm/fault.c
arch/powerpc/platforms/powernv/idle.c
arch/powerpc/platforms/powernv/opal-tracepoints.c
arch/powerpc/platforms/pseries/lpar.c