Sunway inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG
--------------------------------
It works well if these include headers are cleaned up.
Signed-off-by: Gu Zitao guzitao@wxiat.com
Signed-off-by: Gu Zitao guzitao@wxiat.com --- arch/sw_64/chip/chip3/chip.c | 6 +---- arch/sw_64/chip/chip3/cpufreq_debugfs.c | 7 +---- arch/sw_64/chip/chip3/i2c-lib.c | 4 --- arch/sw_64/chip/chip3/irq_chip.c | 13 +--------- arch/sw_64/chip/chip3/msi.c | 7 +---- arch/sw_64/chip/chip3/pci-quirks.c | 3 +-- arch/sw_64/chip/chip3/vt_msi.c | 6 ----- arch/sw_64/kernel/acpi.c | 19 +------------- arch/sw_64/kernel/asm-offsets.c | 7 +++-- arch/sw_64/kernel/audit.c | 2 +- arch/sw_64/kernel/cacheinfo.c | 3 +-- arch/sw_64/kernel/core.c | 18 ------------- arch/sw_64/kernel/crash_dump.c | 2 -- arch/sw_64/kernel/dup_print.c | 5 +--- arch/sw_64/kernel/early_printk.c | 4 +-- arch/sw_64/kernel/ftrace.c | 5 ---- arch/sw_64/kernel/insn.c | 13 ---------- arch/sw_64/kernel/irq.c | 15 ----------- arch/sw_64/kernel/irq_sw64.c | 9 +------ arch/sw_64/kernel/jump_label.c | 3 +-- arch/sw_64/kernel/kgdb.c | 3 --- arch/sw_64/kernel/kprobes/decode-insn.c | 6 +---- arch/sw_64/kernel/kprobes/kprobes.c | 4 --- arch/sw_64/kernel/kvm_cma.c | 4 --- arch/sw_64/kernel/machine_kexec.c | 7 +---- arch/sw_64/kernel/module.c | 5 ---- arch/sw_64/kernel/msi.c | 7 ----- arch/sw_64/kernel/pci-noop.c | 8 ------ arch/sw_64/kernel/pci-sysfs.c | 3 --- arch/sw_64/kernel/pci.c | 13 +--------- arch/sw_64/kernel/pci_common.c | 11 -------- arch/sw_64/kernel/perf_event.c | 12 --------- arch/sw_64/kernel/perf_regs.c | 4 --- arch/sw_64/kernel/process.c | 26 ------------------- arch/sw_64/kernel/ptrace.c | 15 +---------- arch/sw_64/kernel/relocate.c | 13 ++-------- arch/sw_64/kernel/segvdbg.c | 4 +-- arch/sw_64/kernel/setup.c | 34 +------------------------ arch/sw_64/kernel/signal.c | 14 ---------- arch/sw_64/kernel/smp.c | 25 +----------------- arch/sw_64/kernel/stacktrace.c | 1 - arch/sw_64/kernel/suspend.c | 12 +-------- arch/sw_64/kernel/tc.c | 3 --- arch/sw_64/kernel/time.c | 27 ++------------------ arch/sw_64/kernel/timer.c | 13 +--------- arch/sw_64/kernel/topology.c | 13 ---------- arch/sw_64/kernel/traps.c | 13 ---------- arch/sw_64/kernel/unaligned.c | 3 --- arch/sw_64/kernel/uprobes.c | 5 ---- arch/sw_64/kernel/vdso.c | 9 ------- arch/sw_64/kernel/vdso/vdso.S | 2 -- arch/sw_64/kernel/vdso/vgettimeofday.c | 3 +-- arch/sw_64/kvm/kvm-sw64.c | 13 ---------- arch/sw_64/lib/fls.c | 1 - arch/sw_64/lib/iomap.c | 4 +-- arch/sw_64/lib/udelay.c | 5 ---- arch/sw_64/math-emu/math.c | 10 +++----- arch/sw_64/mm/fault.c | 21 ++------------- arch/sw_64/mm/hugetlbpage.c | 7 +---- arch/sw_64/mm/init.c | 23 ----------------- arch/sw_64/mm/numa.c | 16 ------------ arch/sw_64/mm/physaddr.c | 1 - arch/sw_64/mm/thp.c | 9 ------- 63 files changed, 36 insertions(+), 547 deletions(-)
diff --git a/arch/sw_64/chip/chip3/chip.c b/arch/sw_64/chip/chip3/chip.c index 6c84f4d62e4e..bd20e262e609 100644 --- a/arch/sw_64/chip/chip3/chip.c +++ b/arch/sw_64/chip/chip3/chip.c @@ -1,16 +1,12 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/pci.h> -#include <linux/seq_file.h> #include <linux/clocksource.h> -#include <linux/msi.h> -#include <linux/delay.h> + #include <asm/sw64_init.h> #include <asm/sw64io.h> #include <asm/pci.h> -#include <asm/core.h> #include <asm/irq_impl.h> #include <asm/wrperfmon.h> -#include <asm/hw_init.h> #include "../../../../drivers/pci/pci.h"
static u64 read_longtime(struct clocksource *cs) diff --git a/arch/sw_64/chip/chip3/cpufreq_debugfs.c b/arch/sw_64/chip/chip3/cpufreq_debugfs.c index 3b152f84454f..13696360ef02 100644 --- a/arch/sw_64/chip/chip3/cpufreq_debugfs.c +++ b/arch/sw_64/chip/chip3/cpufreq_debugfs.c @@ -1,15 +1,10 @@ // SPDX-License-Identifier: GPL-2.0
#include <linux/debugfs.h> -#include <linux/list.h> -#include <linux/kernel.h> -#include <linux/slab.h> -#include <linux/mm_types.h> #include <linux/delay.h> #include <linux/uaccess.h> -#include <linux/mm.h> + #include <asm/sw64io.h> -#include <asm/hw_init.h> #include <asm/debug.h>
#define CLK_PRT 0x1UL diff --git a/arch/sw_64/chip/chip3/i2c-lib.c b/arch/sw_64/chip/chip3/i2c-lib.c index 581f2b3d81a1..ddf0a187ab5a 100644 --- a/arch/sw_64/chip/chip3/i2c-lib.c +++ b/arch/sw_64/chip/chip3/i2c-lib.c @@ -14,14 +14,10 @@ * of the interrupt mode. */
-#include <linux/module.h> -#include <linux/kernel.h> #include <linux/types.h> #include <linux/delay.h> #include <linux/errno.h> #include <linux/fb.h> -#include <linux/init.h> -#include <linux/device.h>
#define CPLD_BUSNR 2
diff --git a/arch/sw_64/chip/chip3/irq_chip.c b/arch/sw_64/chip/chip3/irq_chip.c index ee43e87c554b..24dfa1e1a898 100644 --- a/arch/sw_64/chip/chip3/irq_chip.c +++ b/arch/sw_64/chip/chip3/irq_chip.c @@ -1,18 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 -#include <linux/init.h> -#include <linux/kernel.h> -#include <linux/platform_device.h> -#include <linux/string.h> -#include <linux/types.h> -#include <linux/string.h> -#include <linux/i2c.h> -#include <linux/interrupt.h> -#include <linux/module.h> -#include <linux/of.h> #include <linux/irqdomain.h> #include <linux/irqchip.h> -#include <asm/irq.h> -#include <asm/sw64io.h> + #include <asm/irq_impl.h>
static void fake_irq_mask(struct irq_data *data) diff --git a/arch/sw_64/chip/chip3/msi.c b/arch/sw_64/chip/chip3/msi.c index 0c6d415e082e..43688c96ccab 100644 --- a/arch/sw_64/chip/chip3/msi.c +++ b/arch/sw_64/chip/chip3/msi.c @@ -1,15 +1,10 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/pci.h> -#include <linux/irq.h> -#include <linux/kernel.h> -#include <linux/cpumask.h> #include <linux/module.h> #include <linux/msi.h> #include <linux/irqdomain.h> + #include <asm/irq_impl.h> -#include <asm/msi.h> -#include <asm/pci.h> -#include <asm/sw64io.h>
static struct irq_domain *msi_default_domain; static DEFINE_RAW_SPINLOCK(vector_lock); diff --git a/arch/sw_64/chip/chip3/pci-quirks.c b/arch/sw_64/chip/chip3/pci-quirks.c index e70c211df68f..9043e56f9092 100644 --- a/arch/sw_64/chip/chip3/pci-quirks.c +++ b/arch/sw_64/chip/chip3/pci-quirks.c @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/pci.h> #include <linux/delay.h> -#include <asm/pci.h> + #include <asm/sw64io.h> -#include <asm/hw_init.h>
static int handshake(void __iomem *ptr, u32 mask, u32 done, int wait_usec, int delay_usec) diff --git a/arch/sw_64/chip/chip3/vt_msi.c b/arch/sw_64/chip/chip3/vt_msi.c index 31f49d3c3511..428757642342 100644 --- a/arch/sw_64/chip/chip3/vt_msi.c +++ b/arch/sw_64/chip/chip3/vt_msi.c @@ -1,14 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/pci.h> #include <linux/irq.h> -#include <linux/kernel.h> -#include <linux/cpumask.h> #include <linux/module.h> #include <linux/msi.h> -#include <asm/irq_impl.h> -#include <asm/msi.h> -#include <asm/pci.h> -#include <asm/sw64io.h>
#define QEMU_MSIX_MSG_ADDR (0x8000fee00000UL)
diff --git a/arch/sw_64/kernel/acpi.c b/arch/sw_64/kernel/acpi.c index 1c1afe8e812e..a0b5c4a57a07 100644 --- a/arch/sw_64/kernel/acpi.c +++ b/arch/sw_64/kernel/acpi.c @@ -2,25 +2,8 @@
#include <linux/init.h> #include <linux/acpi.h> -#include <linux/acpi_pmtmr.h> -#include <linux/efi.h> -#include <linux/stddef.h> -#include <linux/cpumask.h> -#include <linux/module.h> -#include <linux/dmi.h> -#include <linux/irq.h> #include <linux/irqdomain.h> -#include <linux/slab.h> -#include <linux/ioport.h> -#include <linux/pci.h> -#include <linux/memblock.h> -#include <acpi/actbl.h> -#include <acpi/actbl2.h> - -#include <asm/pgtable.h> -#include <asm/io.h> -#include <asm/smp.h> -#include <asm/numa.h> + #include <asm/early_ioremap.h>
int acpi_disabled = 1; diff --git a/arch/sw_64/kernel/asm-offsets.c b/arch/sw_64/kernel/asm-offsets.c index 44e7fa77265e..bea12d2d96fe 100644 --- a/arch/sw_64/kernel/asm-offsets.c +++ b/arch/sw_64/kernel/asm-offsets.c @@ -5,17 +5,16 @@ * and format the required data. */
-#include <linux/types.h> #include <linux/stddef.h> #include <linux/sched.h> -#include <linux/ptrace.h> #include <linux/kbuild.h> #include <linux/suspend.h> -#include <asm/io.h> + #include <asm/suspend.h> +#include <asm/kvm.h> + #include "traps.c"
-#include <asm/kvm.h> void foo(void) { DEFINE(TI_TASK, offsetof(struct thread_info, task)); diff --git a/arch/sw_64/kernel/audit.c b/arch/sw_64/kernel/audit.c index adc4622211d2..dcf58deee3e2 100644 --- a/arch/sw_64/kernel/audit.c +++ b/arch/sw_64/kernel/audit.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/init.h> -#include <linux/types.h> #include <linux/audit.h> + #include <asm/unistd.h>
static unsigned int dir_class[] = { diff --git a/arch/sw_64/kernel/cacheinfo.c b/arch/sw_64/kernel/cacheinfo.c index 5193d7544b59..87d3f4bcd10f 100644 --- a/arch/sw_64/kernel/cacheinfo.c +++ b/arch/sw_64/kernel/cacheinfo.c @@ -14,9 +14,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see http://www.gnu.org/licenses/. */ -#include <linux/arch_topology.h> #include <linux/cacheinfo.h> -#include <asm/hw_init.h> + #include <asm/topology.h>
/* Populates leaf and increments to next leaf */ diff --git a/arch/sw_64/kernel/core.c b/arch/sw_64/kernel/core.c index 4d440de68aae..e26b3a5faab2 100644 --- a/arch/sw_64/kernel/core.c +++ b/arch/sw_64/kernel/core.c @@ -1,24 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/types.h> -#include <linux/pci.h> -#include <linux/sched.h> -#include <linux/init.h> -#include <linux/irq.h> #include <linux/memblock.h> -#include <linux/pfn.h> -#include <linux/export.h> -#include <asm/core.h> -#include <asm/tlbflush.h> -#include <asm/smp.h> -#include <asm/compiler.h> -#include <asm/mmu_context.h> -#include <asm/bitops.h> -#include <asm/sw64_init.h> -#include <asm/hw_init.h> -#ifdef CONFIG_NUMA -#include <asm/memory.h> -#endif -#include "pci_impl.h"
#ifdef CONFIG_DISCONTIGMEM #ifdef CONFIG_NUMA diff --git a/arch/sw_64/kernel/crash_dump.c b/arch/sw_64/kernel/crash_dump.c index f3836afe3e25..4484673823b8 100644 --- a/arch/sw_64/kernel/crash_dump.c +++ b/arch/sw_64/kernel/crash_dump.c @@ -14,8 +14,6 @@ * published by the Free Software Foundation. */
-#include <linux/errno.h> -#include <linux/crash_dump.h> #include <linux/uaccess.h> #include <linux/io.h>
diff --git a/arch/sw_64/kernel/dup_print.c b/arch/sw_64/kernel/dup_print.c index e1c05cfa864b..1aa7710b5092 100644 --- a/arch/sw_64/kernel/dup_print.c +++ b/arch/sw_64/kernel/dup_print.c @@ -1,11 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 -#include <linux/kernel.h> #include <linux/mm.h> -#include <linux/init.h> #include <linux/smp.h> -#include <linux/delay.h> #include <linux/spinlock.h> -#include <linux/uaccess.h> + #include <asm/chip3_io.h>
#ifdef CONFIG_SW64_RRK diff --git a/arch/sw_64/kernel/early_printk.c b/arch/sw_64/kernel/early_printk.c index f4d5f2d5c876..62902175217a 100644 --- a/arch/sw_64/kernel/early_printk.c +++ b/arch/sw_64/kernel/early_printk.c @@ -1,9 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/console.h> #include <linux/kernel.h> -#include <linux/init.h> -#include <linux/string.h> -#include <linux/errno.h> + #include <asm/io.h>
static unsigned long early_serial_base; /* ttyS0 */ diff --git a/arch/sw_64/kernel/ftrace.c b/arch/sw_64/kernel/ftrace.c index 413562b5d9be..42efca28d386 100644 --- a/arch/sw_64/kernel/ftrace.c +++ b/arch/sw_64/kernel/ftrace.c @@ -10,13 +10,8 @@ */
#include <linux/ftrace.h> -#include <linux/module.h> -#include <linux/swab.h> -#include <linux/uaccess.h>
-#include <asm/cacheflush.h> #include <asm/ftrace.h> -#include <asm/insn.h>
#ifdef CONFIG_FUNCTION_TRACER EXPORT_SYMBOL(_mcount); diff --git a/arch/sw_64/kernel/insn.c b/arch/sw_64/kernel/insn.c index 71d3832d1fe3..e8dd41b6b7c4 100644 --- a/arch/sw_64/kernel/insn.c +++ b/arch/sw_64/kernel/insn.c @@ -14,22 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see http://www.gnu.org/licenses/. */ -#include <linux/bitops.h> -#include <linux/bug.h> -#include <linux/compiler.h> -#include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/smp.h> #include <linux/spinlock.h> -#include <linux/stop_machine.h> -#include <linux/types.h> -#include <linux/uaccess.h> #include <linux/kprobes.h>
-#include <asm/cacheflush.h> -#include <asm/insn.h> - - //static DEFINE_RAW_SPINLOCK(patch_lock);
int __kprobes sw64_insn_read(void *addr, u32 *insnp) diff --git a/arch/sw_64/kernel/irq.c b/arch/sw_64/kernel/irq.c index 6cd26af15b23..126fe2f70495 100644 --- a/arch/sw_64/kernel/irq.c +++ b/arch/sw_64/kernel/irq.c @@ -12,24 +12,9 @@ */
#include <linux/kernel.h> -#include <linux/module.h> -#include <linux/errno.h> -#include <linux/kernel_stat.h> -#include <linux/signal.h> -#include <linux/sched.h> -#include <linux/ptrace.h> #include <linux/interrupt.h> -#include <linux/random.h> #include <linux/irq.h> -#include <linux/proc_fs.h> #include <linux/seq_file.h> -#include <linux/profile.h> -#include <linux/bitops.h> -#include <linux/uaccess.h> - -#include <asm/hw_init.h> -#include <asm/hardirq.h> -#include <asm/io.h>
volatile unsigned long irq_err_count; DEFINE_PER_CPU(unsigned long, irq_pmi_count); diff --git a/arch/sw_64/kernel/irq_sw64.c b/arch/sw_64/kernel/irq_sw64.c index 376e8397ba35..8ab845d153eb 100644 --- a/arch/sw_64/kernel/irq_sw64.c +++ b/arch/sw_64/kernel/irq_sw64.c @@ -3,18 +3,11 @@ * SW64 specific irq code. */
-#include <linux/sched.h> #include <linux/irq.h> -#include <linux/kernel_stat.h> -#include <linux/module.h> #include <linux/irqchip.h> -#include <linux/irqdesc.h> -#include <linux/irqdomain.h> + #include <asm/dma.h> #include <asm/irq_impl.h> -#include <asm/core.h> -#include <asm/perf_event.h> -#include <asm/hmcall.h>
asmlinkage void do_entInt(unsigned long type, unsigned long vector, diff --git a/arch/sw_64/kernel/jump_label.c b/arch/sw_64/kernel/jump_label.c index a67d16eb3076..f3bc40370e4d 100644 --- a/arch/sw_64/kernel/jump_label.c +++ b/arch/sw_64/kernel/jump_label.c @@ -1,8 +1,7 @@ // SPDX-License-Identifier: GPL-2.0
-#include <linux/kernel.h> #include <linux/jump_label.h> -#include <asm/insn.h> + #include <asm/bug.h> #include <asm/cacheflush.h>
diff --git a/arch/sw_64/kernel/kgdb.c b/arch/sw_64/kernel/kgdb.c index c1100ef8fcdd..09e9ca7a0303 100644 --- a/arch/sw_64/kernel/kgdb.c +++ b/arch/sw_64/kernel/kgdb.c @@ -20,11 +20,8 @@ * along with this program. If not, see http://www.gnu.org/licenses/. */
-#include <linux/irq.h> #include <linux/kdebug.h> #include <linux/kgdb.h> -#include <linux/uaccess.h> -#include <asm/cacheflush.h>
struct dbg_reg_def_t dbg_reg_def[DBG_MAX_REG_NUM] = { { "r0", 8, offsetof(struct pt_regs, r0)}, diff --git a/arch/sw_64/kernel/kprobes/decode-insn.c b/arch/sw_64/kernel/kprobes/decode-insn.c index e3ab856d6084..d376a7e2bee4 100644 --- a/arch/sw_64/kernel/kprobes/decode-insn.c +++ b/arch/sw_64/kernel/kprobes/decode-insn.c @@ -12,12 +12,8 @@ * General Public License for more details. */
-#include <linux/kernel.h> #include <linux/kprobes.h> -#include <linux/module.h> -#include <linux/kallsyms.h> -#include <asm/insn.h> -#include <asm/sections.h> + #include "common.h"
static bool __kprobes sw64_insn_is_steppable(u32 insn) diff --git a/arch/sw_64/kernel/kprobes/kprobes.c b/arch/sw_64/kernel/kprobes/kprobes.c index 85400f96f991..59f040eaa3e1 100644 --- a/arch/sw_64/kernel/kprobes/kprobes.c +++ b/arch/sw_64/kernel/kprobes/kprobes.c @@ -5,13 +5,9 @@ */
#include <linux/kprobes.h> -#include <linux/preempt.h> -#include <linux/uaccess.h> #include <linux/kdebug.h> #include <linux/slab.h>
-#include <asm/ptrace.h> -#include <asm/insn.h> #include "common.h"
static u32 breakpoint_insn = BREAK_KPROBE; diff --git a/arch/sw_64/kernel/kvm_cma.c b/arch/sw_64/kernel/kvm_cma.c index dc61e2e369e8..054dec95b996 100644 --- a/arch/sw_64/kernel/kvm_cma.c +++ b/arch/sw_64/kernel/kvm_cma.c @@ -10,12 +10,8 @@
#include <linux/memblock.h> #include <linux/err.h> -#include <linux/mm.h> #include <linux/sizes.h> #include <linux/slab.h> -#include <linux/log2.h> -#include <linux/highmem.h> -#include <linux/io.h> #include <linux/cma.h> #include <linux/page-isolation.h>
diff --git a/arch/sw_64/kernel/machine_kexec.c b/arch/sw_64/kernel/machine_kexec.c index c778bc1374af..c9ca7a728bd4 100644 --- a/arch/sw_64/kernel/machine_kexec.c +++ b/arch/sw_64/kernel/machine_kexec.c @@ -5,18 +5,13 @@ * This source code is licensed under the GNU General Public License, * Version 2. See the file COPYING for more details. */ -#include <linux/compiler.h> #include <linux/kexec.h> #include <linux/mm.h> -#include <linux/device.h> #include <linux/delay.h> #include <linux/irq.h> #include <linux/reboot.h> + #include <asm/cacheflush.h> -#include <asm/page.h> -#include <asm/io.h> -#include <linux/cpu.h> -#include <linux/smp.h>
extern void *kexec_control_page; extern const unsigned char relocate_new_kernel[]; diff --git a/arch/sw_64/kernel/module.c b/arch/sw_64/kernel/module.c index d2041afba7bb..2904bb750eb5 100644 --- a/arch/sw_64/kernel/module.c +++ b/arch/sw_64/kernel/module.c @@ -1,10 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/moduleloader.h> -#include <linux/elf.h> -#include <linux/vmalloc.h> -#include <linux/fs.h> -#include <linux/string.h> -#include <linux/kernel.h> #include <linux/slab.h>
#define DEBUGP(fmt...) diff --git a/arch/sw_64/kernel/msi.c b/arch/sw_64/kernel/msi.c index d942a688a324..ee1bda3c6447 100644 --- a/arch/sw_64/kernel/msi.c +++ b/arch/sw_64/kernel/msi.c @@ -1,14 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/module.h> #include <linux/irq.h> -#include <linux/kernel.h> #include <linux/msi.h> -#include <linux/pci.h> -#include <linux/cpumask.h> -#include <asm/sw64io.h> -#include <asm/msi.h> -#include <asm/pci.h> -
int msi_compose_msg(unsigned int irq, struct msi_msg *msg) { diff --git a/arch/sw_64/kernel/pci-noop.c b/arch/sw_64/kernel/pci-noop.c index 4ef694e629e8..a0aa2e5bb675 100644 --- a/arch/sw_64/kernel/pci-noop.c +++ b/arch/sw_64/kernel/pci-noop.c @@ -6,16 +6,8 @@ */
#include <linux/pci.h> -#include <linux/init.h> #include <linux/memblock.h> -#include <linux/gfp.h> -#include <linux/capability.h> -#include <linux/mm.h> -#include <linux/errno.h> -#include <linux/sched.h> #include <linux/dma-mapping.h> -#include <linux/scatterlist.h> -#include <linux/module.h>
/* * The PCI controller list. diff --git a/arch/sw_64/kernel/pci-sysfs.c b/arch/sw_64/kernel/pci-sysfs.c index 584243922df9..504fd4a00754 100644 --- a/arch/sw_64/kernel/pci-sysfs.c +++ b/arch/sw_64/kernel/pci-sysfs.c @@ -10,9 +10,6 @@ * drivers/pci/pci-sysfs.c */
-#include <linux/sched.h> -#include <linux/stat.h> -#include <linux/slab.h> #include <linux/pci.h>
static int hose_mmap_page_range(struct pci_controller *hose, diff --git a/arch/sw_64/kernel/pci.c b/arch/sw_64/kernel/pci.c index d42f0d0aec92..fb7b071c10f6 100644 --- a/arch/sw_64/kernel/pci.c +++ b/arch/sw_64/kernel/pci.c @@ -1,22 +1,11 @@ // SPDX-License-Identifier: GPL-2.0 -#include <linux/string.h> #include <linux/pci.h> #include <linux/acpi.h> #include <linux/init.h> -#include <linux/ioport.h> -#include <linux/kernel.h> #include <linux/memblock.h> -#include <linux/module.h> -#include <linux/cache.h> -#include <linux/slab.h> -#include <linux/msi.h> -#include <linux/irq.h> -#include <asm/msi.h> -#include <linux/delay.h> #include <linux/syscore_ops.h> -#include <linux/platform_device.h> + #include <asm/sw64_init.h> -#include <asm/pci.h>
#include "pci_impl.h"
diff --git a/arch/sw_64/kernel/pci_common.c b/arch/sw_64/kernel/pci_common.c index f6316ca507a2..f996baca9d93 100644 --- a/arch/sw_64/kernel/pci_common.c +++ b/arch/sw_64/kernel/pci_common.c @@ -3,22 +3,11 @@ * linux/arch/sw_64/kernel/pci_iommu.c */
-#include <linux/kernel.h> -#include <linux/mm.h> #include <linux/pci.h> -#include <linux/gfp.h> -#include <linux/memblock.h> #include <linux/export.h> -#include <linux/scatterlist.h> -#include <linux/log2.h> #include <linux/dma-mapping.h> -#include <linux/iommu-helper.h> -#include <linux/slab.h> #include <linux/dma-direct.h> #include <linux/swiotlb.h> -#include <linux/cache.h> -#include <linux/module.h> -#include <asm/dma.h>
static dma_addr_t sw64_direct_map_page(struct device *dev, struct page *page, unsigned long offset, size_t size, diff --git a/arch/sw_64/kernel/perf_event.c b/arch/sw_64/kernel/perf_event.c index dac979d4b09a..d2975e17f666 100644 --- a/arch/sw_64/kernel/perf_event.c +++ b/arch/sw_64/kernel/perf_event.c @@ -6,18 +6,6 @@ */
#include <linux/perf_event.h> -#include <linux/kprobes.h> -#include <linux/kernel.h> -#include <linux/kdebug.h> -#include <linux/mutex.h> -#include <linux/init.h> -#include <linux/uaccess.h> - -#include <linux/atomic.h> -#include <asm/irq.h> -#include <asm/irq_regs.h> -#include <asm/hmcall.h> -#include <asm/hw_irq.h>
/* For tracking PMCs and the hw events they monitor on each CPU. */ struct cpu_hw_events { diff --git a/arch/sw_64/kernel/perf_regs.c b/arch/sw_64/kernel/perf_regs.c index 8eec2179eb86..4c12a2cdf912 100644 --- a/arch/sw_64/kernel/perf_regs.c +++ b/arch/sw_64/kernel/perf_regs.c @@ -1,11 +1,7 @@ // SPDX-License-Identifier: GPL-2.0
#include <linux/errno.h> -#include <linux/kernel.h> #include <linux/perf_event.h> -#include <linux/bug.h> -#include <linux/perf_regs.h> -#include <asm/ptrace.h>
u64 perf_reg_value(struct pt_regs *regs, int idx) { diff --git a/arch/sw_64/kernel/process.c b/arch/sw_64/kernel/process.c index 8fd493776bec..4192d50f5b0e 100644 --- a/arch/sw_64/kernel/process.c +++ b/arch/sw_64/kernel/process.c @@ -3,42 +3,16 @@ * This file handles the architecture-dependent parts of process handling. */
-#include <linux/errno.h> -#include <linux/module.h> -#include <linux/sched.h> #include <linux/sched/debug.h> -#include <linux/sched/task.h> -#include <linux/sched/task_stack.h> -#include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/smp.h> -#include <linux/stddef.h> -#include <linux/unistd.h> #include <linux/ptrace.h> -#include <linux/user.h> -#include <linux/time.h> -#include <linux/major.h> -#include <linux/stat.h> -#include <linux/vt.h> -#include <linux/mman.h> #include <linux/elfcore.h> #include <linux/reboot.h> -#include <linux/tty.h> -#include <linux/console.h> #include <linux/slab.h> -#include <linux/rcupdate.h> -#include <linux/tick.h> #include <linux/random.h> -#include <linux/uaccess.h>
-#include <asm/reg.h> -#include <asm/io.h> -#include <asm/pgtable.h> #include <asm/fpu.h> -#include <asm/hcall.h>
#include "proto.h" -#include "pci_impl.h"
/* * Power off function, if any diff --git a/arch/sw_64/kernel/ptrace.c b/arch/sw_64/kernel/ptrace.c index ede3c1053d81..649572bbe613 100644 --- a/arch/sw_64/kernel/ptrace.c +++ b/arch/sw_64/kernel/ptrace.c @@ -5,24 +5,11 @@ /* mangled further by Bob Manson (manson@santafe.edu) */ /* more mutilation by David Mosberger (davidm@azstarnet.com) */
-#include <linux/kernel.h> -#include <linux/sched.h> -#include <linux/mm.h> -#include <linux/smp.h> -#include <linux/errno.h> -#include <linux/ptrace.h> -#include <linux/user.h> -#include <linux/security.h> -#include <linux/signal.h> #include <linux/tracehook.h> -#include <linux/seccomp.h> #include <linux/audit.h> -#include <linux/uaccess.h>
-#include <asm/pgtable.h> -#include <asm/fpu.h> -#include <asm/core.h> #include <asm/reg.h> + #include "proto.h"
#define CREATE_TRACE_POINTS diff --git a/arch/sw_64/kernel/relocate.c b/arch/sw_64/kernel/relocate.c index 36b16d84d5ab..fe403f9c70c7 100644 --- a/arch/sw_64/kernel/relocate.c +++ b/arch/sw_64/kernel/relocate.c @@ -9,21 +9,12 @@ * Copyright (C) 2019 He Sheng * Authors: He Sheng (hesheng05@gmail.com) */ -#include <asm/hmcall.h> -#include <asm/setup.h> -#include <asm/sections.h> -#include <linux/mm_types.h> #include <linux/elf.h> -#include <linux/kernel.h> -#include <linux/libfdt.h> -#include <linux/of_fdt.h> -#include <linux/sched.h> -#include <linux/start_kernel.h> -#include <linux/string.h> -#include <linux/printk.h> #include <linux/notifier.h> #include <linux/mm.h>
+#include <asm/sections.h> + #define INITRD_ADDR 0x3000000UL #define KTEXT_MAX 0xffffffffa0000000UL #define RELOCATED(x) ((void *)((unsigned long)x + offset)) diff --git a/arch/sw_64/kernel/segvdbg.c b/arch/sw_64/kernel/segvdbg.c index aee4b3863072..5b8a638bf8b9 100644 --- a/arch/sw_64/kernel/segvdbg.c +++ b/arch/sw_64/kernel/segvdbg.c @@ -9,9 +9,7 @@ */
#include <linux/kernel.h> -#include <linux/debugfs.h> -#include <linux/seq_file.h> -#include <linux/uaccess.h> + #include <asm/debug.h>
extern bool segv_debug_enabled; diff --git a/arch/sw_64/kernel/setup.c b/arch/sw_64/kernel/setup.c index 61b498e65e4b..2de954a3c086 100644 --- a/arch/sw_64/kernel/setup.c +++ b/arch/sw_64/kernel/setup.c @@ -9,31 +9,13 @@ * Bootup setup stuff. */
-#include <linux/sched.h> -#include <linux/kernel.h> -#include <linux/mm.h> -#include <linux/stddef.h> -#include <linux/unistd.h> -#include <linux/ptrace.h> -#include <linux/slab.h> -#include <linux/user.h> #include <linux/screen_info.h> #include <linux/delay.h> #include <linux/kexec.h> #include <linux/console.h> -#include <linux/cpu.h> -#include <linux/errno.h> -#include <linux/init.h> -#include <linux/string.h> -#include <linux/ioport.h> -#include <linux/platform_device.h> #include <linux/memblock.h> -#include <linux/pci.h> -#include <linux/seq_file.h> #include <linux/root_dev.h> #include <linux/initrd.h> -#include <linux/eisa.h> -#include <linux/pfn.h> #ifdef CONFIG_MAGIC_SYSRQ #include <linux/sysrq.h> #include <linux/reboot.h> @@ -41,26 +23,12 @@ #ifdef CONFIG_DEBUG_FS #include <linux/debugfs.h> #endif -#include <linux/notifier.h> -#include <linux/log2.h> -#include <linux/export.h> #include <linux/of_fdt.h> #include <linux/of_platform.h> -#include <linux/uaccess.h> -#include <linux/cma.h> #include <linux/genalloc.h> #include <linux/acpi.h> -#include <asm/setup.h> -#include <asm/smp.h> + #include <asm/sw64_init.h> -#include <asm/pgtable.h> -#include <asm/dma.h> -#include <asm/mmu_context.h> -#include <asm/console.h> -#include <asm/core.h> -#include <asm/hw_init.h> -#include <asm/mmzone.h> -#include <asm/memory.h> #include <asm/efi.h> #include <asm/kvm_cma.h>
diff --git a/arch/sw_64/kernel/signal.c b/arch/sw_64/kernel/signal.c index 74e98063c874..f7b8d391251a 100644 --- a/arch/sw_64/kernel/signal.c +++ b/arch/sw_64/kernel/signal.c @@ -7,24 +7,10 @@ * 1997-11-02 Modified for POSIX.1b signals by Richard Henderson */
-#include <linux/sched.h> -#include <linux/kernel.h> #include <linux/signal.h> #include <linux/errno.h> -#include <linux/wait.h> -#include <linux/ptrace.h> -#include <linux/unistd.h> -#include <linux/mm.h> -#include <linux/smp.h> -#include <linux/stddef.h> -#include <linux/tty.h> -#include <linux/binfmts.h> -#include <linux/bitops.h> -#include <linux/syscalls.h> #include <linux/tracehook.h> -#include <linux/uaccess.h>
-#include <asm/sigcontext.h> #include <asm/ucontext.h> #include <asm/vdso.h>
diff --git a/arch/sw_64/kernel/smp.c b/arch/sw_64/kernel/smp.c index 7d9c5c90f1ac..fb915d166069 100644 --- a/arch/sw_64/kernel/smp.c +++ b/arch/sw_64/kernel/smp.c @@ -4,41 +4,18 @@ */
#include <linux/errno.h> -#include <linux/kernel.h> -#include <linux/kernel_stat.h> -#include <linux/module.h> #include <linux/sched/mm.h> #include <linux/sched/hotplug.h> -#include <linux/mm.h> -#include <linux/err.h> -#include <linux/threads.h> #include <linux/smp.h> -#include <linux/interrupt.h> -#include <linux/init.h> #include <linux/delay.h> -#include <linux/spinlock.h> #include <linux/irq.h> -#include <linux/cache.h> -#include <linux/profile.h> -#include <linux/bitops.h> #include <linux/cpu.h>
-#include <asm/ptrace.h> -#include <linux/atomic.h> - -#include <asm/core.h> -#include <asm/io.h> -#include <asm/irq.h> -#include <asm/pgtable.h> -#include <asm/pgalloc.h> #include <asm/mmu_context.h> #include <asm/tlbflush.h> -#include <asm/suspend.h> -#include <asm/hcall.h> -#include <asm/sw64io.h> #include <asm/sw64_init.h> #include <asm/topology.h> -#include <asm/tc.h> + #include "proto.h"
struct smp_rcb_struct *smp_rcb; diff --git a/arch/sw_64/kernel/stacktrace.c b/arch/sw_64/kernel/stacktrace.c index bb501c14565b..41cdff5b4941 100644 --- a/arch/sw_64/kernel/stacktrace.c +++ b/arch/sw_64/kernel/stacktrace.c @@ -6,7 +6,6 @@ */ #include <linux/sched.h> #include <linux/stacktrace.h> -#include <linux/export.h> #include <linux/sched/task_stack.h> #include <linux/sched/debug.h>
diff --git a/arch/sw_64/kernel/suspend.c b/arch/sw_64/kernel/suspend.c index b2b07ac3042b..c5de4df9d084 100644 --- a/arch/sw_64/kernel/suspend.c +++ b/arch/sw_64/kernel/suspend.c @@ -1,17 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/suspend.h> -#include <linux/interrupt.h> -#include <linux/pm.h> -#include <linux/irq.h> -#include <linux/types.h> -#include <linux/pci.h> -#include <asm/ptrace.h> + #include <asm/suspend.h> -#include <asm/smp.h> -#include <asm/io.h> -#include <asm/hmcall.h> -#include <asm/delay.h> -#include <asm/sw64io.h> #include <asm/sw64_init.h>
struct processor_state suspend_state; diff --git a/arch/sw_64/kernel/tc.c b/arch/sw_64/kernel/tc.c index c047d457e55a..f2de5ac3d9dc 100644 --- a/arch/sw_64/kernel/tc.c +++ b/arch/sw_64/kernel/tc.c @@ -5,9 +5,6 @@
#include <linux/topology.h> -#include <linux/spinlock.h> -#include <linux/kernel.h> -#include <linux/smp.h> #include <asm/tc.h>
/* diff --git a/arch/sw_64/kernel/time.c b/arch/sw_64/kernel/time.c index 185db832dfb8..15035a01e48a 100644 --- a/arch/sw_64/kernel/time.c +++ b/arch/sw_64/kernel/time.c @@ -1,34 +1,11 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/errno.h> #include <linux/module.h> -#include <linux/sched.h> -#include <linux/kernel.h> -#include <linux/param.h> -#include <linux/string.h> -#include <linux/mm.h> #include <linux/delay.h> -#include <linux/ioport.h> -#include <linux/irq.h> -#include <linux/interrupt.h> -#include <linux/init.h> -#include <linux/bcd.h> -#include <linux/profile.h> -#include <linux/irq_work.h> -#include <linux/uaccess.h> - -#include <asm/io.h> -#include <asm/sw64io.h> -#include <asm/sw64_init.h> -#include <asm/hw_init.h> -#include <asm/irq_impl.h> -#include <asm/debug.h> - #include <linux/time.h> -#include <linux/timex.h> -#include <linux/clocksource.h> #include <linux/clk-provider.h> -#include <linux/sched/clock.h> -#include <linux/sched_clock.h> + +#include <asm/debug.h>
#include "proto.h"
diff --git a/arch/sw_64/kernel/timer.c b/arch/sw_64/kernel/timer.c index c29e7d1b664b..60c75096d8c4 100644 --- a/arch/sw_64/kernel/timer.c +++ b/arch/sw_64/kernel/timer.c @@ -4,20 +4,9 @@ * Description: percpu local timer, based on arch/x86/kernel/apic/apic.c */
-#include <linux/init.h> -#include <linux/mm.h> -#include <linux/delay.h> -#include <linux/memblock.h> #include <linux/interrupt.h> -#include <linux/kernel_stat.h> -#include <linux/ioport.h> -#include <linux/cpu.h> #include <linux/clockchips.h> -#include <linux/acpi_pmtmr.h> -#include <linux/module.h> -#include <linux/dmi.h> -#include <linux/dmar.h> -#include <asm/hcall.h> + #include <asm/hw_init.h> #include <asm/hardirq.h>
diff --git a/arch/sw_64/kernel/topology.c b/arch/sw_64/kernel/topology.c index 2e2878ba8656..964d6a83d901 100644 --- a/arch/sw_64/kernel/topology.c +++ b/arch/sw_64/kernel/topology.c @@ -1,20 +1,7 @@ // SPDX-License-Identifier: GPL-2.0
#include <linux/acpi.h> -#include <linux/arch_topology.h> -#include <linux/cacheinfo.h> -#include <linux/cpu.h> -#include <linux/cpumask.h> -#include <linux/init.h> -#include <linux/percpu.h> -#include <linux/node.h> -#include <linux/nodemask.h> #include <linux/of.h> -#include <linux/sched.h> -#include <linux/sched/topology.h> -#include <linux/slab.h> -#include <linux/smp.h> -#include <linux/string.h>
#include <asm/topology.h>
diff --git a/arch/sw_64/kernel/traps.c b/arch/sw_64/kernel/traps.c index d4354d72d6aa..2090eda082cf 100644 --- a/arch/sw_64/kernel/traps.c +++ b/arch/sw_64/kernel/traps.c @@ -9,29 +9,16 @@ * This file initializes the trap entry points */
-#include <linux/jiffies.h> -#include <linux/mm.h> -#include <linux/sched/signal.h> -#include <linux/sched/debug.h> -#include <linux/tty.h> -#include <linux/delay.h> #include <linux/extable.h> -#include <linux/kallsyms.h> -#include <linux/ratelimit.h> -#include <linux/uaccess.h> #include <linux/perf_event.h> #include <linux/kdebug.h> #include <linux/kexec.h>
#include <asm/gentrap.h> -#include <asm/unaligned.h> -#include <asm/sysinfo.h> #include <asm/mmu_context.h> -#include <asm/special_insns.h> #include <asm/fpu.h> #include <asm/kprobes.h> #include <asm/uprobes.h> -#include <asm/core.h>
#include "proto.h"
diff --git a/arch/sw_64/kernel/unaligned.c b/arch/sw_64/kernel/unaligned.c index 4ec1187d6cd0..a1bbdab4a266 100644 --- a/arch/sw_64/kernel/unaligned.c +++ b/arch/sw_64/kernel/unaligned.c @@ -12,9 +12,6 @@ * for more details. */
-#include <linux/kernel.h> -#include <linux/debugfs.h> -#include <linux/seq_file.h> #include <asm/unaligned.h> #include <asm/debug.h>
diff --git a/arch/sw_64/kernel/uprobes.c b/arch/sw_64/kernel/uprobes.c index d10464d0dcdd..786f2e38a59f 100644 --- a/arch/sw_64/kernel/uprobes.c +++ b/arch/sw_64/kernel/uprobes.c @@ -1,14 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/highmem.h> #include <linux/kdebug.h> -#include <linux/types.h> -#include <linux/notifier.h> -#include <linux/sched.h> #include <linux/uprobes.h> #include <linux/ptrace.h>
-#include <asm/ptrace.h> - #define UPROBE_TRAP_NR ULONG_MAX
/** diff --git a/arch/sw_64/kernel/vdso.c b/arch/sw_64/kernel/vdso.c index 32ed952748f0..b4126cbaa4bd 100644 --- a/arch/sw_64/kernel/vdso.c +++ b/arch/sw_64/kernel/vdso.c @@ -14,20 +14,11 @@ * */
-#include <linux/kernel.h> -#include <linux/clocksource.h> #include <linux/elf.h> -#include <linux/err.h> -#include <linux/errno.h> -#include <linux/gfp.h> #include <linux/mm.h> -#include <linux/sched.h> -#include <linux/signal.h> #include <linux/slab.h> #include <linux/timekeeper_internal.h> -#include <linux/vmalloc.h>
-#include <asm/cacheflush.h> #include <asm/vdso.h>
extern char vdso_start, vdso_end; diff --git a/arch/sw_64/kernel/vdso/vdso.S b/arch/sw_64/kernel/vdso/vdso.S index ce5448d00cf7..edd9be27db9d 100644 --- a/arch/sw_64/kernel/vdso/vdso.S +++ b/arch/sw_64/kernel/vdso/vdso.S @@ -15,9 +15,7 @@ * */
-#include <linux/init.h> #include <linux/linkage.h> -#include <linux/const.h> #include <asm/page.h>
__PAGE_ALIGNED_DATA diff --git a/arch/sw_64/kernel/vdso/vgettimeofday.c b/arch/sw_64/kernel/vdso/vgettimeofday.c index 3579e0eddfe2..b9c9a137f9d3 100644 --- a/arch/sw_64/kernel/vdso/vgettimeofday.c +++ b/arch/sw_64/kernel/vdso/vgettimeofday.c @@ -13,10 +13,9 @@ */
#include <linux/time.h> -#include <asm/timex.h> + #include <asm/unistd.h> #include <asm/vdso.h> -#include <asm/io.h>
static __always_inline int syscall_fallback(clockid_t clkid, struct timespec64 *ts) { diff --git a/arch/sw_64/kvm/kvm-sw64.c b/arch/sw_64/kvm/kvm-sw64.c index cc9817037b58..bc24a4711311 100644 --- a/arch/sw_64/kvm/kvm-sw64.c +++ b/arch/sw_64/kvm/kvm-sw64.c @@ -5,31 +5,18 @@ * linhn linhn@example.com */
-#include <linux/cpu.h> #include <linux/errno.h> -#include <linux/err.h> #include <linux/kvm_host.h> #include <linux/module.h> -#include <linux/vmalloc.h> -#include <linux/fs.h> #include <linux/mman.h> #include <linux/sched/signal.h> -#include <linux/freezer.h> -#include <linux/smp.h> #include <linux/kvm.h> #include <linux/uaccess.h> -#include <linux/genalloc.h> -#include <asm/kvm_emulate.h> -#include <asm/kvm_asm.h> -#include <asm/sw64io.h>
#include <asm/kvm_timer.h> -#include <asm/kvm_host.h> #include <asm/kvm_emulate.h>
-#include <asm/page.h> #include "../kernel/pci_impl.h" - #include "vmem.c"
bool set_msi_flag; diff --git a/arch/sw_64/lib/fls.c b/arch/sw_64/lib/fls.c index e960b1c06782..aa4231f7e472 100644 --- a/arch/sw_64/lib/fls.c +++ b/arch/sw_64/lib/fls.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/module.h> -#include <linux/bitops.h>
/* This is fls(x)-1, except zero is held to zero. This allows most * efficient input into extbl, plus it allows easy handling of fls(0)=0. diff --git a/arch/sw_64/lib/iomap.c b/arch/sw_64/lib/iomap.c index 30d24923624d..39e3d5498ae6 100644 --- a/arch/sw_64/lib/iomap.c +++ b/arch/sw_64/lib/iomap.c @@ -3,10 +3,8 @@ * Sw_64 IO and memory functions. */
-#include <linux/kernel.h> -#include <linux/types.h> -#include <linux/string.h> #include <linux/module.h> + #include <asm/io.h>
/* diff --git a/arch/sw_64/lib/udelay.c b/arch/sw_64/lib/udelay.c index 595887caa7b3..48356ab8872f 100644 --- a/arch/sw_64/lib/udelay.c +++ b/arch/sw_64/lib/udelay.c @@ -6,11 +6,6 @@ */
#include <linux/module.h> -#include <linux/sched.h> /* for udelay's use of smp_processor_id */ -#include <asm/param.h> -#include <asm/smp.h> -#include <asm/hw_init.h> -#include <linux/delay.h>
/* * Use only for very small delays (< 1 msec). diff --git a/arch/sw_64/math-emu/math.c b/arch/sw_64/math-emu/math.c index 3903b421b8f4..9f281d82ad83 100644 --- a/arch/sw_64/math-emu/math.c +++ b/arch/sw_64/math-emu/math.c @@ -8,16 +8,12 @@ * fire3 2008-12-27 Add SIMD floating emulation code for SW64 */
-#include <linux/module.h> -#include <linux/types.h> -#include <linux/kernel.h> -#include <linux/sched.h> -#include <asm/ptrace.h> - - #include <linux/uaccess.h>
+#include <asm/ptrace.h> + #include "sfp-util.h" + #include <math-emu/soft-fp.h> #include <math-emu/single.h> #include <math-emu/double.h> diff --git a/arch/sw_64/mm/fault.c b/arch/sw_64/mm/fault.c index c68be4a40d23..b580450893ba 100644 --- a/arch/sw_64/mm/fault.c +++ b/arch/sw_64/mm/fault.c @@ -3,28 +3,11 @@ * Copyright (C) 1995 Linus Torvalds */
-#include <linux/sched.h> -#include <linux/kernel.h> -#include <linux/mm.h> -#include <asm/io.h> - -#include <asm/mmu_context.h> -#include <asm/tlbflush.h> -#include <asm/core.h> - -#include <linux/signal.h> -#include <linux/errno.h> -#include <linux/string.h> -#include <linux/types.h> -#include <linux/ptrace.h> -#include <linux/mman.h> -#include <linux/fs.h> -#include <linux/smp.h> -#include <linux/interrupt.h> #include <linux/extable.h> #include <linux/perf_event.h> #include <linux/kprobes.h> -#include <linux/uaccess.h> + +#include <asm/mmu_context.h>
__read_mostly bool segv_debug_enabled;
diff --git a/arch/sw_64/mm/hugetlbpage.c b/arch/sw_64/mm/hugetlbpage.c index 3c03709d441c..2a40225af4d8 100644 --- a/arch/sw_64/mm/hugetlbpage.c +++ b/arch/sw_64/mm/hugetlbpage.c @@ -3,18 +3,13 @@ * SW64 Huge TLB Page Support for Kernel. */
-#include <linux/init.h> -#include <linux/fs.h> #include <linux/mm.h> #include <linux/sched/mm.h> #include <linux/hugetlb.h> -#include <linux/pagemap.h> #include <linux/err.h> -#include <linux/sysctl.h> + #include <asm/mman.h> #include <asm/tlb.h> -#include <asm/tlbflush.h> -#include <asm/pgalloc.h>
/* * pmd_huge() returns 1 if @pmd is hugetlb related entry, that is normal diff --git a/arch/sw_64/mm/init.c b/arch/sw_64/mm/init.c index e3c2a20e54a2..4dda5ecb4f2e 100644 --- a/arch/sw_64/mm/init.c +++ b/arch/sw_64/mm/init.c @@ -5,36 +5,13 @@
/* 2.3.x zone allocator, 1999 Andrea Arcangeli andrea@suse.de */
-#include <linux/pagemap.h> -#include <linux/signal.h> -#include <linux/sched.h> -#include <linux/kernel.h> -#include <linux/errno.h> -#include <linux/string.h> -#include <linux/types.h> -#include <linux/ptrace.h> -#include <linux/mman.h> #include <linux/mm.h> #include <linux/swap.h> -#include <linux/init.h> -#include <linux/vmalloc.h> -#include <linux/gfp.h> -#include <linux/uaccess.h> #include <linux/memblock.h> -#include <linux/dma-mapping.h> #include <linux/swiotlb.h> #include <linux/acpi.h>
-#include <asm/pgtable.h> -#include <asm/pgalloc.h> -#include <asm/dma.h> #include <asm/mmu_context.h> -#include <asm/console.h> -#include <asm/tlb.h> -#include <asm/setup.h> -#include <asm/sections.h> -#include <asm/memory.h> -#include <asm/hw_init.h>
extern void die_if_kernel(char *, struct pt_regs *, long);
diff --git a/arch/sw_64/mm/numa.c b/arch/sw_64/mm/numa.c index 940c12fcbb8d..7cb13587e465 100644 --- a/arch/sw_64/mm/numa.c +++ b/arch/sw_64/mm/numa.c @@ -3,27 +3,11 @@ * DISCONTIGMEM NUMA sw64 support. */
-#include <linux/types.h> -#include <linux/kernel.h> -#include <linux/mm.h> #include <linux/memblock.h> -#include <linux/swap.h> -#include <linux/initrd.h> -#include <linux/pfn.h> -#include <linux/module.h> #include <linux/cpuset.h> -#include <linux/init.h> -#ifdef CONFIG_PCI -#include <linux/pci.h> -#endif #include <linux/acpi.h> #include <linux/of.h>
-#include <asm/pgalloc.h> -#include <asm/sections.h> -#include <asm/sw64_init.h> -#include <asm/hw_init.h> -#include <asm/memory.h> #include <asm/core.h>
int cpu_to_node_map[NR_CPUS]; diff --git a/arch/sw_64/mm/physaddr.c b/arch/sw_64/mm/physaddr.c index d5cf83e671ae..fbb489ae4db5 100644 --- a/arch/sw_64/mm/physaddr.c +++ b/arch/sw_64/mm/physaddr.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include <linux/mmdebug.h> #include <linux/module.h> -#include <linux/mm.h> #include <asm/page.h>
unsigned long __phys_addr(unsigned long x) diff --git a/arch/sw_64/mm/thp.c b/arch/sw_64/mm/thp.c index 68260dd0e837..833bb59f79d0 100644 --- a/arch/sw_64/mm/thp.c +++ b/arch/sw_64/mm/thp.c @@ -1,13 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#include <linux/init.h> -#include <linux/fs.h> -#include <linux/mm.h> -#include <linux/hugetlb.h> -#include <linux/pagemap.h> -#include <linux/err.h> -#include <linux/sysctl.h> -#include <asm/mman.h> -#include <asm/tlb.h> #include <asm/tlbflush.h> #include <asm/pgalloc.h>