MIPS: SGI-IP27: use asm/sn/agent.h for including HUB related stuff
authorThomas Bogendoerfer <tbogendoerfer@suse.de>
Thu, 9 Jan 2020 12:33:40 +0000 (13:33 +0100)
committerPaul Burton <paulburton@kernel.org>
Thu, 9 Jan 2020 23:29:50 +0000 (15:29 -0800)
By including agent.h where hub related defines/structs are needed, we
have only one place to select, which agent chip (HUB or BEDROCK) is used.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
19 files changed:
arch/mips/include/asm/mach-ip27/kernel-entry-init.h
arch/mips/include/asm/mach-ip27/mmzone.h
arch/mips/include/asm/mach-ip27/topology.h
arch/mips/include/asm/sn/arch.h
arch/mips/include/asm/sn/hub.h [deleted file]
arch/mips/include/asm/sn/types.h
arch/mips/pci/pci-ip27.c
arch/mips/sgi-ip27/ip27-berr.c
arch/mips/sgi-ip27/ip27-console.c
arch/mips/sgi-ip27/ip27-hubio.c
arch/mips/sgi-ip27/ip27-init.c
arch/mips/sgi-ip27/ip27-irq.c
arch/mips/sgi-ip27/ip27-klnuma.c
arch/mips/sgi-ip27/ip27-memory.c
arch/mips/sgi-ip27/ip27-nmi.c
arch/mips/sgi-ip27/ip27-reset.c
arch/mips/sgi-ip27/ip27-smp.c
arch/mips/sgi-ip27/ip27-timer.c
arch/mips/sgi-ip27/ip27-xtalk.c

index f992c1db876b5e7b06985b80f6d3b1289b953399..ef31d9fcf8061f64bc268171a8ad2c98cfb483af 100644 (file)
@@ -10,7 +10,7 @@
 #define __ASM_MACH_IP27_KERNEL_ENTRY_H
 
 #include <asm/sn/addrs.h>
-#include <asm/sn/sn0/hubni.h>
+#include <asm/sn/agent.h>
 #include <asm/sn/klkernvars.h>
 
 /*
index f463826515df3c9acd6e8bb59cb4b0e137af570d..534a50f791472e38b4968b846cb9aec8965b378c 100644 (file)
@@ -4,7 +4,8 @@
 
 #include <asm/sn/addrs.h>
 #include <asm/sn/arch.h>
-#include <asm/sn/hub.h>
+#include <asm/sn/agent.h>
+#include <asm/sn/klkernvars.h>
 
 #define pa_to_nid(addr)                NASID_GET(addr)
 
index be61ddcdacab125e83e660ae5536470c30168797..3c94ffc06a70f3ced46826a48e9e4b8166c6ba66 100644 (file)
@@ -2,7 +2,6 @@
 #ifndef _ASM_MACH_TOPOLOGY_H
 #define _ASM_MACH_TOPOLOGY_H   1
 
-#include <asm/sn/hub.h>
 #include <asm/sn/types.h>
 #include <asm/mmzone.h>
 
index f8b34d34d872824a9522cdc8a86325302ae6a4e4..afe9fcf36198fd627207cf0663fc8f60ad8ff610 100644 (file)
 #define INVALID_MODULE         (moduleid_t)-1
 #define INVALID_PARTID         (partid_t)-1
 
+#ifndef __ASSEMBLY__
+
 extern nasid_t get_nasid(void);
 
+#endif
+
 #endif /* _ASM_SN_ARCH_H */
diff --git a/arch/mips/include/asm/sn/hub.h b/arch/mips/include/asm/sn/hub.h
deleted file mode 100644 (file)
index 45878fb..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __ASM_SN_HUB_H
-#define __ASM_SN_HUB_H
-
-#include <linux/types.h>
-#include <linux/cpumask.h>
-#include <asm/sn/types.h>
-#include <asm/sn/io.h>
-#include <asm/sn/klkernvars.h>
-#include <asm/xtalk/xtalk.h>
-
-/* ip27-hubio.c */
-extern unsigned long hub_pio_map(nasid_t nasid, xwidgetnum_t widget,
-                         unsigned long xtalk_addr, size_t size);
-extern void hub_pio_init(nasid_t nasid);
-
-#endif /* __ASM_SN_HUB_H */
index 203c927e84d1a6b9e541d8a83580a1b18110a179..451ba1ee41ad836728cbe4169ab190d415736412 100644 (file)
@@ -11,6 +11,8 @@
 
 #include <linux/types.h>
 
+#ifndef __ASSEMBLY__
+
 typedef unsigned long  cpuid_t;
 typedef signed short   nasid_t;        /* node id in numa-as-id space */
 typedef signed char    partid_t;       /* partition ID type */
@@ -18,4 +20,6 @@ typedef signed short  moduleid_t;     /* user-visible module number type */
 
 typedef dev_t          vertex_hdl_t;   /* hardware graph vertex handle */
 
+#endif
+
 #endif /* _ASM_SN_TYPES_H */
index 8e26b120f9944ec6ac3cef938b7611516472bdbd..d85cbf84e41c3e0e93528246b23d71c465dbde56 100644 (file)
@@ -10,7 +10,7 @@
 #include <asm/sn/addrs.h>
 #include <asm/sn/types.h>
 #include <asm/sn/klconfig.h>
-#include <asm/sn/hub.h>
+#include <asm/sn/agent.h>
 #include <asm/sn/ioc3.h>
 #include <asm/pci/bridge.h>
 
index 73ad29b180fb500e90cdde82a926475662815aed..65635f765645abdb12be207b413e94e1dadadb5a 100644 (file)
@@ -16,8 +16,8 @@
 
 #include <asm/ptrace.h>
 #include <asm/sn/addrs.h>
+#include <asm/sn/agent.h>
 #include <asm/sn/arch.h>
-#include <asm/sn/sn0/hub.h>
 #include <asm/tlbdebug.h>
 #include <asm/traps.h>
 #include <linux/uaccess.h>
index 5886bee89d06d1511ccd45f26b2c6ce026178002..441b149078261bb7613622c11051c666511c2299 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/page.h>
 #include <asm/setup.h>
 #include <asm/sn/addrs.h>
-#include <asm/sn/sn0/hub.h>
+#include <asm/sn/agent.h>
 #include <asm/sn/klconfig.h>
 #include <asm/sn/ioc3.h>
 #include <asm/sn/sn_private.h>
index a538d0ceb61d7cf7d0b1ae968566ffbb6e59e3c9..298cfdf8b44ebd42b672b2472830e8877b00cd61 100644 (file)
@@ -11,7 +11,9 @@
 #include <linux/mmzone.h>
 #include <asm/sn/addrs.h>
 #include <asm/sn/arch.h>
-#include <asm/sn/hub.h>
+#include <asm/sn/agent.h>
+#include <asm/sn/io.h>
+#include <asm/xtalk/xtalk.h>
 
 
 static int force_fire_and_forget = 1;
index f597e1ee2df7a1bf89ad4eeca7d870bf2482fc53..b8758af4c5b7a27ce9f371fd9a0a324abd06bd09 100644 (file)
 #include <asm/pgtable.h>
 #include <asm/sgialib.h>
 #include <asm/time.h>
+#include <asm/sn/agent.h>
 #include <asm/sn/types.h>
-#include <asm/sn/sn0/addrs.h>
-#include <asm/sn/sn0/hubni.h>
-#include <asm/sn/sn0/hubio.h>
 #include <asm/sn/klconfig.h>
 #include <asm/sn/ioc3.h>
 #include <asm/mipsregs.h>
 #include <asm/sn/gda.h>
-#include <asm/sn/hub.h>
 #include <asm/sn/intr.h>
 #include <asm/current.h>
 #include <asm/processor.h>
index c72ae330ea9304dd30238a7becd457c6513523da..5a4a782ceae5ac8cdaf041acabe44ca73fd5a6b6 100644 (file)
@@ -19,7 +19,6 @@
 #include <asm/sn/addrs.h>
 #include <asm/sn/agent.h>
 #include <asm/sn/arch.h>
-#include <asm/sn/hub.h>
 #include <asm/sn/intr.h>
 #include <asm/sn/irq_alloc.h>
 
index af7b98c39dce186f3d947dada2c78a7dc2209442..9c5e799bcdb9bf300267d9353fbea3b9ed1239fa 100644 (file)
@@ -16,7 +16,6 @@
 #include <asm/sn/types.h>
 #include <asm/sn/arch.h>
 #include <asm/sn/gda.h>
-#include <asm/sn/hub.h>
 #include <asm/sn/mapped_kernel.h>
 #include <asm/sn/sn_private.h>
 
index a0c717662eb111d1bbae661a958d9dc078c15543..0ef2181db8d0137d08ef3b71f4fb92034f310d34 100644 (file)
@@ -25,7 +25,6 @@
 #include <asm/sections.h>
 
 #include <asm/sn/arch.h>
-#include <asm/sn/hub.h>
 #include <asm/sn/klconfig.h>
 #include <asm/sn/sn_private.h>
 
index daf3670d94e769dbef27a5761846dc91fd9545b1..916e795fdac7094690dcd1bab63ebd00ef5cf468 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/sn/addrs.h>
 #include <asm/sn/nmi.h>
 #include <asm/sn/arch.h>
-#include <asm/sn/sn0/hub.h>
+#include <asm/sn/agent.h>
 
 #if 0
 #define NODE_NUM_CPUS(n)       CNODE_NUM_CPUS(n)
index 74d078247e494d77095f3465d092009f8cae480a..5ac5ad63873430475b166b99bcbb9cca031475bc 100644 (file)
@@ -22,9 +22,9 @@
 #include <asm/reboot.h>
 #include <asm/sgialib.h>
 #include <asm/sn/addrs.h>
+#include <asm/sn/agent.h>
 #include <asm/sn/arch.h>
 #include <asm/sn/gda.h>
-#include <asm/sn/sn0/hub.h>
 
 #include "ip27-common.h"
 
index de3711e9b1ba2f186c3a2a460309931f504a434c..1ae053ecf75cfa60a5c5cf523d376271f20f0fbd 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/page.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
+#include <asm/sn/agent.h>
 #include <asm/sn/arch.h>
 #include <asm/sn/gda.h>
 #include <asm/sn/intr.h>
@@ -23,8 +24,6 @@
 #include <asm/sn/mapped_kernel.h>
 #include <asm/sn/sn_private.h>
 #include <asm/sn/types.h>
-#include <asm/sn/sn0/hubpi.h>
-#include <asm/sn/sn0/hubio.h>
 #include <asm/sn/sn0/ip27.h>
 
 #include "ip27-common.h"
index 17302bbfa7a6bd0765aebaddd2a912b394174486..059d74e395a37fafb6a5ea5ee691c03208c6b60c 100644 (file)
 #include <asm/sn/klconfig.h>
 #include <asm/sn/arch.h>
 #include <asm/sn/addrs.h>
+#include <asm/sn/agent.h>
 #include <asm/sn/sn_private.h>
 #include <asm/sn/sn0/ip27.h>
-#include <asm/sn/sn0/hub.h>
 
 #define TICK_SIZE (tick_nsec / 1000)
 
 /* Includes for ioc3_init().  */
 #include <asm/sn/types.h>
-#include <asm/sn/sn0/addrs.h>
-#include <asm/sn/sn0/hubni.h>
-#include <asm/sn/sn0/hubio.h>
 #include <asm/pci/bridge.h>
 
 #include "ip27-common.h"
index 5218b900f85555709c30179c083086d8a7091585..000ede156bdc040c8b998903bb523cf767ac612c 100644 (file)
@@ -15,7 +15,6 @@
 #include <asm/sn/addrs.h>
 #include <asm/sn/types.h>
 #include <asm/sn/klconfig.h>
-#include <asm/sn/hub.h>
 #include <asm/pci/bridge.h>
 #include <asm/xtalk/xtalk.h>