asm-generic: Refactor dereference_[kernel]_function_descriptor()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 15 Feb 2022 12:41:04 +0000 (13:41 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Feb 2022 12:25:11 +0000 (23:25 +1100)
commite1478d8eaf27704db17a44dee4c53696ed01fc9c
tree7968852fd3c179c5b9311a9d70f18ed57e5b6ad8
parent0dc690e4ef5b901e9d4b53520854fbd5c749e09d
asm-generic: Refactor dereference_[kernel]_function_descriptor()

dereference_function_descriptor() and
dereference_kernel_function_descriptor() are identical on the
three architectures implementing them.

Make them common and put them out-of-line in kernel/extable.c
which is one of the users and has similar type of functions.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/449db09b2eba57f4ab05f80102a67d8675bc8bcd.1644928018.git.christophe.leroy@csgroup.eu
arch/ia64/include/asm/sections.h
arch/parisc/include/asm/sections.h
arch/parisc/kernel/process.c
arch/powerpc/include/asm/sections.h
include/asm-generic/sections.h
kernel/extable.c