aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Banman <abanman@sgi.com>2016-09-21 12:09:14 -0400
committerIngo Molnar <mingo@kernel.org>2016-09-22 05:16:13 -0400
commitd2a57afa53f3fdf9f68d1f4240ace85a7d20ca20 (patch)
tree87c8a0576ff49f2f819a0340370065172db57498
parentefa59ab3e7526650265f0fd9696ef8be8d88ec13 (diff)
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>
-rw-r--r--arch/x86/include/asm/uv/uv_bau.h2
-rw-r--r--arch/x86/platform/uv/tlb_uv.c19
2 files changed, 9 insertions, 12 deletions
diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h
index cc44d926c17e..cc058c6b1fc4 100644
--- a/arch/x86/include/asm/uv/uv_bau.h
+++ b/arch/x86/include/asm/uv/uv_bau.h
@@ -49,7 +49,7 @@
49#define UV_NET_ENDPOINT_INTD (is_uv1_hub() ? \ 49#define UV_NET_ENDPOINT_INTD (is_uv1_hub() ? \
50 UV1_NET_ENDPOINT_INTD : UV2_NET_ENDPOINT_INTD) 50 UV1_NET_ENDPOINT_INTD : UV2_NET_ENDPOINT_INTD)
51#define UV_DESC_PSHIFT 49 51#define UV_DESC_PSHIFT 49
52#define UV_PAYLOADQ_PNODE_SHIFT 49 52#define UV_PAYLOADQ_GNODE_SHIFT 49
53#define UV_PTC_BASENAME "sgi_uv/ptc_statistics" 53#define UV_PTC_BASENAME "sgi_uv/ptc_statistics"
54#define UV_BAU_BASENAME "sgi_uv/bau_tunables" 54#define UV_BAU_BASENAME "sgi_uv/bau_tunables"
55#define UV_BAU_TUNABLES_DIR "sgi_uv" 55#define UV_BAU_TUNABLES_DIR "sgi_uv"
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index 8462fd1583ed..f6bc43b7e2a0 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)
1790 size_t plsize; 1790 size_t plsize;
1791 char *cp; 1791 char *cp;
1792 void *vp; 1792 void *vp;
1793 unsigned long pn; 1793 unsigned long gnode, first, last, tail;
1794 unsigned long first;
1795 unsigned long pn_first;
1796 unsigned long last;
1797 struct bau_pq_entry *pqp; 1794 struct bau_pq_entry *pqp;
1798 struct bau_control *bcp; 1795 struct bau_control *bcp;
1799 1796
@@ -1814,16 +1811,16 @@ static void pq_init(int node, int pnode)
1814 bcp->bau_msg_head = pqp; 1811 bcp->bau_msg_head = pqp;
1815 bcp->queue_last = pqp + (DEST_Q_SIZE - 1); 1812 bcp->queue_last = pqp + (DEST_Q_SIZE - 1);
1816 } 1813 }
1817 /* 1814
1818 * need the gnode of where the memory was really allocated
1819 */
1820 pn = uv_gpa_to_gnode(uv_gpa(pqp));
1821 first = uv_physnodeaddr(pqp); 1815 first = uv_physnodeaddr(pqp);
1822 pn_first = ((unsigned long)pn << UV_PAYLOADQ_PNODE_SHIFT) | first;
1823 last = uv_physnodeaddr(pqp + (DEST_Q_SIZE - 1)); 1816 last = uv_physnodeaddr(pqp + (DEST_Q_SIZE - 1));
1824 write_mmr_payload_first(pnode, pn_first); 1817 tail = first;
1825 write_mmr_payload_tail(pnode, first); 1818 gnode = uv_gpa_to_gnode(uv_gpa(pqp));
1819 first = (gnode << UV_PAYLOADQ_GNODE_SHIFT) | tail;
1820
1821 write_mmr_payload_first(pnode, first);
1826 write_mmr_payload_last(pnode, last); 1822 write_mmr_payload_last(pnode, last);
1823 write_mmr_payload_tail(pnode, tail);
1827 write_gmmr_sw_ack(pnode, 0xffffUL); 1824 write_gmmr_sw_ack(pnode, 0xffffUL);
1828 1825
1829 /* in effect, all msg_type's are set to MSG_NOOP */ 1826 /* in effect, all msg_type's are set to MSG_NOOP */