MIPS: SGI-IP27: move IP27 specific macro to IP27 specific header file
authorThomas Bogendoerfer <tbogendoerfer@suse.de>
Thu, 9 Jan 2020 12:33:42 +0000 (13:33 +0100)
committerPaul Burton <paulburton@kernel.org>
Thu, 9 Jan 2020 23:29:53 +0000 (15:29 -0800)
Extracting node id from HUB register is specific to IP27 alias SN0.
Move the macro definition to a SN0 header 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/mach-ip27/kernel-entry-init.h
arch/mips/include/asm/sn/sn0/hub.h

index ef31d9f..3e54f60 100644 (file)
 #include <asm/sn/agent.h>
 #include <asm/sn/klkernvars.h>
 
-/*
- * Returns the local nasid into res.
- */
-       .macro GET_NASID_ASM res
-       dli     \res, LOCAL_HUB_ADDR(NI_STATUS_REV_ID)
-       ld      \res, (\res)
-       and     \res, NSRI_NODEID_MASK
-       dsrl    \res, NSRI_NODEID_SHFT
-       .endm
-
 /*
  * TLB bits
  */
index d78dd76..82cadd7 100644 (file)
 #define UATTR_MSPEC    2
 #define UATTR_UNCAC    3
 
+#ifdef __ASSEMBLY__
+/*
+ * Returns the local nasid into res.
+ */
+       .macro GET_NASID_ASM res
+       dli     \res, LOCAL_HUB_ADDR(NI_STATUS_REV_ID)
+       ld      \res, (\res)
+       and     \res, NSRI_NODEID_MASK
+       dsrl    \res, NSRI_NODEID_SHFT
+       .endm
+#endif
+
 #endif /* _ASM_SN_SN0_HUB_H */