Received: by 10.223.185.116 with SMTP id b49csp514969wrg; Wed, 14 Feb 2018 02:42:03 -0800 (PST) X-Google-Smtp-Source: AH8x226UrbyU4QsVzv6McHV7So/oLOTUTlqV0BZNpJhQ4YCZqizCmPGDYkdB73l+oHLv4BALm02d X-Received: by 10.99.188.2 with SMTP id q2mr3635893pge.101.1518604923415; Wed, 14 Feb 2018 02:42:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518604923; cv=none; d=google.com; s=arc-20160816; b=v72/xsMvqgoaO4lTyNDArI+/7iSQCUOj6OHWdwjAJAVNJ4FsMwTMZZAgQht8CVkyme amn9chAu+c2BslO/fq0b/gmS5DO0Nw8bJnn+WUWYtA/ex6tX37k5UDSK6TaPUBYu3/rv XEkpD6CkjMjNb8vPhTKejFt6WakVj8ck6F0TzytrLoN9bEV1NXxglHer47mTYT8Vq8ZJ IIRe6+HdaMDVq1kFQOiNb1xRawG6doaIFuKZmHlDc4e70AhPb3xj2XE7i+fTDV7dsVc0 DID9VMRjRcK6uosXseHL2bDnHz7aqT+721vuIDdaMK1hwQzc0r6ZCHpv3LpBxcrmErZC HIiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=jPCHZRkCMR3KWRCQNY3i+Stz22VNgCgUQvAKPOZ0PLM=; b=0E9Vo3oXXv6ZIhsWrIYLPJjJltqVJ2UwhVRyOW3GTruGH+zBWymnNSKb1hg4DHwmXE PooteTGxVFIBK8vWUPsGjImolbFRB5Lja7GTmTwiEaEUREVJaA4FRSUrGWNX2jtic5+9 pMJ2sfPix7187iC3t2Wg0YI7mMUvGkxaX0fFbi9xya7VY+tKqvPGOLhXjmiLc0C8gzG4 sE55yYn8KgDilpDGYr8H/upmngby7NWfOFlzUogbOpjHkHcFW/YFf3tvIRLVIQGOcFKg w1Mgwc5yKM78TEWfqr+1DE2kR2+uKgfHOrrtbxrQk8mGX0NAgDNz47Zrra+BJ+0FGyp2 6yuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=sMWX7XSt; 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 j11si2440045pgs.614.2018.02.14.02.41.48; Wed, 14 Feb 2018 02:42:03 -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=fail header.i=@gmail.com header.s=20161025 header.b=sMWX7XSt; 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 S967249AbeBNKjY (ORCPT + 99 others); Wed, 14 Feb 2018 05:39:24 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:55333 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967089AbeBNKjW (ORCPT ); Wed, 14 Feb 2018 05:39:22 -0500 Received: by mail-wm0-f68.google.com with SMTP id a84so10353037wmi.5; Wed, 14 Feb 2018 02:39:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jPCHZRkCMR3KWRCQNY3i+Stz22VNgCgUQvAKPOZ0PLM=; b=sMWX7XStdpZX/fu+Rqw+PVAfBugxsyNtkBAX2xiuJwm6sgRRWWYw40jZaRHoIKc+sK mTSKiNLU0lJi8873Zng0zg9ldpi4rYUQTXGsp2XlRx1e9wGVBvG+Cbr3/j5h2Sc7/C9b /gxohKlrc394OlYcYFJDcTQxTuRBey97k1K/Aa2sVtW3y28+2st7Bld8Jil6cBpa7Nly 8iknqx4/eLiG/6TrRUDwhNxwuZk98LB1DwtTkutoVxYL4l6eiWTL9+lh49iErmqvFZj5 Rac+bgat3A/Z9PrwxFTgLuYxjqvwpziESDAId6WUYmnK6Q1BHITSD2GQOd0OT3S0fHzU eowA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=jPCHZRkCMR3KWRCQNY3i+Stz22VNgCgUQvAKPOZ0PLM=; b=CBfzpqGNHnpFDVml47kYTt29fcBaBHSl/kEi97pFstT1BFc4UWxv4DkvcG9jEi522j UiSv8FNYqg06YN9hTvodJTih6dwqVeMvKajSwRnJCTFQZQSZGTD9mAf80tHK2aoCD3sG 2z9RJPVI3X8CoztMYtk45kJXaCGhcYtFM98XkEmJDiUog/zfMew5fh7SBcvbKEuOwvZl JhTTkFdOVl3hIec6mcOsvdq0qVd9nJ1ErzLrPSrulThvYPYGdYnfhhrku1d9QBfmagHh e9FPpjQoWmUR3YLWH76TmJ1y6QfJc2j98kCvwjKntBC8wgKa3pCfTkrtNpd8z14ilhSo Pgcg== X-Gm-Message-State: APf1xPDQzvHxZjqJKLHSUswY5Qz45G+bwZYgPxhpoKD6CIm53QBq6A9E D4KRDLQ1hkEhyS13e6dADH0= X-Received: by 10.28.136.19 with SMTP id k19mr4114140wmd.111.1518604761292; Wed, 14 Feb 2018 02:39:21 -0800 (PST) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id v63sm86906wrc.69.2018.02.14.02.39.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Feb 2018 02:39:20 -0800 (PST) Date: Wed, 14 Feb 2018 11:39:18 +0100 From: Ingo Molnar To: Peter Zijlstra Cc: Tim Chen , Dave Hansen , hpa@zytor.com, tglx@linutronix.de, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, dwmw@amazon.co.uk, linux-tip-commits@vger.kernel.org, Borislav Petkov , Arjan van de Ven Subject: Re: [PATCH] watchdog: hpwdt: Remove spinlock acquire and BIOS calls from NMI context Message-ID: <20180214103918.shra2d5vg5gczjy3@gmail.com> References: <1518362359-1005-1-git-send-email-dwmw@amazon.co.uk> <20180212102211.cdrrqqd4hdw7xu5y@gmail.com> <20180212165835.GO25181@hirez.programming.kicks-ass.net> <20180213075540.3lkikkpgjoe6ocjk@gmail.com> <5c3ba123-abbe-f153-7b75-a89d31d25c72@linux.intel.com> <20180214093159.mdzfupne547bi5qx@gmail.com> <20180214093835.GW25181@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180214093835.GW25181@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Peter Zijlstra wrote: > On Wed, Feb 14, 2018 at 10:31:59AM +0100, Ingo Molnar wrote: > > Because in this particular case it does not appear to be so: the reason for the > > BIOS/firmware call appears to be to determine how we nmi_panic() after receiving > > an NMI that no other NMI handler handled: with a passive-aggressive "I don't know" > > panic message or with a slightly more informative panic message. > > However much I like just ripping all that out, I think the ROM call > actually does that logging, or that is how I read things. > > If you look at the original Changelog for that driver: > > Hp is providing a Hardware WatchDog Timer driver that will only work with the > specific HW Timer located in the HP ProLiant iLO 2 ASIC. The iLO 2 HW Timer > will generate a Non-maskable Interrupt (NMI) 9 seconds before physically > resetting the server, by removing power, so that the event can be logged to > the HP Integrated Management Log (IML), a Non-Volatile Random Access Memory > (NVRAM). The logging of the event is performed using the HP ProLiant ROM via > an Industry Standard access known as a BIOS Service Directory Entry. Ok, that appears to be the case, too bad. But the good news: if this callback is executed only once per system lifetime then we don't actually have to perform *any* modification on this driver, right? The reason is that this callback will panic unconditionally after performing the BIOS call. The control flow to the panic is unconditional: spin_lock_irqsave(&rom_lock, rom_pl); if (!die_nmi_called && !is_icru && !is_uefi) asminline_call(&cmn_regs, cru_rom_addr); ... if (!is_icru && !is_uefi) { if (cmn_regs.u1.ral == 0) { nmi_panic(regs, "An NMI occurred, but unable to determine source.\n"); ... nmi_panic(regs, "An NMI occurred. Depending on your system the reason " "for the NMI is logged in any one of the following " "resources:\n" "1. Integrated Management Log (IML)\n" "2. OA Syslog\n" "3. OA Forward Progress Log\n" "4. iLO Event Log"); This callback does not get executed when we get perf NMIs, correct? Ingo