MIPS: SGI-IP27: Move get_nasid() to a IP27 specific file
authorThomas Bogendoerfer <tbogendoerfer@suse.de>
Thu, 9 Jan 2020 12:33:43 +0000 (13:33 +0100)
committerPaul Burton <paulburton@kernel.org>
Thu, 9 Jan 2020 23:29:54 +0000 (15:29 -0800)
get_nasid() will be different for SGI-IP35, therefore move IP27
implementation to IP27 specific file.

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
arch/mips/include/asm/sn/arch.h
arch/mips/include/asm/sn/sn0/hub.h
arch/mips/sgi-ip27/ip27-init.c

index afe9fcf..9a96825 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 */
index 82cadd7..c84adde 100644 (file)
        and     \res, NSRI_NODEID_MASK
        dsrl    \res, NSRI_NODEID_SHFT
        .endm
+#else
+
+/*
+ * get_nasid() returns the physical node id number of the caller.
+ */
+static inline nasid_t get_nasid(void)
+{
+       return (nasid_t)((LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_NODEID_MASK)
+                        >> NSRI_NODEID_SHFT);
+}
 #endif
 
 #endif /* _ASM_SN_SN0_HUB_H */
index 484db3b..a2da78b 100644 (file)
@@ -94,16 +94,6 @@ void per_cpu_init(void)
        enable_percpu_irq(IP27_HUB_PEND1_IRQ, IRQ_TYPE_NONE);
 }
 
-/*
- * get_nasid() returns the physical node id number of the caller.
- */
-nasid_t
-get_nasid(void)
-{
-       return (nasid_t)((LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_NODEID_MASK)
-                        >> NSRI_NODEID_SHFT);
-}
-
 void __init plat_mem_setup(void)
 {
        u64 p, e, n_mode;