From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757270AbcIVKdF (ORCPT ); Thu, 22 Sep 2016 06:33:05 -0400 Received: from terminus.zytor.com ([198.137.202.10]:51960 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752106AbcIVKdC (ORCPT ); Thu, 22 Sep 2016 06:33:02 -0400 Date: Thu, 22 Sep 2016 03:32:29 -0700 From: tip-bot for Andrew Banman Message-ID: Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, abanman@sgi.com, sivanich@sgi.com, hpa@zytor.com, mingo@kernel.org, travis@sgi.com, torvalds@linux-foundation.org Reply-To: hpa@zytor.com, mingo@kernel.org, travis@sgi.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, sivanich@sgi.com, peterz@infradead.org, abanman@sgi.com In-Reply-To: <1474474161-265604-10-git-send-email-abanman@sgi.com> References: <1474474161-265604-10-git-send-email-abanman@sgi.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/platform] x86/platform/uv/BAU: Fix payload queue setup on UV4 hardware Git-Commit-ID: 6d78059bbc0ace5461938aaea8cda95eb6719898 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: 6d78059bbc0ace5461938aaea8cda95eb6719898 Gitweb: http://git.kernel.org/tip/6d78059bbc0ace5461938aaea8cda95eb6719898 Author: Andrew Banman AuthorDate: Wed, 21 Sep 2016 11:09:20 -0500 Committer: Ingo Molnar CommitDate: Thu, 22 Sep 2016 11:16:15 +0200 x86/platform/uv/BAU: Fix payload queue setup on UV4 hardware The BAU on UV4 does not need to maintain the payload queue tail pointer. Do not initialize the tail pointer MMR on UV4. Note that write_payload_tail is not an abstracted BAU function since it is an operation specific to pre-UV4 versions. Then we must switch on the UV version to control its usage, for which we use uvhub_version rather than is_uv*_hub because it is quicker/more concise. 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-10-git-send-email-abanman@sgi.com Signed-off-by: Ingo Molnar --- arch/x86/platform/uv/tlb_uv.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index 72a5de7..7ca0e5c 100644 --- a/arch/x86/platform/uv/tlb_uv.c +++ b/arch/x86/platform/uv/tlb_uv.c @@ -1826,11 +1826,19 @@ static void pq_init(int node, int pnode) first = ops.bau_gpa_to_offset(uv_gpa(pqp)); last = ops.bau_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; - write_mmr_payload_tail(pnode, tail); + /* + * Pre UV4, the gnode is required to locate the payload queue + * and the payload queue tail must be maintained by the kernel. + */ + bcp = &per_cpu(bau_control, smp_processor_id()); + if (bcp->uvhub_version <= 3) { + tail = first; + gnode = uv_gpa_to_gnode(uv_gpa(pqp)); + first = (gnode << UV_PAYLOADQ_GNODE_SHIFT) | tail; + write_mmr_payload_tail(pnode, tail); + } + ops.write_payload_first(pnode, first); ops.write_payload_last(pnode, last); ops.write_g_sw_ack(pnode, 0xffffUL);