summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/sn/sn0/hub.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/sn/sn0/hub.h')
-rw-r--r--arch/mips/include/asm/sn/sn0/hub.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/include/asm/sn/sn0/hub.h b/arch/mips/include/asm/sn/sn0/hub.h
index 82cadd785b9c..c84adde36d41 100644
--- a/arch/mips/include/asm/sn/sn0/hub.h
+++ b/arch/mips/include/asm/sn/sn0/hub.h
@@ -47,6 +47,16 @@
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 */