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

MIPS: SGI-IP27: move IP27 specific macro to IP27 specific header file

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

authored by

Thomas Bogendoerfer and committed by
Paul Burton
58fd034d 5388b581

+12 -10
-10
arch/mips/include/asm/mach-ip27/kernel-entry-init.h
··· 14 14 #include <asm/sn/klkernvars.h> 15 15 16 16 /* 17 - * Returns the local nasid into res. 18 - */ 19 - .macro GET_NASID_ASM res 20 - dli \res, LOCAL_HUB_ADDR(NI_STATUS_REV_ID) 21 - ld \res, (\res) 22 - and \res, NSRI_NODEID_MASK 23 - dsrl \res, NSRI_NODEID_SHFT 24 - .endm 25 - 26 - /* 27 17 * TLB bits 28 18 */ 29 19 #define PAGE_GLOBAL (1 << 6)
+12
arch/mips/include/asm/sn/sn0/hub.h
··· 37 37 #define UATTR_MSPEC 2 38 38 #define UATTR_UNCAC 3 39 39 40 + #ifdef __ASSEMBLY__ 41 + /* 42 + * Returns the local nasid into res. 43 + */ 44 + .macro GET_NASID_ASM res 45 + dli \res, LOCAL_HUB_ADDR(NI_STATUS_REV_ID) 46 + ld \res, (\res) 47 + and \res, NSRI_NODEID_MASK 48 + dsrl \res, NSRI_NODEID_SHFT 49 + .endm 50 + #endif 51 + 40 52 #endif /* _ASM_SN_SN0_HUB_H */