x86/platform/uv/BAU: Convert uv_physnodeaddr() use to uv_gpa_to_offset()
authorAndrew Banman <abanman@sgi.com>
Wed, 21 Sep 2016 16:09:15 +0000 (11:09 -0500)
committerIngo Molnar <mingo@kernel.org>
Thu, 22 Sep 2016 09:16:13 +0000 (11:16 +0200)
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>
arch/x86/include/asm/uv/uv_bau.h
arch/x86/platform/uv/tlb_uv.c

index cc058c6b1fc40d02f8a36a2dce125d74f1fb414f..a46f270e278919e15c5f959c29be12d497d54f08 100644 (file)
@@ -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)
 
index f6bc43b7e2a09f146f145e2ee9dcd188eb0b4b15..34b2a48143d5296f271b059fdb4844cbad86c242 100644 (file)
@@ -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;