qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	armbru@redhat.com, david@gibson.dropbear.id.au,
	atar4qemu@gmail.com, qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [PATCH 6/6] sabre: don't call sysbus_mmio_map() in sabre_realize()
Date: Sun, 20 Sep 2020 12:48:20 +0200	[thread overview]
Message-ID: <530678af-dbc7-e6db-72ef-7931c3e9609a@amsat.org> (raw)
In-Reply-To: <20200920082018.16135-7-mark.cave-ayland@ilande.co.uk>

On 9/20/20 10:20 AM, Mark Cave-Ayland wrote:
> The device should not map itself but instead should be mapped to sysbus by the
> sun4u machine.

Yeah good cleanup.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>  hw/pci-host/sabre.c | 8 --------
>  hw/sparc64/sun4u.c  | 7 +++++++
>  2 files changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/hw/pci-host/sabre.c b/hw/pci-host/sabre.c
> index 5ac6283623..5394ad5cd0 100644
> --- a/hw/pci-host/sabre.c
> +++ b/hw/pci-host/sabre.c
> @@ -378,16 +378,8 @@ static void sabre_realize(DeviceState *dev, Error **errp)
>  {
>      SabreState *s = SABRE(dev);
>      PCIHostState *phb = PCI_HOST_BRIDGE(dev);
> -    SysBusDevice *sbd = SYS_BUS_DEVICE(s);
>      PCIDevice *pci_dev;
>  
> -    /* sabre_config */
> -    sysbus_mmio_map(sbd, 0, s->special_base);
> -    /* PCI configuration space */
> -    sysbus_mmio_map(sbd, 1, s->special_base + 0x1000000ULL);
> -    /* pci_ioport */
> -    sysbus_mmio_map(sbd, 2, s->special_base + 0x2000000ULL);
> -
>      memory_region_init(&s->pci_mmio, OBJECT(s), "pci-mmio", 0x100000000ULL);
>      memory_region_add_subregion(get_system_memory(), s->mem_base,
>                                  &s->pci_mmio);
> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
> index b4aabfc076..f80ddde5dc 100644
> --- a/hw/sparc64/sun4u.c
> +++ b/hw/sparc64/sun4u.c
> @@ -592,6 +592,13 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
>                               &error_abort);
>      sysbus_realize_and_unref(SYS_BUS_DEVICE(sabre), &error_fatal);
>  
> +    /* sabre_config */
> +    sysbus_mmio_map(SYS_BUS_DEVICE(sabre), 0, PBM_SPECIAL_BASE);
> +    /* PCI configuration space */
> +    sysbus_mmio_map(SYS_BUS_DEVICE(sabre), 1, PBM_SPECIAL_BASE + 0x1000000ULL);
> +    /* pci_ioport */
> +    sysbus_mmio_map(SYS_BUS_DEVICE(sabre), 2, PBM_SPECIAL_BASE + 0x2000000ULL);
> +
>      /* Wire up PCI interrupts to CPU */
>      for (i = 0; i < IVEC_MAX; i++) {
>          qdev_connect_gpio_out_named(DEVICE(sabre), "ivec-irq", i,
> 



      reply	other threads:[~2020-09-20 10:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-20  8:20 [PATCH 0/6] QOM minor fixes Mark Cave-Ayland
2020-09-20  8:20 ` [PATCH 1/6] sparc32-dma: use object_initialize_child() for espdma and ledma child objects Mark Cave-Ayland
2020-09-20 10:49   ` Philippe Mathieu-Daudé
2020-09-20  8:20 ` [PATCH 2/6] sparc32-ledma: use object_initialize_child() for lance child object Mark Cave-Ayland
2020-09-20 10:49   ` Philippe Mathieu-Daudé
2020-09-20  8:20 ` [PATCH 3/6] sparc32-espdma: use object_initialize_child() for esp " Mark Cave-Ayland
2020-09-20 10:49   ` Philippe Mathieu-Daudé
2020-09-20  8:20 ` [PATCH 4/6] sparc32-ledma: don't reference nd_table directly within the device Mark Cave-Ayland
2020-09-21  9:25   ` Markus Armbruster
2020-09-21 17:03     ` Mark Cave-Ayland
2020-09-21 17:14       ` Mark Cave-Ayland
2020-09-26 10:23         ` Mark Cave-Ayland
2020-09-21  9:57   ` Philippe Mathieu-Daudé
2020-09-21 17:08     ` Mark Cave-Ayland
2020-09-21 17:58       ` Philippe Mathieu-Daudé
2020-09-26 10:29         ` Mark Cave-Ayland
2020-09-20  8:20 ` [PATCH 5/6] macio: don't reference serial_hd() " Mark Cave-Ayland
2020-09-20 10:52   ` BALATON Zoltan via
2020-09-20 17:59     ` Mark Cave-Ayland
2020-09-20  8:20 ` [PATCH 6/6] sabre: don't call sysbus_mmio_map() in sabre_realize() Mark Cave-Ayland
2020-09-20 10:48   ` Philippe Mathieu-Daudé [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=530678af-dbc7-e6db-72ef-7931c3e9609a@amsat.org \
    --to=f4bug@amsat.org \
    --cc=armbru@redhat.com \
    --cc=atar4qemu@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=mark.cave-ayland@ilande.co.uk \
    --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 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).