diff options
author | Thomas Bogendoerfer <tbogendoerfer@suse.de> | 2020-01-09 13:33:43 +0100 |
---|---|---|
committer | Paul Burton <paulburton@kernel.org> | 2020-01-10 00:29:54 +0100 |
commit | e9d2eb9934816951a9461f1cc94ef5fd88803a64 (patch) | |
tree | c01164e9dd3e8c22aeeb52a68240838154765eb5 /arch/mips/include/asm/sn | |
parent | MIPS: SGI-IP27: move IP27 specific macro to IP27 specific header file (diff) | |
download | linux-e9d2eb9934816951a9461f1cc94ef5fd88803a64.tar.xz linux-e9d2eb9934816951a9461f1cc94ef5fd88803a64.zip |
MIPS: SGI-IP27: Move get_nasid() to a IP27 specific file
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
Diffstat (limited to 'arch/mips/include/asm/sn')
-rw-r--r-- | arch/mips/include/asm/sn/arch.h | 6 | ||||
-rw-r--r-- | arch/mips/include/asm/sn/sn0/hub.h | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/arch/mips/include/asm/sn/arch.h b/arch/mips/include/asm/sn/arch.h index afe9fcf36198..9a9682543e89 100644 --- a/arch/mips/include/asm/sn/arch.h +++ b/arch/mips/include/asm/sn/arch.h @@ -25,10 +25,4 @@ #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/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 */ |