Skip to contentSkip to conversation

ppc: xics: fix compilation with CentOS 6

PATCH Applied Paolo Bonzini 3 participants 5 messages May 5, 2017 – May 10, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc: xics: fix compilation with CentOS 6

The PowerPCCPU typedef is included twice if a file includes both hw/ppc/xics.h and target/ppc/cpu-qom.h.

---
There are other failures but I don't have time to debug them today:

In file included from /tmp/qemu-test/src/include/hw/ppc/pnv.h:26,
from /tmp/qemu-test/src/hw/ppc/pnv.c:31:
/tmp/qemu-test/src/include/hw/ppc/pnv_psi.h:50: error: redefinition of typedef ‘PnvPsi’ /tmp/qemu-test/src/include/hw/ppc/pnv_lpc.h:26: note: previous declaration of ‘PnvPsi’ was here In file included from /tmp/qemu-test/src/include/hw/ppc/pnv.h:27,
from /tmp/qemu-test/src/hw/ppc/pnv.c:31:
/tmp/qemu-test/src/include/hw/ppc/pnv_occ.h:25: error: redefinition of typedef ‘PnvPsi’ /tmp/qemu-test/src/include/hw/ppc/pnv_psi.h:50: note: previous declaration of ‘PnvPsi’ was here In file included from /tmp/qemu-test/src/hw/ppc/pnv.c:39:
/tmp/qemu-test/src/include/hw/ipmi/ipmi.h:188: error: redefinition of typedef ‘IPMIBmc’ /tmp/qemu-test/src/include/hw/ppc/pnv.h:121: note: previous declaration of ‘IPMIBmc’ was here make[1]: *** [hw/ppc/pnv.o] Error 1

Please start including Docker-based tests in your pre-pull-request tests.

 include/hw/ppc/xics.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/hw/ppc/xics.h +1 -1
index c215dc7..ce1942b 100644
@@ -29,6 +29,7 @@
 #define XICS_H
 
 #include "hw/qdev.h"
+#include "target/ppc/cpu-qom.h"
 
 #define XICS_IPI        0x2
 #define XICS_BUID       0x1
@@ -46,7 +47,6 @@ typedef struct ICSStateClass ICSStateClass;
 typedef struct ICSState ICSState;
 typedef struct ICSIRQState ICSIRQState;
 typedef struct XICSFabric XICSFabric;
-typedef struct PowerPCCPU PowerPCCPU;
 
 #define TYPE_ICP "icp"
 #define ICP(obj) OBJECT_CHECK(ICPState, (obj), TYPE_ICP)
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Paolo Bonzini

The PowerPCCPU typedef is included twice if a file includes both hw/ppc/xics.h and target/ppc/cpu-qom.h.

Quoted 42 lines

---
There are other failures but I don't have time to debug them today:

In file included from /tmp/qemu-test/src/include/hw/ppc/pnv.h:26,
from /tmp/qemu-test/src/hw/ppc/pnv.c:31:
/tmp/qemu-test/src/include/hw/ppc/pnv_psi.h:50: error: redefinition of typedef ‘PnvPsi’ /tmp/qemu-test/src/include/hw/ppc/pnv_lpc.h:26: note: previous declaration of ‘PnvPsi’ was here In file included from /tmp/qemu-test/src/include/hw/ppc/pnv.h:27,
from /tmp/qemu-test/src/hw/ppc/pnv.c:31:
/tmp/qemu-test/src/include/hw/ppc/pnv_occ.h:25: error: redefinition of typedef ‘PnvPsi’ /tmp/qemu-test/src/include/hw/ppc/pnv_psi.h:50: note: previous declaration of ‘PnvPsi’ was here In file included from /tmp/qemu-test/src/hw/ppc/pnv.c:39:
/tmp/qemu-test/src/include/hw/ipmi/ipmi.h:188: error: redefinition of typedef ‘IPMIBmc’ /tmp/qemu-test/src/include/hw/ppc/pnv.h:121: note: previous declaration of ‘IPMIBmc’ was here make[1]: *** [hw/ppc/pnv.o] Error 1

Please start including Docker-based tests in your pre-pull-request tests.

 include/hw/ppc/xics.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/hw/ppc/xics.h +1 -1
index c215dc7..ce1942b 100644
@@ -29,6 +29,7 @@
 #define XICS_H
 
 #include "hw/qdev.h"
+#include "target/ppc/cpu-qom.h"
 
 #define XICS_IPI        0x2
 #define XICS_BUID       0x1
@@ -46,7 +47,6 @@ typedef struct ICSStateClass ICSStateClass;
 typedef struct ICSState ICSState;
 typedef struct ICSIRQState ICSIRQState;
 typedef struct XICSFabric XICSFabric;
-typedef struct PowerPCCPU PowerPCCPU;
 
 #define TYPE_ICP "icp"
 #define ICP(obj) OBJECT_CHECK(ICPState, (obj), TYPE_ICP)
Applied
#2 lore raw
In reply to Paolo Bonzini
Quoted 4 lines · Paolo Bonzini

The PowerPCCPU typedef is included twice if a file includes both hw/ppc/xics.h and target/ppc/cpu-qom.h.

Applied to ppc-for-2.10, thanks.

Quoted 16 lines

---
There are other failures but I don't have time to debug them today:

In file included from /tmp/qemu-test/src/include/hw/ppc/pnv.h:26,
from /tmp/qemu-test/src/hw/ppc/pnv.c:31:
/tmp/qemu-test/src/include/hw/ppc/pnv_psi.h:50: error: redefinition of typedef ‘PnvPsi’ /tmp/qemu-test/src/include/hw/ppc/pnv_lpc.h:26: note: previous declaration of ‘PnvPsi’ was here In file included from /tmp/qemu-test/src/include/hw/ppc/pnv.h:27,
from /tmp/qemu-test/src/hw/ppc/pnv.c:31:
/tmp/qemu-test/src/include/hw/ppc/pnv_occ.h:25: error: redefinition of typedef ‘PnvPsi’ /tmp/qemu-test/src/include/hw/ppc/pnv_psi.h:50: note: previous declaration of ‘PnvPsi’ was here In file included from /tmp/qemu-test/src/hw/ppc/pnv.c:39:
/tmp/qemu-test/src/include/hw/ipmi/ipmi.h:188: error: redefinition of typedef ‘IPMIBmc’ /tmp/qemu-test/src/include/hw/ppc/pnv.h:121: note: previous declaration of ‘IPMIBmc’ was here make[1]: *** [hw/ppc/pnv.o] Error 1

Quoted 1 line

Please start including Docker-based tests in your pre-pull-request tests.

Um.. is there some doco on how to execute these. I tried "make docker-test" and "make docker-image" and they both just seem to hang at:

umbus:~/src/qemu (ppc-for-2.10)$ make docker-image
BUILD travis

strace shows docker blocked on a futex.

Quoted 23 lines
 include/hw/ppc/xics.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/hw/ppc/xics.h +1 -1
index c215dc7..ce1942b 100644
@@ -29,6 +29,7 @@
 #define XICS_H
 
 #include "hw/qdev.h"
+#include "target/ppc/cpu-qom.h"
 
 #define XICS_IPI        0x2
 #define XICS_BUID       0x1
@@ -46,7 +47,6 @@ typedef struct ICSStateClass ICSStateClass;
 typedef struct ICSState ICSState;
 typedef struct ICSIRQState ICSIRQState;
 typedef struct XICSFabric XICSFabric;
-typedef struct PowerPCCPU PowerPCCPU;
 
 #define TYPE_ICP "icp"
 #define ICP(obj) OBJECT_CHECK(ICPState, (obj), TYPE_ICP)
Signature · 4 lines
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
#3 lore raw
Quoted 10 lines · David Gibson
Quoted 2 lines

Please start including Docker-based tests in your pre-pull-request tests.

Um.. is there some doco on how to execute these. I tried "make docker-test" and "make docker-image" and they both just seem to hang at:

umbus:~/src/qemu (ppc-for-2.10)$ make docker-image
BUILD travis

strace shows docker blocked on a futex.

Try "make docker-test-full@centos6 V=1".

Paolo

#4 lore raw
Quoted 9 lines · Paolo Bonzini
Quoted 6 lines · David Gibson
Quoted 2 lines

Please start including Docker-based tests in your pre-pull-request tests.

Um.. is there some doco on how to execute these. I tried "make docker-test" and "make docker-image" and they both just seem to hang at:

Quoted 6 lines
Quoted 4 lines

umbus:~/src/qemu (ppc-for-2.10)$ make docker-image
BUILD travis

strace shows docker blocked on a futex.

Try "make docker-test-full@centos6 V=1".

So, the problem I hit above was just that it was taking time to download all the image data - without V=1, it wasn't showing progress so it looked like it wasn't doing anything.

With that done, I get further, but it's still a bit of a pain in the arse. If I run as a normal user things fail, because the sudo authorization runs out before a test is complete. If I run as root it screws up permissions on my git tree so I have to re-chown before operating as a normal user again. And testing the full set of images takes an age - I've been running this all day, and AFAICT it's barely through half the available images. If I'm testing for multiple days it means what I'm finally sending a pullreq for is no longer against the latest master, which I don't really like.

Any ideas to make this less painful?

Signature · 4 lines
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