mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
We have three architectures using function descriptors, each with its own type and name. Add a common typedef that can be used in generic code. Also add a stub typedef for architecture without function descriptors, to avoid a forest of #ifdefs. It replaces the similar 'func_desc_t' previously defined in arch/powerpc/kernel/module_64.c Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-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/f1f91b142b3c1082bdc1586ce71c9bac1e75213c.1644928018.git.christophe.leroy@csgroup.eu
24 lines
548 B
C
24 lines
548 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _PARISC_SECTIONS_H
|
|
#define _PARISC_SECTIONS_H
|
|
|
|
#ifdef CONFIG_HAVE_FUNCTION_DESCRIPTORS
|
|
#include <asm/elf.h>
|
|
typedef Elf64_Fdesc func_desc_t;
|
|
#endif
|
|
|
|
/* nothing to see, move along */
|
|
#include <asm-generic/sections.h>
|
|
|
|
extern char __alt_instructions[], __alt_instructions_end[];
|
|
|
|
#ifdef CONFIG_64BIT
|
|
|
|
#undef dereference_function_descriptor
|
|
void *dereference_function_descriptor(void *);
|
|
|
|
#undef dereference_kernel_function_descriptor
|
|
void *dereference_kernel_function_descriptor(void *);
|
|
#endif
|
|
|
|
#endif
|