summaryrefslogtreecommitdiffstats
path: root/arch/x86/platform
diff options
context:
space:
mode:
authorAndrew Banman <abanman@sgi.com>2016-09-21 11:09:14 -0500
committerIngo Molnar <mingo@kernel.org>2016-09-22 11:16:13 +0200
commitd2a57afa53f3fdf9f68d1f4240ace85a7d20ca20 (patch)
tree87c8a0576ff49f2f819a0340370065172db57498 /arch/x86/platform
parentefa59ab3e7526650265f0fd9696ef8be8d88ec13 (diff)
downloadop-kernel-dev-d2a57afa53f3fdf9f68d1f4240ace85a7d20ca20.zip
op-kernel-dev-d2a57afa53f3fdf9f68d1f4240ace85a7d20ca20.tar.gz
x86/platform/uv/BAU: Clean up pq_init()
The payload queue first MMR requires the physical memory address and hub GNODE of where the payload queue resides in memory, but the associated variables are named as if the PNODE were used. Rename gnode-related variables and clarify the definitions of the payload queue head, last, and tail pointers. Signed-off-by: Andrew Banman <abanman@sgi.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Mike Travis <travis@sgi.com> Acked-by: Dimitri Sivanich <sivanich@sgi.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: akpm@linux-foundation.org Cc: rja@sgi.com Link: http://lkml.kernel.org/r/1474474161-265604-4-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/platform')
-rw-r--r--arch/x86/platform/uv/tlb_uv.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index 8462fd1..f6bc43b 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -1790,10 +1790,7 @@ static void pq_init(int node, int pnode)
size_t plsize;
char *cp;
void *vp;
- unsigned long pn;
- unsigned long first;
- unsigned long pn_first;
- unsigned long last;
+ unsigned long gnode, first, last, tail;
struct bau_pq_entry *pqp;
struct bau_control *bcp;
@@ -1814,16 +1811,16 @@ static void pq_init(int node, int pnode)
bcp->bau_msg_head = pqp;
bcp->queue_last = pqp + (DEST_Q_SIZE - 1);
}
- /*
- * need the gnode of where the memory was really allocated
- */
- pn = uv_gpa_to_gnode(uv_gpa(pqp));
+
first = uv_physnodeaddr(pqp);
- pn_first = ((unsigned long)pn << UV_PAYLOADQ_PNODE_SHIFT) | first;
last = uv_physnodeaddr(pqp + (DEST_Q_SIZE - 1));
- write_mmr_payload_first(pnode, pn_first);
- write_mmr_payload_tail(pnode, first);
+ 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);
/* in effect, all msg_type's are set to MSG_NOOP */
OpenPOWER on IntegriCloud