Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp51902pxh; Thu, 7 Apr 2022 13:42:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxF5czuiJkPnmEHiMaFy1VyNpoS5z4uIZ3aioUadduxz3b6ygNGVF1/9BiveUmpoLDpFeE4 X-Received: by 2002:a05:6a00:3018:b0:4fa:d533:45e5 with SMTP id ay24-20020a056a00301800b004fad53345e5mr15865318pfb.13.1649364139649; Thu, 07 Apr 2022 13:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649364139; cv=none; d=google.com; s=arc-20160816; b=myTETOIQAsLEdHL3HYEYkm/eTc0/YxxJeruHvhAmh28AjM75m2wpPJiOEStlOzkI95 QnCiFIWZjF5JJ8qMdF9RtGhQDkmm99+odJgOy2sQLyd2M9u+n2F2aLFhvDTjBA4f/17d SClVhjBZmSxBMZTxcJqwQTFFGv3F3vlDfVd2g8ekiZD7HgjNCtFPHwHjCGGRB32E4Qtv KNWvRSbQVOgsFjn5cyNhftM3It9U8YC5QGorM7CQHi0VddRJMtVL29xMDX7wpG+5p4nl 5ZRcbVpGKZoKpTvw2QSJ7+KefKtmEAtwHAsN2Qj+i38pwU6rJsLIsBO+IQEXy1EH38PF viQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=mSV1Y0A1YFqBZyGZ5+k6dqhl1M9bVriVuqUTvC59O9s=; b=SaulRidLH/iEEMrLd2RTU4xPhwI+3ibnx8ihJ7ryI8pamDAF1zbWmQqTwbt50P6EKk PvopozEoMcutIFT154bV/QNF6thVxwvzqdnjfkAcg9Dh9seoxZEhZrNfeBDZYE4vPbLN TZSMADjQpRQzGeBQHogKiPWRW/haLAuqgzwdRtiVs6puzsQyOvldKEHFDAPFMuWltvx/ OrFmQusT9HnAoe6LN/aLPP4OmgDR4s2KjsGwaeR4UrlwPme/zTT1igjEiX6cMmMtfdee 05I2NsXFqhiS+kuZPv9989ci6hcT3yKYnJdVq4Drboc71lwOZX4ZqWgtG/Zze1r4EGDo pI/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HUBqG69M; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=lbWlV1rp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w24-20020a634758000000b003816043ef14si18621043pgk.265.2022.04.07.13.42.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 13:42:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HUBqG69M; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=lbWlV1rp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D6001277953; Thu, 7 Apr 2022 12:53:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245629AbiDGPuq (ORCPT + 99 others); Thu, 7 Apr 2022 11:50:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245209AbiDGPuh (ORCPT ); Thu, 7 Apr 2022 11:50:37 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E989C55B4; Thu, 7 Apr 2022 08:48:34 -0700 (PDT) Date: Thu, 07 Apr 2022 15:48:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1649346513; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mSV1Y0A1YFqBZyGZ5+k6dqhl1M9bVriVuqUTvC59O9s=; b=HUBqG69MDoi41D91M1gJ5qTtImY+x37B2lO1PGinJW4hinxdcw0un00ARcUVJJpKUMqWjK pHjlm3xC0p2sgskZeK8MyisRh96/7meRRZdFdayS8f/FUlO1tRdBOkmi9Ht4Jtte/xosDu zy+esjLDuHxtIqtNUw3uzVOdpEZOo0UYDf5q7mhIT/jn6K70nb3jSYNDsRFaUjs74i6Gtq eNSUGtQ3mzc35J2v9O1aqDfh8kBNQuaws3XBDh9TdQtJuY98RIgXoAmhlKOrtewNzIhCB0 iCntTHL1SbIZTH6vIsWjl+NiW/IrXS/bAZ8jadzrmK5iUbk7M3Y3+RiMJzDdag== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1649346513; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mSV1Y0A1YFqBZyGZ5+k6dqhl1M9bVriVuqUTvC59O9s=; b=lbWlV1rpOXTdno6LIjCxmr5P8DUda65y6kKUoPUacA7OM/5FK+EW1NTz84++kjxvAji9vb KXvg1GQzSsBDhrBA== From: "tip-bot2 for Mike Travis" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/platform] x86/platform/uv: Update NMI Handler for UV5 Cc: Mike Travis , Steve Wahl , Borislav Petkov , Dimitri Sivanich , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220406195149.228164-2-steve.wahl@hpe.com> References: <20220406195149.228164-2-steve.wahl@hpe.com> MIME-Version: 1.0 Message-ID: <164934651199.389.15893962455606491477.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/platform branch of tip: Commit-ID: d812f7c475c6a4dcfff02a85fbfd7a9c87e6a094 Gitweb: https://git.kernel.org/tip/d812f7c475c6a4dcfff02a85fbfd7a9c87e6a094 Author: Mike Travis AuthorDate: Wed, 06 Apr 2022 14:51:47 -05:00 Committer: Borislav Petkov CommitterDate: Thu, 07 Apr 2022 17:23:20 +02:00 x86/platform/uv: Update NMI Handler for UV5 Update NMI handler for UV5 hardware. A platform register changed, and UV5 only uses one of the two NMI methods used on previous hardware. Signed-off-by: Mike Travis Signed-off-by: Steve Wahl Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Acked-by: Thomas Gleixner Link: https://lore.kernel.org/r/20220406195149.228164-2-steve.wahl@hpe.com --- arch/x86/platform/uv/uv_nmi.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c index 1e9ff28..61ec3be 100644 --- a/arch/x86/platform/uv/uv_nmi.c +++ b/arch/x86/platform/uv/uv_nmi.c @@ -244,8 +244,10 @@ static inline bool uv_nmi_action_is(const char *action) /* Setup which NMI support is present in system */ static void uv_nmi_setup_mmrs(void) { + bool new_nmi_method_only = false; + /* First determine arch specific MMRs to handshake with BIOS */ - if (UVH_EVENT_OCCURRED0_EXTIO_INT0_MASK) { + if (UVH_EVENT_OCCURRED0_EXTIO_INT0_MASK) { /* UV2,3,4 setup */ uvh_nmi_mmrx = UVH_EVENT_OCCURRED0; uvh_nmi_mmrx_clear = UVH_EVENT_OCCURRED0_ALIAS; uvh_nmi_mmrx_shift = UVH_EVENT_OCCURRED0_EXTIO_INT0_SHFT; @@ -255,26 +257,25 @@ static void uv_nmi_setup_mmrs(void) uvh_nmi_mmrx_req = UVH_BIOS_KERNEL_MMR_ALIAS_2; uvh_nmi_mmrx_req_shift = 62; - } else if (UVH_EVENT_OCCURRED1_EXTIO_INT0_MASK) { + } else if (UVH_EVENT_OCCURRED1_EXTIO_INT0_MASK) { /* UV5+ setup */ uvh_nmi_mmrx = UVH_EVENT_OCCURRED1; uvh_nmi_mmrx_clear = UVH_EVENT_OCCURRED1_ALIAS; uvh_nmi_mmrx_shift = UVH_EVENT_OCCURRED1_EXTIO_INT0_SHFT; uvh_nmi_mmrx_type = "OCRD1-EXTIO_INT0"; - uvh_nmi_mmrx_supported = UVH_EXTIO_INT0_BROADCAST; - uvh_nmi_mmrx_req = UVH_BIOS_KERNEL_MMR_ALIAS_2; - uvh_nmi_mmrx_req_shift = 62; + new_nmi_method_only = true; /* Newer nmi always valid on UV5+ */ + uvh_nmi_mmrx_req = 0; /* no request bit to clear */ } else { - pr_err("UV:%s:cannot find EVENT_OCCURRED*_EXTIO_INT0\n", - __func__); + pr_err("UV:%s:NMI support not available on this system\n", __func__); return; } /* Then find out if new NMI is supported */ - if (likely(uv_read_local_mmr(uvh_nmi_mmrx_supported))) { - uv_write_local_mmr(uvh_nmi_mmrx_req, - 1UL << uvh_nmi_mmrx_req_shift); + if (new_nmi_method_only || uv_read_local_mmr(uvh_nmi_mmrx_supported)) { + if (uvh_nmi_mmrx_req) + uv_write_local_mmr(uvh_nmi_mmrx_req, + 1UL << uvh_nmi_mmrx_req_shift); nmi_mmr = uvh_nmi_mmrx; nmi_mmr_clear = uvh_nmi_mmrx_clear; nmi_mmr_pending = 1UL << uvh_nmi_mmrx_shift;