linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	ppc-dev <linuxppc-dev@lists.ozlabs.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: linux-next: OOPS at bot time
Date: Fri, 23 Jul 2010 12:05:40 +1000	[thread overview]
Message-ID: <1279850740.6381.19.camel@concordia> (raw)
In-Reply-To: <1279847985.4883.391.camel@localhost>

[-- Attachment #1: Type: text/plain, Size: 2133 bytes --]

On Fri, 2010-07-23 at 02:19 +0100, Ben Hutchings wrote:
> On Fri, 2010-07-23 at 10:22 +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > My Power7 boot test paniced like this: (next-20100722)
> > 
> > %GQLogic Fibre Channel HBA Driver: 8.03.03-k0
> > qla2xxx 0002:01:00.2: enabling device (0144 -> 0146)
> > qla2xxx 0002:01:00.2: Found an ISP8001, irq 35, iobase 0xd000080080014000
> > ------------[ cut here ]------------
> > kernel BUG at drivers/pci/msi.c:205!
> [...]
> > Call Trace:
> > [c00000000278b270] [c000000000048d9c] .rtas_setup_msi_irqs+0x1d8/0x254 (unreliable)
> > [c00000000278b360] [c00000000002a9cc] .arch_setup_msi_irqs+0x34/0x4c
> > [c00000000278b3e0] [c0000000002fd3fc] .pci_enable_msix+0x49c/0x4ac
> [...]
> > That line number is this:
> > 
> > 	BUG_ON(!(entry->msg.address_hi | entry->msg.address_lo |
> > 		 entry->msg.data));
> > 
> > in read_msi_msg_desc().  That BUG_ON was added by commit
> > 2ca1af9aa3285c6a5f103ed31ad09f7399fc65d7 ("PCI: MSI: Remove unsafe and
> > unnecessary hardware access") from the pci tree.
> 
> I wanted to assert that read_msi_msg_desc() is only used to update
> MSI/MSI-X descriptors that have already been generated by Linux.  It
> looks like you found an exception.
>
> We could make read_msi_msg() fall back to reading from the hardware, but
> I think that what the pSeries code is trying to do - save an MSI message
> generated by firmware - is different from what the other callers want.
> Instead we could add:
> 
> void save_msi_msg(unsigned int irq)
> {
> 	struct irq_desc *desc = irq_to_desc(irq);
> 	struct msi_desc *entry = get_irq_desc_msi(desc);
> 	struct msi_msg *msg = &entry->msg;
> 
> 	/* ...followed by the old implementation of read_msi_msg_desc() */
> }
> 
> Possibly conditional on something like CONFIG_ARCH_NEEDS_SAVE_MSI_MSG.

Maybe.

But then you end up with read_msi_msg(), which doesn't actually read
anything, which I think is confusing. I'd rather read_msi_msg() read the
message, from the device, and we have another routine which returns the
previously saved msg from the msi_desc.

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2010-07-23  2:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-23  0:22 linux-next: OOPS at bot time Stephen Rothwell
2010-07-23  1:19 ` Ben Hutchings
2010-07-23  2:05   ` Michael Ellerman [this message]
2010-07-23 13:56     ` [PATCH] PCI: MSI: Restore read_msi_msg_desc(); add get_cached_msi_msg_desc() Ben Hutchings
2010-07-26 11:20       ` Michael Ellerman
2010-07-30 16:42       ` Jesse Barnes
2010-08-01  6:23         ` Michael Ellerman
2012-11-20  7:20       ` Benjamin Herrenschmidt
2012-11-20 12:36         ` Ben Hutchings

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=1279850740.6381.19.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=bhutchings@solarflare.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).