public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Don Zickus <dzickus@redhat.com>
Cc: x86@kernel.org, Andi Kleen <andi@firstfloor.org>,
	Robert Richter <robert.richter@amd.com>,
	Peter Zijlstra <peterz@infradead.org>,
	ying.huang@intel.com, LKML <linux-kernel@vger.kernel.org>,
	paulmck@linux.vnet.ibm.com,
	Jason Wessel <jason.wessel@windriver.com>,
	Andi Kleen <ak@linux.intel.com>, Jack Steiner <steiner@sgi.com>
Subject: Re: [V3][PATCH 3/6] x86, nmi: wire up NMI handlers to new routines
Date: Tue, 06 Sep 2011 12:59:51 -0500	[thread overview]
Message-ID: <4E665F97.9040701@acm.org> (raw)
In-Reply-To: <20110906174938.GP6838@redhat.com>

On 09/06/2011 12:49 PM, Don Zickus wrote:
> On Tue, Sep 06, 2011 at 12:20:19PM -0500, Corey Minyard wrote:
>>> +ipmi_nmi(unsigned int val, struct pt_regs *regs)
>>>   {
>>> -	struct die_args *args = data;
>>> -
>>> -	if (val != DIE_NMIUNKNOWN)
>>> -		return NOTIFY_OK;
>>> -
>>> -	/* Hack, if it's a memory or I/O error, ignore it. */
>>> -	if (args->err&   0xc0)
>>> -		return NOTIFY_OK;
>>> -
>>>   	/*
>>>   	 * If we get here, it's an NMI that's not a memory or I/O
>>>   	 * error.  We can't truly tell if it's from IPMI or not
>>  From the comment above, this will not actually work for the IPMI
>> watchdog.  The only way to tell if an NMI is from the IPMI
>> controller is to send a message to the IPMI controller and wait for
>> the response.  Not an option in an NMI handler.  So the IPMI
>> watchdog driver relied on it being last, and if nothing else handled
>> the NMI, then it must have been from the IPMI controller.
>>
>> This is stupid, I know, but that's the way it works in IPMI.  If we
>> decide to do what you are suggesting we will have to disable this
>> function in the IPMI watchdog driver or we need some way to say "if
>> nothing else handled the NMI, call this."
> Hi Corey,
>
> Thanks for the review.
>
> I know and you aren't the only driver that has an issue like this, hpwdt
> is in the same boat.  This is why I registered the driver against
> NMI_UNKNOWN instead of NMI_LOCAL.  The ipmi driver should only be called
> when no one else claims the NMI (including a possible external one).
>
> The only drivers I know that have to do it this way are hpwdt, sgi and
> ipmi.  By design, none of those drivers should be loaded at the same time
> (as they are all uniquely hardware specific).
>
> BTW, this is also why I removed the 'Hack, if it's a memory or I/O error',
> because the ipmi handler should not be called for an external NMI now.
>
> I hope that clears things up.
Ok, that should work.  I didn't read through the whole set of patches 
and I missed that.  This is good for me.  Thanks.

-corey

  reply	other threads:[~2011-09-06 19:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-25 16:45 [V3][PATCH 0/6] x86, nmi: new NMI handling routines Don Zickus
2011-08-25 16:45 ` [V3][PATCH 1/6] x86, nmi: split out nmi from traps.c Don Zickus
2011-08-25 16:45 ` [V3][PATCH 2/6] x86, nmi: create new NMI handler routines Don Zickus
2011-08-26  9:44   ` Peter Zijlstra
2011-08-26 14:21     ` Don Zickus
2011-09-06 10:08   ` Robert Richter
2011-09-06 16:53     ` Don Zickus
2011-08-25 16:45 ` [V3][PATCH 3/6] x86, nmi: wire up NMI handlers to new routines Don Zickus
2011-09-06 16:15   ` Robert Richter
2011-09-06 16:52     ` Don Zickus
2011-09-07  9:03       ` Borislav Petkov
2011-09-06 17:20   ` Corey Minyard
2011-09-06 17:49     ` Don Zickus
2011-09-06 17:59       ` Corey Minyard [this message]
2011-08-25 16:45 ` [V3][PATCH 4/6] x86, nmi: add in logic to handle multiple events and unknown NMIs Don Zickus
2011-09-06 16:18   ` Robert Richter
2011-08-25 16:45 ` [V3][PATCH 5/6] x86, nmi: track NMI usage stats Don Zickus
2011-08-25 16:45 ` [V3][PATCH 6/6] x86, nmi: print out NMI stats in /proc/interrupts Don Zickus
2011-09-06 16:39   ` Robert Richter
2011-09-06 17:40     ` Don Zickus
2011-08-26  9:44 ` [V3][PATCH 0/6] x86, nmi: new NMI handling routines Peter Zijlstra
2011-08-26 14:39   ` Don Zickus
2011-08-26 14:51     ` Peter Zijlstra
2011-09-06 16:43 ` Robert Richter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E665F97.9040701@acm.org \
    --to=minyard@acm.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=dzickus@redhat.com \
    --cc=jason.wessel@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=robert.richter@amd.com \
    --cc=steiner@sgi.com \
    --cc=x86@kernel.org \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox