aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Banman <abanman@sgi.com>2016-09-21 12:09:15 -0400
committerIngo Molnar <mingo@kernel.org>2016-09-22 05:16:13 -0400
commit60e1c842c7ea3dd6a65660864554565cc737dd86 (patch)
tree5a2a054c4741f696237b09c04f642b930c0c5689
parentd2a57afa53f3fdf9f68d1f4240ace85a7d20ca20 (diff)
x86/platform/uv/BAU: Convert uv_physnodeaddr() use to uv_gpa_to_offset()
The BAU driver should use the functions provided by uv_hub.h rather than its own implementations. uv_physnodeaddr converts vaddrs to paddrs for BAU MMR fields, but this is done better by uv_gpa_to_offset. 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-5-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.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/include/asm/uv/uv_bau.h b/arch/x86/include/asm/uv/uv_bau.h
index cc058c6b1fc4..a46f270e2789 100644
--- a/arch/x86/include/asm/uv/uv_bau.h
+++ b/arch/x86/include/asm/uv/uv_bau.h
@@ -55,8 +55,6 @@
55#define UV_BAU_TUNABLES_DIR "sgi_uv" 55#define UV_BAU_TUNABLES_DIR "sgi_uv"
56#define UV_BAU_TUNABLES_FILE "bau_tunables" 56#define UV_BAU_TUNABLES_FILE "bau_tunables"
57#define WHITESPACE " \t\n" 57#define WHITESPACE " \t\n"
58#define uv_mmask ((1UL << uv_hub_info->m_val) - 1)
59#define uv_physnodeaddr(x) ((__pa((unsigned long)(x)) & uv_mmask))
60#define cpubit_isset(cpu, bau_local_cpumask) \ 58#define cpubit_isset(cpu, bau_local_cpumask) \
61 test_bit((cpu), (bau_local_cpumask).bits) 59 test_bit((cpu), (bau_local_cpumask).bits)
62 60
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index f6bc43b7e2a0..34b2a48143d5 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -1812,8 +1812,8 @@ static void pq_init(int node, int pnode)
1812 bcp->queue_last = pqp + (DEST_Q_SIZE - 1); 1812 bcp->queue_last = pqp + (DEST_Q_SIZE - 1);
1813 } 1813 }
1814 1814
1815 first = uv_physnodeaddr(pqp); 1815 first = uv_gpa_to_offset(uv_gpa(pqp));
1816 last = uv_physnodeaddr(pqp + (DEST_Q_SIZE - 1)); 1816 last = uv_gpa_to_offset(uv_gpa(pqp + (DEST_Q_SIZE - 1)));
1817 tail = first; 1817 tail = first;
1818 gnode = uv_gpa_to_gnode(uv_gpa(pqp)); 1818 gnode = uv_gpa_to_gnode(uv_gpa(pqp));
1819 first = (gnode << UV_PAYLOADQ_GNODE_SHIFT) | tail; 1819 first = (gnode << UV_PAYLOADQ_GNODE_SHIFT) | tail;