linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Banman <abanman@sgi.com>
To: mingo@redhat.com, akpm@linux-foundation.org
Cc: tglx@linutronix.de, hpa@zytor.com, travis@sgi.com, rja@sgi.com,
	sivanich@sgi.com, x86@kernel.org, linux-kernel@vger.kernel.org,
	abanman@sgi.com
Subject: [PATCH 05/10] arch/x86/platform/uv: BAU use generic function pointers
Date: Tue, 20 Sep 2016 17:21:11 -0500	[thread overview]
Message-ID: <1474410076-178329-6-git-send-email-abanman@sgi.com> (raw)
In-Reply-To: <1474410076-178329-1-git-send-email-abanman@sgi.com>

Convert the use of UV version-specific functions to their abstracted
counterparts.

Signed-off-by: Andrew Banman <abanman@sgi.com>
Acked-by: Mike Travis <travis@sgi.com>
Acked-by: Dimitri Sivanich <sivanich@sgi.com>
---
 arch/x86/platform/uv/tlb_uv.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index 045da97..bfeb382 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -228,7 +228,7 @@ static void reply_to_message(struct msg_desc *mdp, struct bau_control *bcp,
 	msg = mdp->msg;
 	if (!msg->canceled && do_acknowledge) {
 		dw = (msg->swack_vec << UV_SW_ACK_NPENDING) | msg->swack_vec;
-		write_mmr_sw_ack(dw);
+		ops.write_l_sw_ack(dw);
 	}
 	msg->replied_to = 1;
 	msg->swack_vec = 0;
@@ -264,7 +264,7 @@ static void bau_process_retry_msg(struct msg_desc *mdp,
 			msg->swack_vec) == 0) &&
 		    (msg2->sending_cpu == msg->sending_cpu) &&
 		    (msg2->msg_type != MSG_NOOP)) {
-			mmr = read_mmr_sw_ack();
+			mmr = ops.read_l_sw_ack();
 			msg_res = msg2->swack_vec;
 			/*
 			 * This is a message retry; clear the resources held
@@ -282,7 +282,7 @@ static void bau_process_retry_msg(struct msg_desc *mdp,
 				stat->d_canceled++;
 				cancel_count++;
 				mr = (msg_res << UV_SW_ACK_NPENDING) | msg_res;
-				write_mmr_sw_ack(mr);
+				ops.write_l_sw_ack(mr);
 			}
 		}
 	}
@@ -415,12 +415,12 @@ static void do_reset(void *ptr)
 			/*
 			 * only reset the resource if it is still pending
 			 */
-			mmr = read_mmr_sw_ack();
+			mmr = ops.read_l_sw_ack();
 			msg_res = msg->swack_vec;
 			mr = (msg_res << UV_SW_ACK_NPENDING) | msg_res;
 			if (mmr & msg_res) {
 				stat->d_rcanceled++;
-				write_mmr_sw_ack(mr);
+				ops.write_l_sw_ack(mr);
 			}
 		}
 	}
@@ -1214,7 +1214,7 @@ void process_uv2_message(struct msg_desc *mdp, struct bau_control *bcp)
 	struct bau_pq_entry *msg = mdp->msg;
 	struct bau_pq_entry *other_msg;
 
-	mmr_image = read_mmr_sw_ack();
+	mmr_image = ops.read_l_sw_ack();
 	swack_vec = msg->swack_vec;
 
 	if ((swack_vec & mmr_image) == 0) {
@@ -1443,7 +1443,7 @@ static int ptc_seq_show(struct seq_file *file, void *data)
 		/* destination side statistics */
 		seq_printf(file,
 			"%lx %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld\n",
-			   read_gmmr_sw_ack(uv_cpu_to_pnode(cpu)),
+			   ops.read_g_sw_ack(uv_cpu_to_pnode(cpu)),
 			   stat->d_requestee, cycles_2_us(stat->d_time),
 			   stat->d_alltlb, stat->d_onetlb, stat->d_multmsg,
 			   stat->d_nomsg, stat->d_retries, stat->d_canceled,
@@ -1737,7 +1737,7 @@ static void activation_descriptor_init(int node, int pnode, int base_pnode)
 
 	gpa = uv_gpa(bau_desc);
 	n = uv_gpa_to_gnode(gpa);
-	m = uv_gpa_to_offset(gpa);
+	m = ops.bau_gpa_to_offset(gpa);
 	if (is_uv1_hub())
 		uv1 = 1;
 
@@ -1824,16 +1824,16 @@ static void pq_init(int node, int pnode)
 		bcp->queue_last		= pqp + (DEST_Q_SIZE - 1);
 	}
 
-	first = uv_gpa_to_offset(uv_gpa(pqp));
-	last = uv_gpa_to_offset(uv_gpa(pqp + (DEST_Q_SIZE - 1)));
+	first = ops.bau_gpa_to_offset(uv_gpa(pqp));
+	last = ops.bau_gpa_to_offset(uv_gpa(pqp + (DEST_Q_SIZE - 1)));
 	tail = first;
 	gnode = uv_gpa_to_gnode(uv_gpa(pqp));
 	first = (gnode << UV_PAYLOADQ_GNODE_SHIFT) | tail;
 
-	write_mmr_payload_first(pnode, first);
-	write_mmr_payload_last(pnode, last);
 	write_mmr_payload_tail(pnode, tail);
-	write_gmmr_sw_ack(pnode, 0xffffUL);
+	ops.write_payload_first(pnode, first);
+	ops.write_payload_last(pnode, last);
+	ops.write_g_sw_ack(pnode, 0xffffUL);
 
 	/* in effect, all msg_type's are set to MSG_NOOP */
 	memset(pqp, 0, sizeof(struct bau_pq_entry) * DEST_Q_SIZE);
-- 
1.8.5.6

  parent reply	other threads:[~2016-09-20 22:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 22:21 Andrew Banman
2016-09-20 22:21 ` [PATCH 01/10] arch/x86/platform/uv: BAU cleanup: update printks Andrew Banman
2016-09-20 22:21 ` [PATCH 02/10] arch/x86/platform/uv: BAU cleanup: pq_init Andrew Banman
2016-09-20 22:21 ` [PATCH 03/10] arch/x86/platform/uv: BAU replace uv_physnodeaddr Andrew Banman
2016-09-20 22:21 ` [PATCH 04/10] arch/x86/platform/uv: BAU add generic function pointers Andrew Banman
2016-09-20 22:21 ` Andrew Banman [this message]
2016-09-20 22:21 ` [PATCH 06/10] arch/x86/platform/uv: BAU UV4 populate uvhub_version Andrew Banman
2016-09-20 22:21 ` [PATCH 07/10] arch/x86/platform/uv: BAU UV4 disable software timeout Andrew Banman
2016-09-20 22:21 ` [PATCH 08/10] arch/x86/platform/uv: BAU UV4 fix payload queue setup Andrew Banman
2016-09-20 22:21 ` [PATCH 09/10] arch/x86/platform/uv: BAU UV4 add version-specific functions Andrew Banman
2016-09-20 22:21 ` [PATCH 10/10] Apply Mike's UV4 fixup patches Andrew Banman
2016-09-20 22:23 ` your mail 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=1474410076-178329-6-git-send-email-abanman@sgi.com \
    --to=abanman@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rja@sgi.com \
    --cc=sivanich@sgi.com \
    --cc=tglx@linutronix.de \
    --cc=travis@sgi.com \
    --cc=x86@kernel.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).