All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Sebastian Bauer <mail@sebastianbauer.info>
Cc: BALATON Zoltan <balaton@eik.bme.hu>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	Alexander Graf <agraf@suse.de>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] sam460ex: Fix PCI interrupts with multiple devices
Date: Wed, 1 Aug 2018 11:02:11 +1000	[thread overview]
Message-ID: <20180801010211.GL2708@umbus.fritz.box> (raw)
In-Reply-To: <c577eb87cb5094a63b58771ac7df6c06@sebastianbauer.info>

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

On Tue, Jul 31, 2018 at 11:55:02PM +0200, Sebastian Bauer wrote:
> Am 2018-07-31 13:08, schrieb BALATON Zoltan:
> > The four interrupts of the PCI bus are connected to the same UIC pin
> > on the real Sam460ex. Evidence for this can be found in the UBoot
> > source for the Sam460ex in the Sam460ex.c file where
> > PCI_INTERRUPT_LINE is written. Change the ppc440_pcix model to behave
> > more like this.
> > 
> > This fixes the problem that can be observed when adding further PCI
> > cards that got their interrupt rotated to other interrupts than PCI
> > INT A. In particular, the bug was observed with an additional OHCI PCI
> > card or an ES1370 sound device.
> [...]
> > diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
> > index 0999efc..9c77183 100644
> > --- a/hw/ppc/sam460ex.c
> > +++ b/hw/ppc/sam460ex.c
> > @@ -515,10 +515,8 @@ static void sam460ex_init(MachineState *machine)
> > 
> >      /* PCI bus */
> >      ppc460ex_pcie_init(env);
> > -    /* FIXME: is this correct? */
> > -    dev = sysbus_create_varargs("ppc440-pcix-host", 0xc0ec00000,
> > -                                uic[1][0], uic[1][20], uic[1][21],
> > uic[1][22],
> > -                                NULL);
> > +    /* All PCI irqs are connected to the same UIC pin (cf. UBoot
> > source) */
> > +    dev = sysbus_create_simple("ppc440-pcix-host", 0xc0ec00000,
> > uic[1][0]);
> >      pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0");
> >      if (!pci_bus) {
> >          error_report("couldn't create PCI controller!");
> 
> I'm fine with that change. I tested it with an additional OHCI controller on
> an emulated SAM machine under guest AmigaOS and it works.
> 
> Tested-by: Sebastian Bauer <mail@sebastianbauer.info>
> 
> Better usage of QOM etc. can IMO be done at a later time point as this fixes
> an unpleasant bug and any side change will just increase the probability to
> introduce new bugs.

Thanks, applied to ppc-for-3.0.  I hope to send a pull request for
that today.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2018-08-01  3:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-31 11:08 [Qemu-devel] [PATCH] sam460ex: Fix PCI interrupts with multiple devices BALATON Zoltan
2018-07-31 21:55 ` Sebastian Bauer
2018-08-01  1:02   ` David Gibson [this message]

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=20180801010211.GL2708@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=balaton@eik.bme.hu \
    --cc=mail@sebastianbauer.info \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.