Skip to content

Commit

Permalink
x86/headers: Replace #include <asm/export.h> with #include <linux/exp…
Browse files Browse the repository at this point in the history
…ort.h>

The following commit:

  ddb5cdb ("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 <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
masahir0y authored and Ingo Molnar committed Oct 3, 2023
1 parent b425232 commit 94ea9c0
Show file tree
Hide file tree
Showing 23 changed files with 23 additions and 25 deletions.
2 changes: 1 addition & 1 deletion arch/x86/entry/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Common place for both 32- and 64-bit entry routines.
*/

#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/export.h>
#include <asm/msr-index.h>

.pushsection .noinstr.text, "ax"
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/entry/entry_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* - SYM_FUNC_START/END:Define functions in the symbol table.
* - idtentry: Define exception entry points.
*/
#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/segment.h>
#include <asm/cache.h>
Expand All @@ -34,7 +35,6 @@
#include <asm/asm.h>
#include <asm/smap.h>
#include <asm/pgtable_types.h>
#include <asm/export.h>
#include <asm/frame.h>
#include <asm/trapnr.h>
#include <asm/nospec-branch.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/entry/thunk_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Copyright 2008 by Steven Rostedt, Red Hat, Inc
* (inspired by Andi Kleen's thunk_64.S)
*/
#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/export.h>

/* put return address in eax (arg1) */
.macro THUNK name, func, put_ret_addr_in_eax=0
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/entry/thunk_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* disturbance of register allocation in some inline assembly constructs.
* Copyright 2001,2002 by Andi Kleen, SuSE Labs.
*/
#include <linux/export.h>
#include <linux/linkage.h>
#include "calling.h"
#include <asm/asm.h>
#include <asm/export.h>

/* rdi: arg1 ... normal C conventions. rax is saved/restored. */
.macro THUNK name, func
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/ftrace_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* Copyright (C) 2017 Steven Rostedt, VMware Inc.
*/

#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/page_types.h>
#include <asm/segment.h>
#include <asm/export.h>
#include <asm/ftrace.h>
#include <asm/nospec-branch.h>
#include <asm/frame.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/ftrace_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* Copyright (C) 2014 Steven Rostedt, Red Hat Inc
*/

#include <linux/export.h>
#include <linux/cfi_types.h>
#include <linux/linkage.h>
#include <asm/asm-offsets.h>
#include <asm/ptrace.h>
#include <asm/ftrace.h>
#include <asm/export.h>
#include <asm/nospec-branch.h>
#include <asm/unwind_hints.h>
#include <asm/frame.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

.text
#include <linux/export.h>
#include <linux/threads.h>
#include <linux/init.h>
#include <linux/linkage.h>
Expand All @@ -25,7 +26,6 @@
#include <asm/nops.h>
#include <asm/nospec-branch.h>
#include <asm/bootparam.h>
#include <asm/export.h>
#include <asm/pgtable_32.h>

/* Physical address */
Expand Down
3 changes: 1 addition & 2 deletions arch/x86/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Copyright (C) 2005 Eric Biederman <[email protected]>
*/


#include <linux/export.h>
#include <linux/linkage.h>
#include <linux/threads.h>
#include <linux/init.h>
Expand All @@ -22,7 +22,6 @@
#include <asm/percpu.h>
#include <asm/nops.h>
#include "../entry/calling.h"
#include <asm/export.h>
#include <asm/nospec-branch.h>
#include <asm/apicdef.h>
#include <asm/fixmap.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/irqflags.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */

#include <asm/asm.h>
#include <asm/export.h>
#include <linux/export.h>
#include <linux/linkage.h>

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/checksum_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
* converted to pure assembler
*/

#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/errno.h>
#include <asm/asm.h>
#include <asm/export.h>
#include <asm/nospec-branch.h>

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/clear_page_64.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/export.h>

/*
* Most CPUs support enhanced REP MOVSB/STOSB instructions. It is
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/cmpxchg8b_emu.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/export.h>
#include <asm/percpu.h>
#include <asm/processor-flags.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/copy_page_64.S
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Written 2003 by Andi Kleen, based on a kernel by Evandro Menezes */

#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/cpufeatures.h>
#include <asm/alternative.h>
#include <asm/export.h>

/*
* Some CPUs run faster using the string copy instructions (sane microcode).
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/copy_user_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
* Functions to copy from and to user space.
*/

#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/cpufeatures.h>
#include <asm/alternative.h>
#include <asm/asm.h>
#include <asm/export.h>

/*
* rep_movs_alternative - memory copy with exception handling.
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/copy_user_uncached_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Copyright 2023 Linus Torvalds <[email protected]>
*/

#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/export.h>

/*
* copy_user_nocache - Uncached memory copy with exception handling
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/getuser.S
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
* as they get called from within inline assembly.
*/

#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/page_types.h>
#include <asm/errno.h>
#include <asm/asm-offsets.h>
#include <asm/thread_info.h>
#include <asm/asm.h>
#include <asm/smap.h>
#include <asm/export.h>

#define ASM_BARRIER_NOSPEC ALTERNATIVE "", "lfence", X86_FEATURE_LFENCE_RDTSC

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/hweight.S
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/export.h>

#include <asm/asm.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/memcpy_64.S
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright 2002 Andi Kleen */

#include <linux/export.h>
#include <linux/linkage.h>
#include <linux/cfi_types.h>
#include <asm/errno.h>
#include <asm/cpufeatures.h>
#include <asm/alternative.h>
#include <asm/export.h>

.section .noinstr.text, "ax"

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/memmove_32.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */

#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/export.h>

SYM_FUNC_START(memmove)
/*
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/memmove_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* This assembly file is re-written from memmove_64.c file.
* - Copyright 2011 Fenghua Yu <[email protected]>
*/
#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/cpufeatures.h>
#include <asm/alternative.h>
#include <asm/export.h>

#undef memmove

Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/memset_64.S
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright 2002 Andi Kleen, SuSE Labs */

#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/cpufeatures.h>
#include <asm/alternative.h>
#include <asm/export.h>

.section .noinstr.text, "ax"

Expand Down
3 changes: 1 addition & 2 deletions arch/x86/lib/putuser.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
* return an error value in addition to the "real"
* return value.
*/
#include <linux/export.h>
#include <linux/linkage.h>
#include <asm/thread_info.h>
#include <asm/errno.h>
#include <asm/asm.h>
#include <asm/smap.h>
#include <asm/export.h>


/*
* __put_user_X
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/lib/retpoline.S
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0 */

#include <linux/export.h>
#include <linux/stringify.h>
#include <linux/linkage.h>
#include <asm/dwarf2.h>
#include <asm/cpufeatures.h>
#include <asm/alternative.h>
#include <asm/asm-offsets.h>
#include <asm/export.h>
#include <asm/nospec-branch.h>
#include <asm/unwind_hints.h>
#include <asm/percpu.h>
Expand Down

0 comments on commit 94ea9c0

Please sign in to comment.