linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tbogendoerfer@suse.de>
To: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	James Hogan <jhogan@kernel.org>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 05/14] MIPS: SGI-IP27: move IP27 specific macro to IP27 specific header file
Date: Thu,  9 Jan 2020 13:33:42 +0100	[thread overview]
Message-ID: <20200109123353.5656-6-tbogendoerfer@suse.de> (raw)
In-Reply-To: <20200109123353.5656-1-tbogendoerfer@suse.de>

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>
---
 arch/mips/include/asm/mach-ip27/kernel-entry-init.h | 10 ----------
 arch/mips/include/asm/sn/sn0/hub.h                  | 12 ++++++++++++
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/arch/mips/include/asm/mach-ip27/kernel-entry-init.h b/arch/mips/include/asm/mach-ip27/kernel-entry-init.h
index ef31d9fcf806..3e54f605a70b 100644
--- a/arch/mips/include/asm/mach-ip27/kernel-entry-init.h
+++ b/arch/mips/include/asm/mach-ip27/kernel-entry-init.h
@@ -13,16 +13,6 @@
 #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
  */
diff --git a/arch/mips/include/asm/sn/sn0/hub.h b/arch/mips/include/asm/sn/sn0/hub.h
index d78dd76d5dcf..82cadd785b9c 100644
--- a/arch/mips/include/asm/sn/sn0/hub.h
+++ b/arch/mips/include/asm/sn/sn0/hub.h
@@ -37,4 +37,16 @@
 #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 */
-- 
2.24.1


  parent reply	other threads:[~2020-01-09 12:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 12:33 [PATCH 00/14] Cleanup SGI-IP27 and prepare for SGI-IP35 support Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 01/14] MIPS: SGI-IP27: use nodemask instead of cpumask Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 02/14] MIPS: SGI-IP27: use cpu physid already present while scanning for CPUs Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 03/14] MIPS: SGI-IP27: use asm/sn/agent.h for including HUB related stuff Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 04/14] MIPS: SGI-IP27: get rid of asm/sn/sn0/ip27.h Thomas Bogendoerfer
2020-01-09 12:33 ` Thomas Bogendoerfer [this message]
2020-01-09 12:33 ` [PATCH 06/14] MIPS: SGI-IP27: Move get_nasid() to a IP27 specific file Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 07/14] MIPS: SGI-IP27: Split kldir.h into generic SN and IP27 parts Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 08/14] MIPS: SGI-IP27: Use union instead of typedef Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 09/14] MIPS: SGI-IP27: Use structs for decoding error status registers Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 10/14] MIPS: SGI-IP27: Use specific get_region_shift Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 11/14] MIPS: SGI-IP27: Move all shared IP27 declarations to ip27-common.h Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 12/14] MIPS: SGI-IP27: Only reserve interrupts used in Linux Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 13/14] MIPS: SGI-IP27: Store cpu speed when scanning for CPUs and use it later Thomas Bogendoerfer
2020-01-09 12:33 ` [PATCH 14/14] MIPS: SGI-IP27: No need for slice_map Thomas Bogendoerfer
2020-01-10 19:25 ` [PATCH 00/14] Cleanup SGI-IP27 and prepare for SGI-IP35 support Paul Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200109123353.5656-6-tbogendoerfer@suse.de \
    --to=tbogendoerfer@suse.de \
    --cc=jhogan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=paulburton@kernel.org \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).