Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2715362imm; Sun, 3 Jun 2018 09:52:39 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLni80XpVHwOyspqQ9HYiBMLwtYXyXGJ+rPBsfebcK4wvcPqdeTX67zV5wVHAxMEqx6T1Kf X-Received: by 2002:a62:5911:: with SMTP id n17-v6mr5111313pfb.162.1528044759778; Sun, 03 Jun 2018 09:52:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528044759; cv=none; d=google.com; s=arc-20160816; b=CqAQZgZY6RjqK+0N6HebeHieheHxhlES+ueyjn4RXDXTsjmi/BEkDAzbHaV8M3Amm+ fyBBIK1ns9v2VkZxFMZ0SLNilj0jtAXZjlNUuputQ+1772EMS5ae4jJkpE6AbEiZH8dp OHdvai8tFFNJMpw7l4wSxtaD8tYeP7WFO2n8pPiKCdy9ZadNwCKxksEsVC5dIo//Tr6p 3bXFHYeUVRtfCkt5UpjUbU4a4c38K+TvrNDOjiVt1mq8g1TxXcGeryqj+O7QzKndoIzo /UZomEVxl610k770k9GNYbxrb0IbgW+7LfNgHk8Oibv4LS+FVdzYmoH9kEuhkLJ8c66K +mmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Qi4dtuRQGEeih5ntKeLE/uae6xcsQZQti6avcVA37Rg=; b=kU78+xQzQAb9l1nOukofsC7ky6VywRvpIV3XjHQ2MxQ5/T1g3X9lsQGNW1794DvsQZ WKnOv/s4hrtQYDjOxEpIn//eICJkgGLoD8zqR8u6UnGSDYOMMZuHBE9av9K0l4/1/oIW bgQA++PrUZ9gQMsllEdiMUtfr0YkBGDZISbRoAA4j/rQMtmDtIOtbFBBK06c0C42AtLi FirSkbcEz++CBiYZHZmoFISUQfBF/sqwl6zDjZDXIPMFtr9eK7G3B9xHyixWN24uPVkR Du0Wea+2AqBEq4DqJB/RUg/Kjw3WzKVLOof42emKz6BdGpj7rkG5+pnKm0YAYVxHyTkH rdsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b190-v6si35871181pgc.18.2018.06.03.09.52.11; Sun, 03 Jun 2018 09:52:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751232AbeFCQve (ORCPT + 99 others); Sun, 3 Jun 2018 12:51:34 -0400 Received: from relay2.sgi.com ([192.48.180.65]:33330 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750952AbeFCQvc (ORCPT ); Sun, 3 Jun 2018 12:51:32 -0400 X-Greylist: delayed 530 seconds by postgrey-1.27 at vger.kernel.org; Sun, 03 Jun 2018 12:51:32 EDT Received: from stormcage.americas.sgi.com (stormcage.americas.sgi.com [128.162.236.70]) by relay2.corp.sgi.com (Postfix) with ESMTP id 0BAB5304070; Sun, 3 Jun 2018 09:42:38 -0700 (PDT) Received: by stormcage.americas.sgi.com (Postfix, from userid 200151) id D2D02200FAC64; Sun, 3 Jun 2018 11:42:38 -0500 (CDT) From: Andrew Banman To: Thomas Gleixner Cc: Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Mike Travis , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Russ Anderson , Dimitri Sivanich , Andrew Banman Subject: [PATCH] x86/platform/uv/BAU: gracefully disable BAU during panic Date: Sun, 3 Jun 2018 11:42:32 -0500 Message-Id: <1528044152-148686-1-git-send-email-abanman@hpe.com> X-Mailer: git-send-email 1.8.2.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When panic happens while BAU is active there is a chance that outstanding broadcasts tie up BAU resources enough to cause timeouts in the UV ASIC. These timeouts are hardware errors that immediately bring down the system, preventing kdump from completing. Add uv_bau_crash_shutdown() to bring BAU to quiescence during panic before continuing with the native crash shutdown. Assign uv_bau_crash_shutdown to machine_ops during init. Signed-off-by: Andrew Banman --- arch/x86/platform/uv/tlb_uv.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index b36caae..e7f9aea 100644 --- a/arch/x86/platform/uv/tlb_uv.c +++ b/arch/x86/platform/uv/tlb_uv.c @@ -22,6 +22,7 @@ #include #include #include +#include static struct bau_operations ops __ro_after_init; @@ -2197,6 +2198,32 @@ static int __init init_per_cpu(int nuvhubs, int base_part_pnode) .wait_completion = uv4_wait_completion, }; +#ifdef CONFIG_KEXEC_CORE +/* + * Bring BAU to quiesence by disabling future broadcasts and abandoning + * current broadcasts during panic. + */ +void uv_bau_crash_shutdown(struct pt_regs *regs) +{ + set_bau_off(); + nobau_perm = 1; + + for_each_possible_blade(uvhub) { + if (!uv_blade_nr_possible_cpus(uvhub)) + continue; + int pnode = uv_blade_to_pnode(uvhub); + /* Set STATUS registers to idle to free source cpus */ + write_gmmr(pnode, UVH_LB_BAU_SB_ACTIVATION_STATUS_0, 0x0); + write_gmmr(pnode, UVH_LB_BAU_SB_ACTIVATION_STATUS_1, 0x0); + write_gmmr(pnode, UVH_LB_BAU_SB_ACTIVATION_STATUS_2, 0x0); + /* Clear TIMEOUT and PENDING bits to free up BAU resources */ + ops.write_g_sw_ack(pnode, ops.read_g_sw_ack(pnode) & 0xFFFF); + } + + native_machine_crash_shutdown(regs); +} +#endif + /* * Initialization of BAU-related structures */ @@ -2269,6 +2296,10 @@ static int __init uv_bau_init(void) } } +#ifdef CONFIG_KEXEC_CORE + machine_ops.crash_shutdown = uv_bau_crash_shutdown; +#endif + return 0; err_bau_disable: -- 1.8.2.1