Message ID | 20170818114353.13455-8-david@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 18.08.2017 13:43, David Hildenbrand wrote:
> s390-stattrib.c needs definition of TARGET_PAGE_SIZE, solve it via cpu.h.
Why not simply #include "exec/cpu-all.h" ? If cpu.h is not really needed
here...
Thomas
On 18.08.2017 18:08, Thomas Huth wrote: > On 18.08.2017 13:43, David Hildenbrand wrote: >> s390-stattrib.c needs definition of TARGET_PAGE_SIZE, solve it via cpu.h. > > Why not simply #include "exec/cpu-all.h" ? If cpu.h is not really needed > here... > > Thomas > > Git grep showed me that this is a very rare thing to do, so I went for cpu.h. If you prefer cpu-all.h, I can use that.
On Fri, 18 Aug 2017 19:28:34 +0200 David Hildenbrand <david@redhat.com> wrote: > On 18.08.2017 18:08, Thomas Huth wrote: > > On 18.08.2017 13:43, David Hildenbrand wrote: > >> s390-stattrib.c needs definition of TARGET_PAGE_SIZE, solve it via cpu.h. > > > > Why not simply #include "exec/cpu-all.h" ? If cpu.h is not really needed > > here... > > > > Thomas > > > > > > Git grep showed me that this is a very rare thing to do, so I went for > cpu.h. If you prefer cpu-all.h, I can use that. Is there any target that does not include cpu-all.h in its cpu.h? We probably can remove all includes of cpu-all.h in .c files, as all of them include cpu.h as well...
On 21.08.2017 11:52, Cornelia Huck wrote: > On Fri, 18 Aug 2017 19:28:34 +0200 > David Hildenbrand <david@redhat.com> wrote: > >> On 18.08.2017 18:08, Thomas Huth wrote: >>> On 18.08.2017 13:43, David Hildenbrand wrote: >>>> s390-stattrib.c needs definition of TARGET_PAGE_SIZE, solve it via cpu.h. >>> >>> Why not simply #include "exec/cpu-all.h" ? If cpu.h is not really needed >>> here... >>> >>> Thomas >>> >>> >> >> Git grep showed me that this is a very rare thing to do, so I went for >> cpu.h. If you prefer cpu-all.h, I can use that. > > Is there any target that does not include cpu-all.h in its cpu.h? We > probably can remove all includes of cpu-all.h in .c files, as all of > them include cpu.h as well... > I guess they have to, otherwise this stuff will not compile. Yes, we should be able to remove exec/cpu-all.h from both remaining users, dump.c and exec.c, as they already include cpu.h as you also noticed.
diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c index d14923f..14a0271 100644 --- a/hw/s390x/s390-stattrib.c +++ b/hw/s390x/s390-stattrib.c @@ -11,12 +11,12 @@ #include "qemu/osdep.h" #include "hw/boards.h" +#include "cpu.h" #include "qmp-commands.h" #include "migration/qemu-file.h" #include "migration/register.h" #include "hw/s390x/storage-attributes.h" #include "qemu/error-report.h" -#include "sysemu/kvm.h" #include "exec/ram_addr.h" #include "qapi/error.h" diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index 8dd1109..0b45b74 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -15,7 +15,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "cpu.h" -#include "sysemu/kvm.h" #include "exec/memory.h" #include "sysemu/sysemu.h" #include "exec/address-spaces.h" diff --git a/hw/s390x/sclpcpu.c b/hw/s390x/sclpcpu.c index b1f3ef8..023d059 100644 --- a/hw/s390x/sclpcpu.c +++ b/hw/s390x/sclpcpu.c @@ -18,7 +18,6 @@ #include "hw/s390x/event-facility.h" #include "cpu.h" #include "sysemu/cpus.h" -#include "sysemu/kvm.h" typedef struct ConfigMgtData { EventBufferHeader ebh; diff --git a/target/s390x/arch_dump.c b/target/s390x/arch_dump.c index 96c9fb9..399030d 100644 --- a/target/s390x/arch_dump.c +++ b/target/s390x/arch_dump.c @@ -16,7 +16,6 @@ #include "elf.h" #include "exec/cpu-all.h" #include "sysemu/dump.h" -#include "sysemu/kvm.h" struct S390xUserRegsStruct {
s390-stattrib.c needs definition of TARGET_PAGE_SIZE, solve it via cpu.h. Signed-off-by: David Hildenbrand <david@redhat.com> --- hw/s390x/s390-stattrib.c | 2 +- hw/s390x/sclp.c | 1 - hw/s390x/sclpcpu.c | 1 - target/s390x/arch_dump.c | 1 - 4 files changed, 1 insertion(+), 4 deletions(-)