powerpc: Enable compile-time check for syscall handlers
authorRohan McLure <rmclure@linux.ibm.com>
Wed, 21 Sep 2022 06:55:57 +0000 (16:55 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 28 Sep 2022 09:22:09 +0000 (19:22 +1000)
commit39859aea411b1696c6bc0c04bd2b5095ddba6196
treea50d1f67b647e51dad90701799faa0f619ff97dc
parent8cd1def4b8e4a592949509fac443e850da8428d0
powerpc: Enable compile-time check for syscall handlers

The table of syscall handlers and registered compatibility syscall
handlers has in past been produced using assembly, with function
references resolved at link time. This moves link-time errors to
compile-time, by rewriting systbl.S in C, and including the
linux/syscalls.h, linux/compat.h and asm/syscalls.h headers for
prototypes.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220921065605.1051927-18-rmclure@linux.ibm.com
arch/powerpc/kernel/systbl.c [moved from arch/powerpc/kernel/systbl.S with 57% similarity]