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

x86/headers: Replace #include <asm/export.h> with #include <linux/export.h>

The following commit:

ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost")

deprecated <asm/export.h>, which is now a wrapper of <linux/export.h>.

Use <linux/export.h> in *.S as well as in *.c files.

After all the <asm/export.h> lines are replaced, <asm/export.h> and
<asm-generic/export.h> will be removed.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230806145958.380314-2-masahiroy@kernel.org

authored by

Masahiro Yamada and committed by
Ingo Molnar
94ea9c05 b425232c

+23 -25
+1 -1
arch/x86/entry/entry.S
··· 3 3 * Common place for both 32- and 64-bit entry routines. 4 4 */ 5 5 6 + #include <linux/export.h> 6 7 #include <linux/linkage.h> 7 - #include <asm/export.h> 8 8 #include <asm/msr-index.h> 9 9 10 10 .pushsection .noinstr.text, "ax"
+1 -1
arch/x86/entry/entry_64.S
··· 18 18 * - SYM_FUNC_START/END:Define functions in the symbol table. 19 19 * - idtentry: Define exception entry points. 20 20 */ 21 + #include <linux/export.h> 21 22 #include <linux/linkage.h> 22 23 #include <asm/segment.h> 23 24 #include <asm/cache.h> ··· 35 34 #include <asm/asm.h> 36 35 #include <asm/smap.h> 37 36 #include <asm/pgtable_types.h> 38 - #include <asm/export.h> 39 37 #include <asm/frame.h> 40 38 #include <asm/trapnr.h> 41 39 #include <asm/nospec-branch.h>
+1 -1
arch/x86/entry/thunk_32.S
··· 4 4 * Copyright 2008 by Steven Rostedt, Red Hat, Inc 5 5 * (inspired by Andi Kleen's thunk_64.S) 6 6 */ 7 + #include <linux/export.h> 7 8 #include <linux/linkage.h> 8 9 #include <asm/asm.h> 9 - #include <asm/export.h> 10 10 11 11 /* put return address in eax (arg1) */ 12 12 .macro THUNK name, func, put_ret_addr_in_eax=0
+1 -1
arch/x86/entry/thunk_64.S
··· 4 4 * disturbance of register allocation in some inline assembly constructs. 5 5 * Copyright 2001,2002 by Andi Kleen, SuSE Labs. 6 6 */ 7 + #include <linux/export.h> 7 8 #include <linux/linkage.h> 8 9 #include "calling.h" 9 10 #include <asm/asm.h> 10 - #include <asm/export.h> 11 11 12 12 /* rdi: arg1 ... normal C conventions. rax is saved/restored. */ 13 13 .macro THUNK name, func
+1 -1
arch/x86/kernel/ftrace_32.S
··· 3 3 * Copyright (C) 2017 Steven Rostedt, VMware Inc. 4 4 */ 5 5 6 + #include <linux/export.h> 6 7 #include <linux/linkage.h> 7 8 #include <asm/page_types.h> 8 9 #include <asm/segment.h> 9 - #include <asm/export.h> 10 10 #include <asm/ftrace.h> 11 11 #include <asm/nospec-branch.h> 12 12 #include <asm/frame.h>
+1 -1
arch/x86/kernel/ftrace_64.S
··· 3 3 * Copyright (C) 2014 Steven Rostedt, Red Hat Inc 4 4 */ 5 5 6 + #include <linux/export.h> 6 7 #include <linux/cfi_types.h> 7 8 #include <linux/linkage.h> 8 9 #include <asm/asm-offsets.h> 9 10 #include <asm/ptrace.h> 10 11 #include <asm/ftrace.h> 11 - #include <asm/export.h> 12 12 #include <asm/nospec-branch.h> 13 13 #include <asm/unwind_hints.h> 14 14 #include <asm/frame.h>
+1 -1
arch/x86/kernel/head_32.S
··· 8 8 */ 9 9 10 10 .text 11 + #include <linux/export.h> 11 12 #include <linux/threads.h> 12 13 #include <linux/init.h> 13 14 #include <linux/linkage.h> ··· 26 25 #include <asm/nops.h> 27 26 #include <asm/nospec-branch.h> 28 27 #include <asm/bootparam.h> 29 - #include <asm/export.h> 30 28 #include <asm/pgtable_32.h> 31 29 32 30 /* Physical address */
+1 -2
arch/x86/kernel/head_64.S
··· 9 9 * Copyright (C) 2005 Eric Biederman <ebiederm@xmission.com> 10 10 */ 11 11 12 - 12 + #include <linux/export.h> 13 13 #include <linux/linkage.h> 14 14 #include <linux/threads.h> 15 15 #include <linux/init.h> ··· 22 22 #include <asm/percpu.h> 23 23 #include <asm/nops.h> 24 24 #include "../entry/calling.h" 25 - #include <asm/export.h> 26 25 #include <asm/nospec-branch.h> 27 26 #include <asm/apicdef.h> 28 27 #include <asm/fixmap.h>
+1 -1
arch/x86/kernel/irqflags.S
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 3 3 #include <asm/asm.h> 4 - #include <asm/export.h> 4 + #include <linux/export.h> 5 5 #include <linux/linkage.h> 6 6 7 7 /*
+1 -1
arch/x86/lib/checksum_32.S
··· 21 21 * converted to pure assembler 22 22 */ 23 23 24 + #include <linux/export.h> 24 25 #include <linux/linkage.h> 25 26 #include <asm/errno.h> 26 27 #include <asm/asm.h> 27 - #include <asm/export.h> 28 28 #include <asm/nospec-branch.h> 29 29 30 30 /*
+1 -1
arch/x86/lib/clear_page_64.S
··· 1 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 + #include <linux/export.h> 2 3 #include <linux/linkage.h> 3 4 #include <asm/asm.h> 4 - #include <asm/export.h> 5 5 6 6 /* 7 7 * Most CPUs support enhanced REP MOVSB/STOSB instructions. It is
+1 -1
arch/x86/lib/cmpxchg8b_emu.S
··· 1 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 2 3 + #include <linux/export.h> 3 4 #include <linux/linkage.h> 4 - #include <asm/export.h> 5 5 #include <asm/percpu.h> 6 6 #include <asm/processor-flags.h> 7 7
+1 -1
arch/x86/lib/copy_page_64.S
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* Written 2003 by Andi Kleen, based on a kernel by Evandro Menezes */ 3 3 4 + #include <linux/export.h> 4 5 #include <linux/linkage.h> 5 6 #include <asm/cpufeatures.h> 6 7 #include <asm/alternative.h> 7 - #include <asm/export.h> 8 8 9 9 /* 10 10 * Some CPUs run faster using the string copy instructions (sane microcode).
+1 -1
arch/x86/lib/copy_user_64.S
··· 6 6 * Functions to copy from and to user space. 7 7 */ 8 8 9 + #include <linux/export.h> 9 10 #include <linux/linkage.h> 10 11 #include <asm/cpufeatures.h> 11 12 #include <asm/alternative.h> 12 13 #include <asm/asm.h> 13 - #include <asm/export.h> 14 14 15 15 /* 16 16 * rep_movs_alternative - memory copy with exception handling.
+1 -1
arch/x86/lib/copy_user_uncached_64.S
··· 3 3 * Copyright 2023 Linus Torvalds <torvalds@linux-foundation.org> 4 4 */ 5 5 6 + #include <linux/export.h> 6 7 #include <linux/linkage.h> 7 8 #include <asm/asm.h> 8 - #include <asm/export.h> 9 9 10 10 /* 11 11 * copy_user_nocache - Uncached memory copy with exception handling
+1 -1
arch/x86/lib/getuser.S
··· 26 26 * as they get called from within inline assembly. 27 27 */ 28 28 29 + #include <linux/export.h> 29 30 #include <linux/linkage.h> 30 31 #include <asm/page_types.h> 31 32 #include <asm/errno.h> ··· 34 33 #include <asm/thread_info.h> 35 34 #include <asm/asm.h> 36 35 #include <asm/smap.h> 37 - #include <asm/export.h> 38 36 39 37 #define ASM_BARRIER_NOSPEC ALTERNATIVE "", "lfence", X86_FEATURE_LFENCE_RDTSC 40 38
+1 -1
arch/x86/lib/hweight.S
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 + #include <linux/export.h> 2 3 #include <linux/linkage.h> 3 - #include <asm/export.h> 4 4 5 5 #include <asm/asm.h> 6 6
+1 -1
arch/x86/lib/memcpy_64.S
··· 1 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 2 /* Copyright 2002 Andi Kleen */ 3 3 4 + #include <linux/export.h> 4 5 #include <linux/linkage.h> 5 6 #include <linux/cfi_types.h> 6 7 #include <asm/errno.h> 7 8 #include <asm/cpufeatures.h> 8 9 #include <asm/alternative.h> 9 - #include <asm/export.h> 10 10 11 11 .section .noinstr.text, "ax" 12 12
+1 -1
arch/x86/lib/memmove_32.S
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 3 + #include <linux/export.h> 3 4 #include <linux/linkage.h> 4 - #include <asm/export.h> 5 5 6 6 SYM_FUNC_START(memmove) 7 7 /*
+1 -1
arch/x86/lib/memmove_64.S
··· 6 6 * This assembly file is re-written from memmove_64.c file. 7 7 * - Copyright 2011 Fenghua Yu <fenghua.yu@intel.com> 8 8 */ 9 + #include <linux/export.h> 9 10 #include <linux/linkage.h> 10 11 #include <asm/cpufeatures.h> 11 12 #include <asm/alternative.h> 12 - #include <asm/export.h> 13 13 14 14 #undef memmove 15 15
+1 -1
arch/x86/lib/memset_64.S
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* Copyright 2002 Andi Kleen, SuSE Labs */ 3 3 4 + #include <linux/export.h> 4 5 #include <linux/linkage.h> 5 6 #include <asm/cpufeatures.h> 6 7 #include <asm/alternative.h> 7 - #include <asm/export.h> 8 8 9 9 .section .noinstr.text, "ax" 10 10
+1 -2
arch/x86/lib/putuser.S
··· 11 11 * return an error value in addition to the "real" 12 12 * return value. 13 13 */ 14 + #include <linux/export.h> 14 15 #include <linux/linkage.h> 15 16 #include <asm/thread_info.h> 16 17 #include <asm/errno.h> 17 18 #include <asm/asm.h> 18 19 #include <asm/smap.h> 19 - #include <asm/export.h> 20 - 21 20 22 21 /* 23 22 * __put_user_X
+1 -1
arch/x86/lib/retpoline.S
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 3 + #include <linux/export.h> 3 4 #include <linux/stringify.h> 4 5 #include <linux/linkage.h> 5 6 #include <asm/dwarf2.h> 6 7 #include <asm/cpufeatures.h> 7 8 #include <asm/alternative.h> 8 9 #include <asm/asm-offsets.h> 9 - #include <asm/export.h> 10 10 #include <asm/nospec-branch.h> 11 11 #include <asm/unwind_hints.h> 12 12 #include <asm/percpu.h>