qemu/include/hw/ide/ahci.h:260:16: error: field ‘sglist’ has incomplete type
QEMUSGList sglist;
^~~~~~
/qemu/include/hw/ide/ahci.h:272:5: error: unknown type name ‘IDEDMA’
IDEDMA dma;
^~~~~~
qemu/include/hw/ide/ahci.h:273:5: error: unknown type name ‘IDEBus’
IDEBus port;
^~~~~~
qemu/include/hw/ide/ahci.h:305:15: error: field ‘parent_obj’ has incomplete type
PCIDevice parent_obj;
^~~~~~~~~~
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/ide/ahci.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h
index 0ca7c65820..293f9ebcd0 100644
--- a/include/hw/ide/ahci.h
+++ b/include/hw/ide/ahci.h
@@ -25,6 +25,8 @@
#define HW_IDE_AHCI_H
#include "hw/sysbus.h"
+#include "hw/ide/internal.h"
+#include "sysemu/dma.h"
#define AHCI_MEM_BAR_SIZE 0x1000
#define AHCI_MAX_PORTS 32
--
2.11.0
On 05/08/2017 06:39 PM, Philippe Mathieu-Daudé wrote: > qemu/include/hw/ide/ahci.h:260:16: error: field ‘sglist’ has incomplete type > QEMUSGList sglist; > ^~~~~~ What are you doing to get this compilation error (configure options, platform, compiler, etc)? I can't reproduce it. Is it something that pops up later when you remove includes from somewhere else, and you're just pre-emptively adding includes here to allow removal of includes later? > /qemu/include/hw/ide/ahci.h:272:5: error: unknown type name ‘IDEDMA’ > IDEDMA dma; > ^~~~~~ > qemu/include/hw/ide/ahci.h:273:5: error: unknown type name ‘IDEBus’ > IDEBus port; > ^~~~~~ > qemu/include/hw/ide/ahci.h:305:15: error: field ‘parent_obj’ has incomplete type > PCIDevice parent_obj; > ^~~~~~~~~~ > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > include/hw/ide/ahci.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h > index 0ca7c65820..293f9ebcd0 100644 > --- a/include/hw/ide/ahci.h > +++ b/include/hw/ide/ahci.h > @@ -25,6 +25,8 @@ > #define HW_IDE_AHCI_H > > #include "hw/sysbus.h" > +#include "hw/ide/internal.h" > +#include "sysemu/dma.h" > > #define AHCI_MEM_BAR_SIZE 0x1000 > #define AHCI_MAX_PORTS 32 > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
On 05/08/2017 07:58 PM, Eric Blake wrote: > On 05/08/2017 06:39 PM, Philippe Mathieu-Daudé wrote: >> qemu/include/hw/ide/ahci.h:260:16: error: field ‘sglist’ has incomplete type >> QEMUSGList sglist; >> ^~~~~~ > > What are you doing to get this compilation error (configure options, > platform, compiler, etc)? I can't reproduce it. Is it something that > pops up later when you remove includes from somewhere else, and you're > just pre-emptively adding includes here to allow removal of includes later? > "What he said," but if I had to guess, Philippe is testing that each header can be compiled separately. >> /qemu/include/hw/ide/ahci.h:272:5: error: unknown type name ‘IDEDMA’ >> IDEDMA dma; >> ^~~~~~ >> qemu/include/hw/ide/ahci.h:273:5: error: unknown type name ‘IDEBus’ >> IDEBus port; >> ^~~~~~ >> qemu/include/hw/ide/ahci.h:305:15: error: field ‘parent_obj’ has incomplete type >> PCIDevice parent_obj; >> ^~~~~~~~~~ >> >> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> >> --- >> include/hw/ide/ahci.h | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h >> index 0ca7c65820..293f9ebcd0 100644 >> --- a/include/hw/ide/ahci.h >> +++ b/include/hw/ide/ahci.h >> @@ -25,6 +25,8 @@ >> #define HW_IDE_AHCI_H >> >> #include "hw/sysbus.h" >> +#include "hw/ide/internal.h">> +#include "sysemu/dma.h" >> >> #define AHCI_MEM_BAR_SIZE 0x1000 >> #define AHCI_MAX_PORTS 32 >> >
Hi Eric, John. The patch 07/11 "hw/arm: use defined type name instead of hard-coded string." triggered this problem. I split the previous series to only include the 2 commits involved to reproduce. As you will see, calxeda_init() from highbank.c uses the sysbus type name "sysbus-ahci" which is already defined in "hw/ide/ahci.h" as TYPE_SYSBUS_AHCI. As mentioned in HACKING highbank.c first include is "qemu/osdep.h". However compiling highbank.c fails (as reported in patch "04/11" commit comments). I don't think appropriate to include "hw/ide/internal.h" and "sysemu/dma.h" in highbank.c. Eventually another source including "hw/ide/ahci.h" will hit the same error. Do you see another place where those includes should go? I think I did a mistake sending these both patchs in a series thinking they were unrelated, I should have send them altogether, my bad :/ Regards, Phil. Philippe Mathieu-Daudé (2): arm/highbank: use defined type name instead of hard-coded string ide/ahci: add missing includes hw/arm/highbank.c | 3 ++- include/hw/ide/ahci.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) -- 2.11.0
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/arm/highbank.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
index d209b97dee..dd809b404b 100644
--- a/hw/arm/highbank.c
+++ b/hw/arm/highbank.c
@@ -31,6 +31,7 @@
#include "exec/address-spaces.h"
#include "qemu/error-report.h"
#include "hw/char/pl011.h"
+#include "hw/ide/ahci.h"
#define SMP_BOOT_ADDR 0x100
#define SMP_BOOT_REG 0x40
@@ -341,7 +342,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
sysbus_create_simple("pl031", 0xfff35000, pic[19]);
sysbus_create_simple("pl022", 0xfff39000, pic[23]);
- sysbus_create_simple("sysbus-ahci", 0xffe08000, pic[83]);
+ sysbus_create_simple(TYPE_SYSBUS_AHCI, 0xffe08000, pic[83]);
if (nd_table[0].used) {
qemu_check_nic_model(&nd_table[0], "xgmac");
--
2.11.0
On 06/09/2017 11:05 AM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/arm/highbank.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c
> index d209b97dee..dd809b404b 100644
> --- a/hw/arm/highbank.c
> +++ b/hw/arm/highbank.c
> @@ -31,6 +31,7 @@
> #include "exec/address-spaces.h"
> #include "qemu/error-report.h"
> #include "hw/char/pl011.h"
> +#include "hw/ide/ahci.h"
>
> #define SMP_BOOT_ADDR 0x100
> #define SMP_BOOT_REG 0x40
> @@ -341,7 +342,7 @@ static void calxeda_init(MachineState *machine, enum cxmachines machine_id)
> sysbus_create_simple("pl031", 0xfff35000, pic[19]);
> sysbus_create_simple("pl022", 0xfff39000, pic[23]);
>
> - sysbus_create_simple("sysbus-ahci", 0xffe08000, pic[83]);
> + sysbus_create_simple(TYPE_SYSBUS_AHCI, 0xffe08000, pic[83]);
>
> if (nd_table[0].used) {
> qemu_check_nic_model(&nd_table[0], "xgmac");
>
This patch is fine, I took a stab at fixing the include issues in a
separate series. Try it all out and let me know.
--js
On Fri, Jun 23, 2017 at 7:18 PM, John Snow <jsnow@redhat.com> wrote: > This patch is fine, I took a stab at fixing the include issues in a > separate series. Try it all out and let me know. Thank John, your series does fix my include issues :)
CC arm-softmmu/hw/arm/highbank.o
In file included from qemu/hw/arm/highbank.c:34:0:
qemu/include/hw/ide/ahci.h:260:16: error: field ‘sglist’ has incomplete type
QEMUSGList sglist;
^~~~~~
/qemu/include/hw/ide/ahci.h:272:5: error: unknown type name ‘IDEDMA’
IDEDMA dma;
^~~~~~
qemu/include/hw/ide/ahci.h:273:5: error: unknown type name ‘IDEBus’
IDEBus port;
^~~~~~
qemu/include/hw/ide/ahci.h:305:15: error: field ‘parent_obj’ has incomplete type
PCIDevice parent_obj;
^~~~~~~~~~
qemu/rules.mak:69: recipe for target 'hw/arm/highbank.o' failed
make[1]: *** [hw/arm/highbank.o] Error 1
make: *** [subdir-arm-softmmu] Error 2
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/ide/ahci.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h
index 0ca7c65820..293f9ebcd0 100644
--- a/include/hw/ide/ahci.h
+++ b/include/hw/ide/ahci.h
@@ -25,6 +25,8 @@
#define HW_IDE_AHCI_H
#include "hw/sysbus.h"
+#include "hw/ide/internal.h"
+#include "sysemu/dma.h"
#define AHCI_MEM_BAR_SIZE 0x1000
#define AHCI_MAX_PORTS 32
--
2.11.0
© 2016 - 2026 Red Hat, Inc.