diff mbox

[v3,for-2.11,07/18] s390x: drop inclusion of sysemu/kvm.h from some files

Message ID 20170818114353.13455-8-david@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

David Hildenbrand Aug. 18, 2017, 11:43 a.m. UTC
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(-)

Comments

Thomas Huth Aug. 18, 2017, 4:08 p.m. UTC | #1
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
David Hildenbrand Aug. 18, 2017, 5:28 p.m. UTC | #2
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.
Cornelia Huck Aug. 21, 2017, 9:52 a.m. UTC | #3
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...
David Hildenbrand Aug. 21, 2017, 10:50 a.m. UTC | #4
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 mbox

Patch

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 {