All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Andrew Banman <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	tglx@linutronix.de, abanman@hpe.com
Subject: [tip:x86/platform] x86/platform/uv/BAU: Add uv_bau_version enumerated constants
Date: Mon, 13 Mar 2017 06:39:51 -0700	[thread overview]
Message-ID: <tip-491bd88cdb256cdabd25362b923d94ab80cf72c9@git.kernel.org> (raw)
In-Reply-To: <1489077734-111753-2-git-send-email-abanman@hpe.com>

Commit-ID:  491bd88cdb256cdabd25362b923d94ab80cf72c9
Gitweb:     http://git.kernel.org/tip/491bd88cdb256cdabd25362b923d94ab80cf72c9
Author:     Andrew Banman <abanman@hpe.com>
AuthorDate: Thu, 9 Mar 2017 10:42:09 -0600
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 13 Mar 2017 14:26:28 +0100

x86/platform/uv/BAU: Add uv_bau_version enumerated constants

Define enumerated constants for each UV hub version and replace magic
numbers with the appropriate constant.

Signed-off-by: Andrew Banman <abanman@hpe.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: sivanich@hpe.com
Cc: rja@hpe.com
Cc: mike.travis@hpe.com
Cc: akpm@linux-foundation.org
Link: http://lkml.kernel.org/r/1489077734-111753-2-git-send-email-abanman@hpe.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/x86/include/asm/uv/uv_bau.h |  7 +++++++
 arch/x86/platform/uv/tlb_uv.c    | 16 ++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h
index 57ab86d..768093f 100644
--- a/arch/x86/include/asm/uv/uv_bau.h
+++ b/arch/x86/include/asm/uv/uv_bau.h
@@ -185,6 +185,13 @@
 #define MSG_REGULAR			1
 #define MSG_RETRY			2
 
+enum uv_bau_version {
+	UV_BAU_V1 = 1,
+	UV_BAU_V2,
+	UV_BAU_V3,
+	UV_BAU_V4,
+};
+
 /*
  * Distribution: 32 bytes (256 bits) (bytes 0-0x1f of descriptor)
  * If the 'multilevel' flag in the header portion of the descriptor
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index f25982c..f4f5aa6 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -724,7 +724,7 @@ static int wait_completion(struct bau_desc *bau_desc, struct bau_control *bcp, l
 		right_shift = ((desc - UV_CPUS_PER_AS) * UV_ACT_STATUS_SIZE);
 	}
 
-	if (bcp->uvhub_version == 1)
+	if (bcp->uvhub_version == UV_BAU_V1)
 		return uv1_wait_completion(bau_desc, mmr_offset, right_shift, bcp, try);
 	else
 		return uv2_3_wait_completion(bau_desc, mmr_offset, right_shift, bcp, try);
@@ -918,7 +918,7 @@ int uv_flush_send_and_wait(struct cpumask *flush_mask, struct bau_control *bcp,
 	struct uv1_bau_msg_header *uv1_hdr = NULL;
 	struct uv2_3_bau_msg_header *uv2_3_hdr = NULL;
 
-	if (bcp->uvhub_version == 1) {
+	if (bcp->uvhub_version == UV_BAU_V1) {
 		uv1 = 1;
 		uv1_throttle(hmaster, stat);
 	}
@@ -1296,7 +1296,7 @@ void uv_bau_message_interrupt(struct pt_regs *regs)
 
 		msgdesc.msg_slot = msg - msgdesc.queue_first;
 		msgdesc.msg = msg;
-		if (bcp->uvhub_version == 2)
+		if (bcp->uvhub_version == UV_BAU_V2)
 			process_uv2_message(&msgdesc, bcp);
 		else
 			/* no error workaround for uv1 or uv3 */
@@ -1838,7 +1838,7 @@ static void pq_init(int node, int pnode)
 	 * and the payload queue tail must be maintained by the kernel.
 	 */
 	bcp = &per_cpu(bau_control, smp_processor_id());
-	if (bcp->uvhub_version <= 3) {
+	if (bcp->uvhub_version <= UV_BAU_V3) {
 		tail = first;
 		gnode = uv_gpa_to_gnode(uv_gpa(pqp));
 		first = (gnode << UV_PAYLOADQ_GNODE_SHIFT) | tail;
@@ -2052,13 +2052,13 @@ static int scan_sock(struct socket_desc *sdp, struct uvhub_desc *bdp,
 		bcp->socket_master = *smasterp;
 		bcp->uvhub = bdp->uvhub;
 		if (is_uv1_hub())
-			bcp->uvhub_version = 1;
+			bcp->uvhub_version = UV_BAU_V1;
 		else if (is_uv2_hub())
-			bcp->uvhub_version = 2;
+			bcp->uvhub_version = UV_BAU_V2;
 		else if (is_uv3_hub())
-			bcp->uvhub_version = 3;
+			bcp->uvhub_version = UV_BAU_V3;
 		else if (is_uv4_hub())
-			bcp->uvhub_version = 4;
+			bcp->uvhub_version = UV_BAU_V4;
 		else {
 			pr_emerg("uvhub version not 1, 2, 3, or 4\n");
 			return 1;

  reply	other threads:[~2017-03-13 13:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09 16:42 [PATCHv3 0/6] x86/platform/uv/BAU: UV4 message completion and initialization updates Andrew Banman
2017-03-09 16:42 ` [PATCH 1/6] x86/platform/uv/BAU: Add uv_bau_version enumerated constants Andrew Banman
2017-03-13 13:39   ` tip-bot for Andrew Banman [this message]
2017-03-09 16:42 ` [PATCH 2/6] x86/platform/uv/BAU: Add payload descriptor qualifier Andrew Banman
2017-03-13 13:40   ` [tip:x86/platform] " tip-bot for Andrew Banman
2017-03-09 16:42 ` [PATCH 3/6] x86/platform/uv/BAU: Cleanup bau_operations declaration and instances Andrew Banman
2017-03-13 13:40   ` [tip:x86/platform] " tip-bot for Andrew Banman
2017-03-09 16:42 ` [PATCH 4/6] x86/platform/uv/BAU: Add status mmr location fields to bau_control Andrew Banman
2017-03-13 13:41   ` [tip:x86/platform] " tip-bot for Andrew Banman
2017-03-09 16:42 ` [PATCH 5/6] x86/platform/uv/BAU: Add wait_completion to bau_operations Andrew Banman
2017-03-13 13:41   ` [tip:x86/platform] " tip-bot for Andrew Banman
2017-03-09 16:42 ` [PATCH 6/6] x86/platform/uv/BAU: Implement uv4_wait_completion with read_status Andrew Banman
2017-03-13 13:42   ` [tip:x86/platform] " tip-bot for Andrew Banman

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=tip-491bd88cdb256cdabd25362b923d94ab80cf72c9@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=abanman@hpe.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.