Commit 60e1c842 authored by Andrew Banman's avatar Andrew Banman Committed by Ingo Molnar

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: default avatarAndrew Banman <abanman@sgi.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarMike Travis <travis@sgi.com>
Acked-by: default avatarDimitri Sivanich <sivanich@sgi.com>
Acked-by: default avatarThomas 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.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent d2a57afa
......@@ -55,8 +55,6 @@
#define UV_BAU_TUNABLES_DIR "sgi_uv"
#define UV_BAU_TUNABLES_FILE "bau_tunables"
#define WHITESPACE " \t\n"
#define uv_mmask ((1UL << uv_hub_info->m_val) - 1)
#define uv_physnodeaddr(x) ((__pa((unsigned long)(x)) & uv_mmask))
#define cpubit_isset(cpu, bau_local_cpumask) \
test_bit((cpu), (bau_local_cpumask).bits)
......
......@@ -1812,8 +1812,8 @@ static void pq_init(int node, int pnode)
bcp->queue_last = pqp + (DEST_Q_SIZE - 1);
}
first = uv_physnodeaddr(pqp);
last = uv_physnodeaddr(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)));
tail = first;
gnode = uv_gpa_to_gnode(uv_gpa(pqp));
first = (gnode << UV_PAYLOADQ_GNODE_SHIFT) | tail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment