Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/asm: Remove the last GLOBAL user and remove the macro

Convert the remaining 32bit users and remove the GLOBAL macro finally.
In particular, this means to use SYM_ENTRY for the singlestepping hack
region.

Exclude the global definition of GLOBAL from x86 too.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-arch@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will@kernel.org>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20191011115108.12392-20-jslaby@suse.cz

authored by

Jiri Slaby and committed by
Borislav Petkov
b4edca15 78f44330

+4 -10
+2 -2
arch/x86/entry/entry_32.S
··· 832 832 jmp restore_all 833 833 SYM_CODE_END(ret_from_exception) 834 834 835 - GLOBAL(__begin_SYSENTER_singlestep_region) 835 + SYM_ENTRY(__begin_SYSENTER_singlestep_region, SYM_L_GLOBAL, SYM_A_NONE) 836 836 /* 837 837 * All code from here through __end_SYSENTER_singlestep_region is subject 838 838 * to being single-stepped if a user program sets TF and executes SYSENTER. ··· 1011 1011 pushl $X86_EFLAGS_FIXED 1012 1012 popfl 1013 1013 jmp .Lsysenter_flags_fixed 1014 - GLOBAL(__end_SYSENTER_singlestep_region) 1014 + SYM_ENTRY(__end_SYSENTER_singlestep_region, SYM_L_GLOBAL, SYM_A_NONE) 1015 1015 ENDPROC(entry_SYSENTER_32) 1016 1016 1017 1017 /*
-8
arch/x86/include/asm/linkage.h
··· 13 13 14 14 #ifdef __ASSEMBLY__ 15 15 16 - /* 17 - * GLOBAL is DEPRECATED 18 - * 19 - * use SYM_DATA_START, SYM_FUNC_START, SYM_INNER_LABEL, SYM_CODE_START, or 20 - * similar 21 - */ 22 - #define GLOBAL(name) SYM_ENTRY(name, SYM_L_GLOBAL, SYM_A_NONE) 23 - 24 16 #if defined(CONFIG_X86_64) || defined(CONFIG_X86_ALIGNMENT_16) 25 17 #define __ALIGN .p2align 4, 0x90 26 18 #define __ALIGN_STR __stringify(__ALIGN)
+2
include/linux/linkage.h
··· 105 105 106 106 /* === DEPRECATED annotations === */ 107 107 108 + #ifndef CONFIG_X86 108 109 #ifndef GLOBAL 109 110 /* deprecated, use SYM_DATA*, SYM_ENTRY, or similar */ 110 111 #define GLOBAL(name) \ 111 112 .globl name ASM_NL \ 112 113 name: 114 + #endif 113 115 #endif 114 116 115 117 #ifndef ENTRY