mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-17 04:33:54 +00:00
And update linux/linkage.h, which requires in turn that we make these files switch from ENTRY()/ENDPROC() to SYM_FUNC_START()/SYM_FUNC_END(): tools/perf/arch/arm64/tests/regs_load.S tools/perf/arch/arm/tests/regs_load.S tools/perf/arch/powerpc/tests/regs_load.S tools/perf/arch/x86/tests/regs_load.S We also need to switch SYM_FUNC_START_LOCAL() to SYM_FUNC_START() for the functions used directly by 'perf bench', and update tools/perf/check_headers.sh to ignore those changes when checking if the kernel original files drifted from the copies we carry. This is to get the changes from:6dcc5627f6
("x86/asm: Change all ENTRY+ENDPROC to SYM_FUNC_*")ef1e03152c
("x86/asm: Make some functions local")e9b9d020c4
("x86/asm: Annotate aliases") And address these tools/perf build warnings: Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S' diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S Warning: Kernel ABI header at 'tools/arch/x86/lib/memset_64.S' differs from latest version at 'arch/x86/lib/memset_64.S' diff -u tools/arch/x86/lib/memset_64.S arch/x86/lib/memset_64.S Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-tay3l8x8k11p7y3qcpqh9qh5@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
97 lines
2.4 KiB
C
97 lines
2.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef PERF_LINUX_LINKAGE_H_
|
|
#define PERF_LINUX_LINKAGE_H_
|
|
|
|
/* linkage.h ... for including arch/x86/lib/memcpy_64.S */
|
|
|
|
/* Some toolchains use other characters (e.g. '`') to mark new line in macro */
|
|
#ifndef ASM_NL
|
|
#define ASM_NL ;
|
|
#endif
|
|
|
|
#ifndef __ALIGN
|
|
#define __ALIGN .align 4,0x90
|
|
#define __ALIGN_STR ".align 4,0x90"
|
|
#endif
|
|
|
|
/* SYM_T_FUNC -- type used by assembler to mark functions */
|
|
#ifndef SYM_T_FUNC
|
|
#define SYM_T_FUNC STT_FUNC
|
|
#endif
|
|
|
|
/* SYM_A_* -- align the symbol? */
|
|
#define SYM_A_ALIGN ALIGN
|
|
|
|
/* SYM_L_* -- linkage of symbols */
|
|
#define SYM_L_GLOBAL(name) .globl name
|
|
#define SYM_L_LOCAL(name) /* nothing */
|
|
|
|
#define ALIGN __ALIGN
|
|
|
|
/* === generic annotations === */
|
|
|
|
/* SYM_ENTRY -- use only if you have to for non-paired symbols */
|
|
#ifndef SYM_ENTRY
|
|
#define SYM_ENTRY(name, linkage, align...) \
|
|
linkage(name) ASM_NL \
|
|
align ASM_NL \
|
|
name:
|
|
#endif
|
|
|
|
/* SYM_START -- use only if you have to */
|
|
#ifndef SYM_START
|
|
#define SYM_START(name, linkage, align...) \
|
|
SYM_ENTRY(name, linkage, align)
|
|
#endif
|
|
|
|
/* SYM_END -- use only if you have to */
|
|
#ifndef SYM_END
|
|
#define SYM_END(name, sym_type) \
|
|
.type name sym_type ASM_NL \
|
|
.size name, .-name
|
|
#endif
|
|
|
|
/*
|
|
* SYM_FUNC_START_ALIAS -- use where there are two global names for one
|
|
* function
|
|
*/
|
|
#ifndef SYM_FUNC_START_ALIAS
|
|
#define SYM_FUNC_START_ALIAS(name) \
|
|
SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)
|
|
#endif
|
|
|
|
/* SYM_FUNC_START -- use for global functions */
|
|
#ifndef SYM_FUNC_START
|
|
/*
|
|
* The same as SYM_FUNC_START_ALIAS, but we will need to distinguish these two
|
|
* later.
|
|
*/
|
|
#define SYM_FUNC_START(name) \
|
|
SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)
|
|
#endif
|
|
|
|
/* SYM_FUNC_START_LOCAL -- use for local functions */
|
|
#ifndef SYM_FUNC_START_LOCAL
|
|
/* the same as SYM_FUNC_START_LOCAL_ALIAS, see comment near SYM_FUNC_START */
|
|
#define SYM_FUNC_START_LOCAL(name) \
|
|
SYM_START(name, SYM_L_LOCAL, SYM_A_ALIGN)
|
|
#endif
|
|
|
|
/* SYM_FUNC_END_ALIAS -- the end of LOCAL_ALIASed or ALIASed function */
|
|
#ifndef SYM_FUNC_END_ALIAS
|
|
#define SYM_FUNC_END_ALIAS(name) \
|
|
SYM_END(name, SYM_T_FUNC)
|
|
#endif
|
|
|
|
/*
|
|
* SYM_FUNC_END -- the end of SYM_FUNC_START_LOCAL, SYM_FUNC_START,
|
|
* SYM_FUNC_START_WEAK, ...
|
|
*/
|
|
#ifndef SYM_FUNC_END
|
|
/* the same as SYM_FUNC_END_ALIAS, see comment near SYM_FUNC_START */
|
|
#define SYM_FUNC_END(name) \
|
|
SYM_END(name, SYM_T_FUNC)
|
|
#endif
|
|
|
|
#endif /* PERF_LINUX_LINKAGE_H_ */
|