Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Thomas Bogendoerfer and committed by
Paul Burton
e9d2eb99 58fd034d

+10 -16
-6
arch/mips/include/asm/sn/arch.h
··· 25 25 #define INVALID_MODULE (moduleid_t)-1 26 26 #define INVALID_PARTID (partid_t)-1 27 27 28 - #ifndef __ASSEMBLY__ 29 - 30 - extern nasid_t get_nasid(void); 31 - 32 - #endif 33 - 34 28 #endif /* _ASM_SN_ARCH_H */
+10
arch/mips/include/asm/sn/sn0/hub.h
··· 47 47 and \res, NSRI_NODEID_MASK 48 48 dsrl \res, NSRI_NODEID_SHFT 49 49 .endm 50 + #else 51 + 52 + /* 53 + * get_nasid() returns the physical node id number of the caller. 54 + */ 55 + static inline nasid_t get_nasid(void) 56 + { 57 + return (nasid_t)((LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_NODEID_MASK) 58 + >> NSRI_NODEID_SHFT); 59 + } 50 60 #endif 51 61 52 62 #endif /* _ASM_SN_SN0_HUB_H */
-10
arch/mips/sgi-ip27/ip27-init.c
··· 94 94 enable_percpu_irq(IP27_HUB_PEND1_IRQ, IRQ_TYPE_NONE); 95 95 } 96 96 97 - /* 98 - * get_nasid() returns the physical node id number of the caller. 99 - */ 100 - nasid_t 101 - get_nasid(void) 102 - { 103 - return (nasid_t)((LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_NODEID_MASK) 104 - >> NSRI_NODEID_SHFT); 105 - } 106 - 107 97 void __init plat_mem_setup(void) 108 98 { 109 99 u64 p, e, n_mode;