Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3100680imu; Sun, 13 Jan 2019 18:38:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN43YMYcJZIQd52gbpUWXhsC1KYIPhG3r67qCQot5OpB+b4t29ofgIMJBUCA3yT2XfTwDGxG X-Received: by 2002:a65:62da:: with SMTP id m26mr21476059pgv.278.1547433511780; Sun, 13 Jan 2019 18:38:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547433511; cv=none; d=google.com; s=arc-20160816; b=cf9Ed57v4ATR/ehhGJoQxp9R1+5AChdz6Kjrl4YHoBfv6efPOvflDYMOFYZzWHQVIU JlDd0y+f+wxhul2DxjBXaSOpL3+ac9Pgu/y+DLD40XNmhcjQGihPUCXFAAdiznRz9vLA rK5H8ADXociXoKu4dqa8049dd3u8sqQTRbrSPdWqaNQsa7awwSqzrQFHWKc741hwZWZG ZAMA8hMvgkQp0L8fmHzfKT2co98diYgNEsaUvV0+3qJIJbedYER8CzyDNZqNJhoSBv6c +z1rRX63WCCyUM9/TotwW4SOzQHduIlXwBb62VaJQkPMJRdjxaqNjQcClZSujLB4BfIr Mtrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Opr3NrUjHsdMnnvPUkP3p8C3slPySw65l2P6gBVK14A=; b=sNi+/OashFVYfQMcTQMkHkjNLTcBu3dQPVoHBsXZcMIwK5LNkHH2p24yzLONp49GLl tK3H+SCDr8MceASBxqPToGXF0a0c8f25Dhvri6Up2XNtvD84TKq17rajV/ogxbF2tZc9 6T1VVBNH0+FgprrGCkZ13lzP7E7l+tB9GPPqmjDjCugUb04pK8fWk4EzFRYTk4xzW2B8 hMcSEMOzKd625nYRdXSUouVoODwf9WsyA4sFh0CPo2vZ7RH0r6CNic36hCPTedxtB+yU /co5zJ6U7mf7QX8FQTtwzNT5pKQtb+i9rmzZDtYfpofhbE1fM/H7nu9/phS5EPmsMWTh wGEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KUcgF9gO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p185si40946727pfg.112.2019.01.13.18.38.16; Sun, 13 Jan 2019 18:38:31 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KUcgF9gO; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726795AbfANCgw (ORCPT + 99 others); Sun, 13 Jan 2019 21:36:52 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:40706 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726631AbfANCgh (ORCPT ); Sun, 13 Jan 2019 21:36:37 -0500 Received: by mail-lf1-f68.google.com with SMTP id v5so14517233lfe.7; Sun, 13 Jan 2019 18:36:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Opr3NrUjHsdMnnvPUkP3p8C3slPySw65l2P6gBVK14A=; b=KUcgF9gOacUtg0z2RsOIcf5psNNCJ+F8079/2+r98J5KOcR04FRcZ0ljHyqH7XBidb fKslQXOlkrciBbgMerFgi05CLYzdEQnxfACqf3mwUZW9g+Ucc2KQlgpS9K+O+AAL7tyZ 3Wfs/a0F5BCXpHONuUpwW2WcQ2DR7VITwwso09DJWUAevoQoEXnscJHIzCFDMgpjJxvM g7qQDZR+WmphRYH2cQRaDUr1E5zFitJRXsSU63UcXGoi2oFEDF4h/tofLi22nktoTxGs /SqmNTlbiN5hY4uGVXFjSzw027agZsWPaaUx54+zhgc0oRMbrx5RY2ZAt4HB9j+86RmK XTKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Opr3NrUjHsdMnnvPUkP3p8C3slPySw65l2P6gBVK14A=; b=etd8jzoPrOoChRVvrleO2fsHKhl00UqPcGq/H7ldY1XZ1FTn+oYj/klSNf9jW3M7JE 7sWODCxynk1b2T80C9qObbYMCigy/xQiQkQOfgrYwftcUamvl1qedjZzn9dnOYnB0FFc KqlTbGixUBg0dCJz/Qki13fUYyL62t1yggOM6r/QR6NSHAgr267FMl2OqgKtn+TzcGlN SCfr7MLuHr0xEHV74Q8pRDuNl2XElUCUJIde9XuoNpeECXxJ9ozsIJDZrYVi7W6wbDHS lLVyACVjBcnm5CnUg7DUP4f1jwKPxhDbrzzDym3kQ2clv/eecmotd6dq54cBsez4Jm/C NVjA== X-Gm-Message-State: AJcUukcDGcwX9Y4Y/p7GiBmcaryvGn6F6Mt/WC97OW45OSCSuUPzyxP/ /RJQtTgz1XsCGB1kWz2qYM7kyh6sY/Ev/A== X-Received: by 2002:a19:ec16:: with SMTP id b22mr6025427lfa.65.1547433394797; Sun, 13 Jan 2019 18:36:34 -0800 (PST) Received: from localhost.localdomain (pool-109-191-228-208.is74.ru. [109.191.228.208]) by smtp.gmail.com with ESMTPSA id m4-v6sm16876897ljb.58.2019.01.13.18.36.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 13 Jan 2019 18:36:34 -0800 (PST) From: Ivan Mironov To: linux-watchdog@vger.kernel.org, mironov.ivan@gmail.com Cc: linux-kernel@vger.kernel.org, Jerry Hoemann , Wim Van Sebroeck , Guenter Roeck Subject: [RFC PATCH 2/4] watchdog: hpwdt: Don't panic on foreign NMI Date: Mon, 14 Jan 2019 07:36:15 +0500 Message-Id: <20190114023617.10656-3-mironov.ivan@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190114023617.10656-1-mironov.ivan@gmail.com> References: <20190114023617.10656-1-mironov.ivan@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, hpwdt unconditionally panics on foreign NMIs in some cases. This goes against the default kernel behaviour (which is configured by unknown_nmi_panic and panic_on_unrecovered_nmi). With this patch, hpwdt will simply ignore NMI unless one of "mynmi" flags is set by iLO. Signed-off-by: Ivan Mironov --- drivers/watchdog/hpwdt.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 2467e6bc25c2..e2958df46c69 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c @@ -33,7 +33,6 @@ #define DEFAULT_MARGIN 30 #define PRETIMEOUT_SEC 9 -static bool ilo5; static unsigned int soft_margin = DEFAULT_MARGIN; /* in seconds */ static bool nowayout = WATCHDOG_NOWAYOUT; static bool pretimeout = IS_ENABLED(CONFIG_HPWDT_NMI_DECODING); @@ -164,10 +163,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs) "3. OA Forward Progress Log\n" "4. iLO Event Log"; - if (ilo5 && ulReason == NMI_UNKNOWN && !mynmi) - return NMI_DONE; - - if (ilo5 && !pretimeout && !mynmi) + if (!mynmi) return NMI_DONE; hex_byte_pack(panic_msg, mynmi); @@ -332,9 +328,6 @@ static int hpwdt_init_one(struct pci_dev *dev, dev_info(&dev->dev, "pretimeout: %s.\n", pretimeout ? "on" : "off"); - if (dev->subsystem_vendor == PCI_VENDOR_ID_HP_3PAR) - ilo5 = true; - return 0; error_wd_register: -- 2.20.1