s390: compile fixes
PATCH 1/1 s390: compile fixes
The s390 target doesn't compile out of the box anymore. This patch fixes all the obvious glitches that got introduced in the last few weeks.
--- hw/s390-virtio-bus.h | 2 ++ hw/s390-virtio.c | 1 + target-s390x/kvm.c | 2 +- target-s390x/translate.c | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-)
hw/s390-virtio-bus.h +2 -0
@@ -17,6 +17,8 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "virtio-net.h" +#define VIRTIO_DEV_OFFS_TYPE 0/* 8 bits */ #define VIRTIO_DEV_OFFS_NUM_VQ 1/* 8 bits */ #define VIRTIO_DEV_OFFS_FEATURE_LEN 2/* 8 bits */
hw/s390-virtio.c +1 -0
@@ -19,6 +19,7 @@#include "hw.h" #include "block.h" +#include "blockdev.h" #include "sysemu.h" #include "net.h" #include "boards.h"
target-s390x/kvm.c +1 -1
@@ -119,7 +119,7 @@ int kvm_arch_put_registers(CPUState *env, int level)int kvm_arch_get_registers (CPUState *env) { -uint32_t ret; +int ret;struct kvm_regs regs;int i;
target-s390x/translate.c +1 -1
@@ -36,7 +36,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf, } }for (i =0 ; i <16 ; i++) { -cpu_fprintf (f,"F%02d=%016lx" , i, env->fregs[i]); +cpu_fprintf (f,"F%02d=%016lx" , i, (long )env->fregs[i].i);if ((i %4 ) ==3 ) {cpu_fprintf (f,"\n" ); }else {
Signature · 1 line
1.6.0.2
Am 17.11.2010 13:01, schrieb Alexander Graf:
Quoted 54 lines
The s390 target doesn't compile out of the box anymore. This patch fixes all the obvious glitches that got introduced in the last few weeks.
Signed-off-by Alexander Graf <[email protected]>---
hw/s390-virtio-bus.h| 2 ++hw/s390-virtio.c| 1 +target-s390x/kvm.c| 2 +-target-s390x/translate.c| 2 +-4 files changed, 5 insertions(+), 2 deletions(-)hw/s390-virtio-bus.h +2
-0@@ -17,6 +17,8 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "virtio-net.h" +#define VIRTIO_DEV_OFFS_TYPE 0/* 8 bits */ #define VIRTIO_DEV_OFFS_NUM_VQ 1/* 8 bits */ #define VIRTIO_DEV_OFFS_FEATURE_LEN 2/* 8 bits */ hw/s390-virtio.c +1
-0@@ -19,6 +19,7 @@#include "hw.h" #include "block.h" +#include "blockdev.h" #include "sysemu.h" #include "net.h" #include "boards.h" target-s390x/kvm.c +1
-1@@ -119,7 +119,7 @@ int kvm_arch_put_registers(CPUState *env, int level)int kvm_arch_get_registers (CPUState *env) { -uint32_t ret; +int ret;struct kvm_regs regs;int i;target-s390x/translate.c +0
-0
target-s390x/translate.c void cpu_dump_state(CPUState *env, FILE *f, · line 40
Quoted 6 lines
target-s390x/translate.c +1
-1@@ -36,7 +36,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf, } }for (i =0 ; i <16 ; i++) { -cpu_fprintf (f,"F%02d=%016lx" , i, env->fregs[i]); +cpu_fprintf (f,"F%02d=%016lx" , i, (long )env->fregs[i].i);
I have no s390 build environment, but from the code I assume that using PRIx64 might be better than using a type cast here.
Regards,
Stefan
PS. Alexander, there are more patches with format checking in the queue, perhaps you can test them on s390, too.
You can pull them from git://git.weilnetz.de/git/qemu for-blueswirl.
Quoted 50 lines · Stefan Weil
Am 17.11.2010 13:01, schrieb Alexander Graf:
Quoted 49 lines
The s390 target doesn't compile out of the box anymore. This patch fixes all the obvious glitches that got introduced in the last few weeks.
Signed-off-by Alexander Graf <[email protected]>---
hw/s390-virtio-bus.h| 2 ++hw/s390-virtio.c| 1 +target-s390x/kvm.c| 2 +-target-s390x/translate.c| 2 +-4 files changed, 5 insertions(+), 2 deletions(-)hw/s390-virtio-bus.h +2
-0@@ -17,6 +17,8 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "virtio-net.h" +#define VIRTIO_DEV_OFFS_TYPE 0/* 8 bits */ #define VIRTIO_DEV_OFFS_NUM_VQ 1/* 8 bits */ #define VIRTIO_DEV_OFFS_FEATURE_LEN 2/* 8 bits */ hw/s390-virtio.c +1
-0@@ -19,6 +19,7 @@#include "hw.h" #include "block.h" +#include "blockdev.h" #include "sysemu.h" #include "net.h" #include "boards.h" target-s390x/kvm.c +1
-1@@ -119,7 +119,7 @@ int kvm_arch_put_registers(CPUState *env, int level)int kvm_arch_get_registers (CPUState *env) { -uint32_t ret; +int ret;struct kvm_regs regs;int i;
Quoted 13 lines
target-s390x/translate.c void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf, · line 39
Quoted 10 lines
target-s390x/translate.c +1
-1@@ -36,7 +36,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf, } }for (i =0 ; i <16 ; i++) { -cpu_fprintf (f,"F%02d=%016lx" , i, env->fregs[i]); +cpu_fprintf (f,"F%02d=%016lx" , i, (long )env->fregs[i].i);I have no s390 build environment, but from the code I assume that using PRIx64 might be better than using a type cast here.
It doesn't matter really, as the code only works on 64bit anyways.
Alex
Aurelien Jarno
AppliedQuoted 4 lines · Alexander Graf
The s390 target doesn't compile out of the box anymore. This patch fixes all the obvious glitches that got introduced in the last few weeks.
Signed-off-by Alexander Graf <[email protected]>
Thanks, applied.
Quoted 63 lines
--- hw/s390-virtio-bus.h | 2 ++ hw/s390-virtio.c | 1 + target-s390x/kvm.c | 2 +- target-s390x/translate.c | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-)hw/s390-virtio-bus.h +2
-0@@ -17,6 +17,8 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#include "virtio-net.h" +#define VIRTIO_DEV_OFFS_TYPE 0/* 8 bits */ #define VIRTIO_DEV_OFFS_NUM_VQ 1/* 8 bits */ #define VIRTIO_DEV_OFFS_FEATURE_LEN 2/* 8 bits */ hw/s390-virtio.c +1
-0@@ -19,6 +19,7 @@#include "hw.h" #include "block.h" +#include "blockdev.h" #include "sysemu.h" #include "net.h" #include "boards.h" target-s390x/kvm.c +1
-1@@ -119,7 +119,7 @@ int kvm_arch_put_registers(CPUState *env, int level)int kvm_arch_get_registers (CPUState *env) { -uint32_t ret; +int ret;struct kvm_regs regs;int i;target-s390x/translate.c +1
-1@@ -36,7 +36,7 @@ void cpu_dump_state(CPUState *env, FILE *f, fprintf_function cpu_fprintf, } }for (i =0 ; i <16 ; i++) { -cpu_fprintf (f,"F%02d=%016lx" , i, env->fregs[i]); +cpu_fprintf (f,"F%02d=%016lx" , i, (long )env->fregs[i].i);if ((i %4 ) ==3 ) {cpu_fprintf (f,"\n" ); }else {Signature · 1 line
1.6.0.2
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net