qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	Arnd Bergmann <arnd.bergmann@linaro.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [Qemu-devel] SCSI bus failures with qemu-arm in kernel 3.8+
Date: Mon, 12 Aug 2013 16:04:08 -0700	[thread overview]
Message-ID: <20130812230408.GA4420@roeck-us.net> (raw)
In-Reply-To: <20130812221250.GI23006@n2100.arm.linux.org.uk>

On Mon, Aug 12, 2013 at 11:12:50PM +0100, Russell King - ARM Linux wrote:
> On Mon, Aug 12, 2013 at 10:36:17PM +0100, Peter Maydell wrote:
> > On this point, yes. Equivalent bit from the PB926 TRM:
> > http://infocenter.arm.com/help/topic/com.arm.doc.dui0224i/Cacdijji.html
> > 
> > (There are differences between the PCI controllers on
> > the different boards. Differences I know of are:
> >  * size of the three memory mapped regions
> >  * whether the top bits of the PCI address come from the top
> >    or bottom of the IMAP* registers
> > I believe (based on some experimentation and an educated guess)
> > that these both changed at the same point, but some of the board
> > TRMs claim to be part one way part the other, presumably due to
> > copy and paste error. In particular PB1176's TRM has a mangled
> > description of the IMAP* registers which didn't match what the
> > h/w actually did in my testing.)
> 
> Bah, updated TRMs since my version.
> 
> Right, so if I've traced everything correctly, this should work:
> 
>         /*
>          * Slot INTA    INTB    INTC    INTD
>          *  31  PCI1    PCI2    PCI3    PCI0
>          *  30  PCI0    PCI1    PCI2    PCI3
>          *  29  PCI3    PCI0    PCI1    PCI2
>          */
>         return IRQ_SIC_PCI0 + ((slot + 2 + pin - 1) & 3);
> 
I tried the above with qemu 1.5.2. Success!

Hacked diff is below. Can I write that up as clean patch and submit it,
or do we need a test on real hardware ?

Thanks,
Guenter

---
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index e92e5e0..53b4208 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -333,7 +333,11 @@ static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 	 *  26     1     IRQ_SIC_PCI2
 	 *  27     1     IRQ_SIC_PCI3
 	 */
+#if 0
 	irq = IRQ_SIC_PCI0 + ((slot - 24 + pin - 1) & 3);
+#else
+	irq = IRQ_SIC_PCI0 + ((slot + 2 + pin - 1) & 3);
+#endif
 
 	return irq;
 }

  parent reply	other threads:[~2013-08-12 23:04 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5207B3C3.9080508@roeck-us.net>
     [not found] ` <20130811220450.GY23006@n2100.arm.linux.org.uk>
2013-08-12  0:40   ` [Qemu-devel] SCSI bus failures with qemu-arm in kernel 3.8+ Guenter Roeck
2013-08-12 16:24     ` Peter Maydell
2013-08-12 16:45       ` Russell King - ARM Linux
2013-08-12 17:33         ` Peter Maydell
2013-08-12 20:06           ` Russell King - ARM Linux
2013-08-12 20:49             ` Peter Maydell
2013-08-12 21:21               ` Russell King - ARM Linux
2013-08-12 21:36                 ` Peter Maydell
2013-08-12 22:12                   ` Russell King - ARM Linux
2013-08-12 22:48                     ` Guenter Roeck
2013-08-12 23:04                     ` Guenter Roeck [this message]
2013-08-14 10:33                       ` Russell King - ARM Linux
2013-08-14 12:44                         ` Peter Maydell
2013-08-14 12:49                           ` Russell King - ARM Linux
2013-08-14 12:56                             ` Peter Maydell
2013-08-14 14:41                           ` Guenter Roeck
2013-08-14 15:26                             ` [Qemu-devel] memory reads and writes Herbei Dacian
2013-08-12 17:48         ` [Qemu-devel] SCSI bus failures with qemu-arm in kernel 3.8+ Peter Maydell
2013-08-13  8:37         ` Rob Landley
2013-08-13  9:12           ` Peter Maydell
2013-08-13 11:30           ` Russell King - ARM Linux
2013-08-13  3:40       ` Guenter Roeck
2013-08-15 16:45         ` Peter Maydell
2013-08-15 17:54           ` Guenter Roeck
2013-08-15 18:05             ` Peter Maydell
2013-08-15 18:39               ` Guenter Roeck
2013-08-15 20:50               ` Guenter Roeck
2013-08-15 21:49                 ` Peter Maydell
2013-08-15 22:18                   ` Guenter Roeck
2013-08-15 22:23                     ` Peter Maydell
2013-08-15 23:25                       ` Guenter Roeck
2013-08-19 15:26                       ` Guenter Roeck
2013-08-12 19:02     ` Paul Gortmaker
2013-08-12 20:58       ` Peter Maydell

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=20130812230408.GA4420@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=arnd.bergmann@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=paul.gortmaker@windriver.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).