From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757185AbcIVKc2 (ORCPT ); Thu, 22 Sep 2016 06:32:28 -0400 Received: from terminus.zytor.com ([198.137.202.10]:51902 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757146AbcIVKcY (ORCPT ); Thu, 22 Sep 2016 06:32:24 -0400 Date: Thu, 22 Sep 2016 03:30:06 -0700 From: tip-bot for Andrew Banman Message-ID: Cc: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, abanman@sgi.com, travis@sgi.com, tglx@linutronix.de, sivanich@sgi.com, hpa@zytor.com Reply-To: peterz@infradead.org, linux-kernel@vger.kernel.org, mingo@kernel.org, torvalds@linux-foundation.org, abanman@sgi.com, travis@sgi.com, tglx@linutronix.de, sivanich@sgi.com, hpa@zytor.com In-Reply-To: <1474474161-265604-5-git-send-email-abanman@sgi.com> References: <1474474161-265604-5-git-send-email-abanman@sgi.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/platform] x86/platform/uv/BAU: Convert uv_physnodeaddr() use to uv_gpa_to_offset() Git-Commit-ID: 60e1c842c7ea3dd6a65660864554565cc737dd86 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 60e1c842c7ea3dd6a65660864554565cc737dd86 Gitweb: http://git.kernel.org/tip/60e1c842c7ea3dd6a65660864554565cc737dd86 Author: Andrew Banman AuthorDate: Wed, 21 Sep 2016 11:09:15 -0500 Committer: Ingo Molnar CommitDate: Thu, 22 Sep 2016 11:16:13 +0200 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 Acked-by: Thomas Gleixner Acked-by: Mike Travis Acked-by: Dimitri Sivanich Acked-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra 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 --- arch/x86/include/asm/uv/uv_bau.h | 2 -- arch/x86/platform/uv/tlb_uv.c | 4 ++-- 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 cc058c6..a46f270 100644 --- a/arch/x86/include/asm/uv/uv_bau.h +++ b/arch/x86/include/asm/uv/uv_bau.h @@ -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) diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index f6bc43b..34b2a48 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) 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;