From: He Sheng hesheng@wxiat.com
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG
--------------------------------
We consider io.h as a basic header which should be decoupled with platforms and chipsets, so it's better to remove sw64io.h from io.h, and do something necessary to make it build ok.
Signed-off-by: He Sheng hesheng@wxiat.com
Signed-off-by: Gu Zitao guzitao@wxiat.com --- arch/sw_64/chip/chip3/i2c-lib.c | 2 ++ arch/sw_64/include/asm/io.h | 10 ---------- arch/sw_64/include/asm/irq_impl.h | 2 ++ arch/sw_64/include/asm/sw64_init.h | 1 + arch/sw_64/kernel/pci_impl.h | 2 ++ arch/sw_64/kernel/proto.h | 1 + arch/sw_64/lib/iomap.c | 3 ++- 7 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/arch/sw_64/chip/chip3/i2c-lib.c b/arch/sw_64/chip/chip3/i2c-lib.c index ddf0a187ab5a..39b815022e69 100644 --- a/arch/sw_64/chip/chip3/i2c-lib.c +++ b/arch/sw_64/chip/chip3/i2c-lib.c @@ -19,6 +19,8 @@ #include <linux/errno.h> #include <linux/fb.h>
+#include <asm/sw64io.h> + #define CPLD_BUSNR 2
#ifndef _I2C_DEBUG_FLAG_ diff --git a/arch/sw_64/include/asm/io.h b/arch/sw_64/include/asm/io.h index 3138665133e1..fc11cb82f5b5 100644 --- a/arch/sw_64/include/asm/io.h +++ b/arch/sw_64/include/asm/io.h @@ -64,8 +64,6 @@ static inline void * __deprecated bus_to_virt(unsigned long address) } #define isa_bus_to_virt bus_to_virt
-#include <asm/sw64io.h> - /* * Generic IO read/write. These perform native-endian accesses. */ @@ -177,14 +175,6 @@ extern void outb(u8 b, unsigned long port); extern void outw(u16 b, unsigned long port); extern void outl(u32 b, unsigned long port);
-/* - * Mapping from port numbers to __iomem space is pretty easy. - */ -static inline void __iomem *ioportmap(unsigned long addr) -{ - return sw64_platform->ioportmap(addr); -} - static inline void __iomem *__ioremap(phys_addr_t addr, size_t size, pgprot_t prot) { diff --git a/arch/sw_64/include/asm/irq_impl.h b/arch/sw_64/include/asm/irq_impl.h index 713267077142..3679793d8b65 100644 --- a/arch/sw_64/include/asm/irq_impl.h +++ b/arch/sw_64/include/asm/irq_impl.h @@ -11,6 +11,8 @@ #include <linux/irq.h> #include <linux/profile.h>
+#include <asm/sw64io.h> + #define SW64_PCIE0_INT_BASE 17 #define SW64_PCIE0_MSI_BASE 21
diff --git a/arch/sw_64/include/asm/sw64_init.h b/arch/sw_64/include/asm/sw64_init.h index 15842d22e5ba..2d9140605d0b 100644 --- a/arch/sw_64/include/asm/sw64_init.h +++ b/arch/sw_64/include/asm/sw64_init.h @@ -5,6 +5,7 @@ #include <linux/cpu.h> #include <linux/pci.h>
+#include <asm/sw64io.h>
struct sw64_early_init_ops { void (*setup_core_start)(struct cpumask *cpumask); diff --git a/arch/sw_64/kernel/pci_impl.h b/arch/sw_64/kernel/pci_impl.h index 8e541f28f4ce..6025145cb1c5 100644 --- a/arch/sw_64/kernel/pci_impl.h +++ b/arch/sw_64/kernel/pci_impl.h @@ -6,6 +6,8 @@ #ifndef _SW64_KERNEL_PCI_IMPL_H #define _SW64_KERNEL_PCI_IMPL_H
+#include <asm/sw64io.h> + struct pci_dev; struct pci_controller;
diff --git a/arch/sw_64/kernel/proto.h b/arch/sw_64/kernel/proto.h index 1a729a8f21c3..9c99baaaf1d0 100644 --- a/arch/sw_64/kernel/proto.h +++ b/arch/sw_64/kernel/proto.h @@ -5,6 +5,7 @@ #include <linux/interrupt.h> #include <linux/io.h> #include <asm/pgtable.h> +#include <asm/sw64io.h>
/* ptrace.c */ extern int ptrace_set_bpt(struct task_struct *child); diff --git a/arch/sw_64/lib/iomap.c b/arch/sw_64/lib/iomap.c index 6fb96a7d7119..3a8d879ef070 100644 --- a/arch/sw_64/lib/iomap.c +++ b/arch/sw_64/lib/iomap.c @@ -6,6 +6,7 @@ #include <linux/module.h>
#include <asm/io.h> +#include <asm/platform.h>
/* * Here comes the sw64 implementation of the IOMAP interfaces. @@ -459,7 +460,7 @@ EXPORT_SYMBOL(_memset_c_io);
void __iomem *ioport_map(unsigned long port, unsigned int size) { - return ioportmap(port); + return sw64_platform->ioportmap(port); } EXPORT_SYMBOL(ioport_map);