From: John Snow <jsnow@redhat.com>
To: Alistair Francis <alistair.francis@xilinx.com>,
qemu-devel@nongnu.org, peter.maydell@linaro.org
Cc: saipava@xilinx.com, edgar.iglesias@xilinx.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v1 1/3] ahci: Separate the AHCI state structure into the header
Date: Wed, 29 Jul 2015 18:21:54 -0400 [thread overview]
Message-ID: <55B95202.4060607@redhat.com> (raw)
In-Reply-To: <d0e44d6e4957765be2e6aa0a58d04195cc529978.1437699224.git.alistair.francis@xilinx.com>
On 07/27/2015 02:37 PM, Alistair Francis wrote:
> Pull the AHCI state structure out into the header. This allows
> other containers to access the struct. This is required to add
> the device to modern SoC containers.
>
Is there a reason this structure needs to be directly inlined into
XlnxZynqMPState, instead of using e.g.
qdev_create/object_property_add_child and letting SysbusAHCIState be the
business of ahci.c?
Asking as a bit of a qdev outsider.
--js
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> Reviewed-by: Sai Pavan Boddu <saipava@xilinx.com>
> ---
> hw/ide/ahci.c | 13 -------------
> hw/ide/ahci.h | 14 ++++++++++++++
> 2 files changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
> index 48749c1..02d85fa 100644
> --- a/hw/ide/ahci.c
> +++ b/hw/ide/ahci.c
> @@ -25,7 +25,6 @@
> #include <hw/pci/msi.h>
> #include <hw/i386/pc.h>
> #include <hw/pci/pci.h>
> -#include <hw/sysbus.h>
>
> #include "qemu/error-report.h"
> #include "sysemu/block-backend.h"
> @@ -1625,18 +1624,6 @@ const VMStateDescription vmstate_ahci = {
> },
> };
>
> -#define TYPE_SYSBUS_AHCI "sysbus-ahci"
> -#define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_AHCI)
> -
> -typedef struct SysbusAHCIState {
> - /*< private >*/
> - SysBusDevice parent_obj;
> - /*< public >*/
> -
> - AHCIState ahci;
> - uint32_t num_ports;
> -} SysbusAHCIState;
> -
> static const VMStateDescription vmstate_sysbus_ahci = {
> .name = "sysbus-ahci",
> .fields = (VMStateField[]) {
> diff --git a/hw/ide/ahci.h b/hw/ide/ahci.h
> index 68d5074..5ab8ea4 100644
> --- a/hw/ide/ahci.h
> +++ b/hw/ide/ahci.h
> @@ -24,6 +24,8 @@
> #ifndef HW_IDE_AHCI_H
> #define HW_IDE_AHCI_H
>
> +#include <hw/sysbus.h>
> +
> #define AHCI_MEM_BAR_SIZE 0x1000
> #define AHCI_MAX_PORTS 32
> #define AHCI_MAX_SG 168 /* hardware max is 64K */
> @@ -369,4 +371,16 @@ void ahci_reset(AHCIState *s);
>
> void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd);
>
> +#define TYPE_SYSBUS_AHCI "sysbus-ahci"
> +#define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_AHCI)
> +
> +typedef struct SysbusAHCIState {
> + /*< private >*/
> + SysBusDevice parent_obj;
> + /*< public >*/
> +
> + AHCIState ahci;
> + uint32_t num_ports;
> +} SysbusAHCIState;
> +
> #endif /* HW_IDE_AHCI_H */
>
next prev parent reply other threads:[~2015-07-29 22:22 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 18:37 [Qemu-devel] [PATCH v1 0/3] xlnx-zynqmp: Connect the AHCI SATA device Alistair Francis
2015-07-27 18:37 ` [Qemu-devel] [PATCH v1 1/3] ahci: Separate the AHCI state structure into the header Alistair Francis
2015-07-29 22:21 ` John Snow [this message]
2015-07-30 0:12 ` Alistair Francis
2015-08-15 21:18 ` Peter Crosthwaite
2015-08-15 21:57 ` Peter Maydell
2015-08-15 21:21 ` Peter Crosthwaite
2015-08-15 21:25 ` Peter Crosthwaite
2015-08-17 22:31 ` Alistair Francis
2015-07-27 18:37 ` [Qemu-devel] [PATCH v1 2/3] object.c: object_class_dynamic_cast return NULL if the class has no type Alistair Francis
2015-08-15 21:22 ` Peter Crosthwaite
2015-08-17 22:24 ` Alistair Francis
2015-08-17 22:33 ` Andreas Färber
2015-08-17 23:37 ` Peter Crosthwaite
2015-08-24 23:36 ` Alistair Francis
2015-08-25 7:43 ` Peter Crosthwaite
2015-08-26 20:36 ` Alistair Francis
2015-08-26 21:02 ` Peter Crosthwaite
2015-08-26 21:46 ` John Snow
2015-08-26 22:15 ` Peter Crosthwaite
2015-08-26 22:39 ` Peter Maydell
2015-08-26 23:11 ` John Snow
2015-08-27 18:56 ` Alistair Francis
2015-07-27 18:37 ` [Qemu-devel] [PATCH v1 3/3] xlnx-zynqmp: Connect the sysbus AHCI to ZynqMP Alistair Francis
2015-08-15 21:29 ` Peter Crosthwaite
2015-08-17 22:38 ` Alistair Francis
2015-08-14 17:24 ` [Qemu-devel] [PATCH v1 0/3] xlnx-zynqmp: Connect the AHCI SATA device Alistair Francis
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=55B95202.4060607@redhat.com \
--to=jsnow@redhat.com \
--cc=afaerber@suse.de \
--cc=alistair.francis@xilinx.com \
--cc=edgar.iglesias@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=saipava@xilinx.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;
as well as URLs for NNTP newsgroup(s).