From 782ea2c7598a9d07393b6024ec5dfcde96ae3d90 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 14 Sep 2011 18:27:54 +0200 Subject: [PATCH 1/8] target-i386: Remove data type CCTable Remove also two assert statements which were the last remaining users. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- target-i386/cpu.h | 5 ----- target-i386/translate.c | 5 ----- 2 files changed, 10 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 4a6f675f98..ae36489a9a 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -991,11 +991,6 @@ static inline int cpu_mmu_index (CPUState *env) /* translate.c */ void optimize_flags_init(void); -typedef struct CCTable { - int (*compute_all)(void); /* return all the flags */ - int (*compute_c)(void); /* return the C flag */ -} CCTable; - #if defined(CONFIG_USER_ONLY) static inline void cpu_clone_regs(CPUState *env, target_ulong newsp) { diff --git a/target-i386/translate.c b/target-i386/translate.c index b9667628a0..b894e97e15 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -7641,11 +7641,6 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start) void optimize_flags_init(void) { -#if TCG_TARGET_REG_BITS == 32 - assert(sizeof(CCTable) == (1 << 3)); -#else - assert(sizeof(CCTable) == (1 << 4)); -#endif cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env"); cpu_cc_op = tcg_global_mem_new_i32(TCG_AREG0, offsetof(CPUState, cc_op), "cc_op"); From a213fcb21c69c7c3b206d7e251d31559859f1545 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 15 Sep 2011 12:15:56 +0100 Subject: [PATCH 2/8] configure: Make missing pkg-config an error rather than a warning If pkg-config doesn't exist then make configure fail immediately with a useful error message. Now that glib is a required dependency, proceeding despite the missing pkg-config will just cause us to fail later with a misleading message about glib not being present. Signed-off-by: Peter Maydell Acked-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 414317af00..9ab3ab4eb0 100755 --- a/configure +++ b/configure @@ -1340,8 +1340,8 @@ fi # pkg-config probe if ! has $pkg_config; then - echo warning: proceeding without "$pkg_config" >&2 - pkg_config=/bin/false + echo "Error: pkg-config binary '$pkg_config' not found" + exit 1 fi ########################################## From 903ec8eae6cca0986d8288016aca6c26626e7d85 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 13 Sep 2011 17:47:52 +0200 Subject: [PATCH 3/8] fix compilation with stderr trace backend Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace-events b/trace-events index 829dc927cf..a31d9aa2ae 100644 --- a/trace-events +++ b/trace-events @@ -455,7 +455,7 @@ milkymist_vgafb_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08 mipsnet_send(uint32_t size) "sending len=%u" mipsnet_receive(uint32_t size) "receiving len=%u" mipsnet_read(uint64_t addr, uint32_t val) "read addr=0x%" PRIx64 " val=0x%x" -mipsnet_write(uint64_t addr, uint64_t val) "write addr=0x%" PRIx64 " val=0x%" PRIx64 +mipsnet_write(uint64_t addr, uint64_t val) "write addr=0x%" PRIx64 " val=0x%" PRIx64 "" mipsnet_irq(uint32_t isr, uint32_t intctl) "set irq to %d (%02x)" # xen-all.c From 43b26fc85157cf34fdaa3e2c7c79ad3ca210bc65 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Tue, 20 Sep 2011 17:11:58 +0200 Subject: [PATCH 4/8] Drop unneeded pthread.h inclusions Signed-off-by: Jan Kiszka Signed-off-by: Stefan Hajnoczi --- hw/xen_nic.c | 1 - hw/xics.c | 2 -- ui/spice-display.c | 2 -- 3 files changed, 5 deletions(-) diff --git a/hw/xen_nic.c b/hw/xen_nic.c index aeca8da96b..ef2a2d6997 100644 --- a/hw/xen_nic.c +++ b/hw/xen_nic.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/hw/xics.c b/hw/xics.c index 9bf82aaf24..80e064eaa3 100644 --- a/hw/xics.c +++ b/hw/xics.c @@ -29,8 +29,6 @@ #include "hw/spapr.h" #include "hw/xics.h" -#include - /* * ICP: Presentation layer */ diff --git a/ui/spice-display.c b/ui/spice-display.c index 3a92a126e5..6c302a3909 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -15,8 +15,6 @@ * along with this program; if not, see . */ -#include - #include "qemu-common.h" #include "qemu-spice.h" #include "qemu-timer.h" From c2162a8b07dbc5479bce3dff5882344f61a37647 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 21 Sep 2011 09:18:32 +0200 Subject: [PATCH 5/8] Silence make if nothing is to do for libcacard Signed-off-by: Jan Kiszka Signed-off-by: Stefan Hajnoczi --- libcacard/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcacard/Makefile b/libcacard/Makefile index 81d9eb5206..a145569044 100644 --- a/libcacard/Makefile +++ b/libcacard/Makefile @@ -27,6 +27,8 @@ clean: rm -Rf .libs all: vscclient +# Dummy command so that make thinks it has done something + @true ######################################################################### # Rules for building libcacard standalone library From 53380ac37f252ec67a5597e79a3893795bf273ca Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 21 Sep 2011 09:28:31 +0200 Subject: [PATCH 6/8] Abort on thread layer errors Makes it easier to catch the bug in gdb as there is no need to set an explicit breakpoint. Signed-off-by: Jan Kiszka Signed-off-by: Stefan Hajnoczi --- qemu-thread-posix.c | 2 +- qemu-thread-win32.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-thread-posix.c b/qemu-thread-posix.c index 2bd02efeff..ac3c0c9d14 100644 --- a/qemu-thread-posix.c +++ b/qemu-thread-posix.c @@ -22,7 +22,7 @@ static void error_exit(int err, const char *msg) { fprintf(stderr, "qemu: %s: %s\n", msg, strerror(err)); - exit(1); + abort(); } void qemu_mutex_init(QemuMutex *mutex) diff --git a/qemu-thread-win32.c b/qemu-thread-win32.c index a27332e669..db8e744729 100644 --- a/qemu-thread-win32.c +++ b/qemu-thread-win32.c @@ -24,7 +24,7 @@ static void error_exit(int err, const char *msg) NULL, err, 0, (LPTSTR)&pstr, 2, NULL); fprintf(stderr, "qemu: %s: %s\n", msg, pstr); LocalFree(pstr); - exit(1); + abort(); } void qemu_mutex_init(QemuMutex *mutex) From 8b3692d13620549c2ca85d9201c32d47b74bb755 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sat, 17 Sep 2011 12:25:30 +0200 Subject: [PATCH 7/8] Remove qemu_host_page_bits It was introduced with commit 54936004fddc52c321cb3f9a9a51140e782bed5d as host_page_bits but never used. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- cpu-all.h | 1 - exec.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/cpu-all.h b/cpu-all.h index f5c82cdebd..42a5fa0a7c 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -290,7 +290,6 @@ extern unsigned long reserved_va; /* ??? These should be the larger of unsigned long and target_ulong. */ extern unsigned long qemu_real_host_page_size; -extern unsigned long qemu_host_page_bits; extern unsigned long qemu_host_page_size; extern unsigned long qemu_host_page_mask; diff --git a/exec.c b/exec.c index c1e045d32c..1e6f732d1d 100644 --- a/exec.c +++ b/exec.c @@ -183,7 +183,6 @@ typedef struct PageDesc { #define V_L1_SHIFT (L1_MAP_ADDR_SPACE_BITS - TARGET_PAGE_BITS - V_L1_BITS) unsigned long qemu_real_host_page_size; -unsigned long qemu_host_page_bits; unsigned long qemu_host_page_size; unsigned long qemu_host_page_mask; @@ -274,9 +273,6 @@ static void page_init(void) qemu_host_page_size = qemu_real_host_page_size; if (qemu_host_page_size < TARGET_PAGE_SIZE) qemu_host_page_size = TARGET_PAGE_SIZE; - qemu_host_page_bits = 0; - while ((1 << qemu_host_page_bits) < qemu_host_page_size) - qemu_host_page_bits++; qemu_host_page_mask = ~(qemu_host_page_size - 1); #if defined(CONFIG_BSD) && defined(CONFIG_USER_ONLY) From 7b0a03a1eab52ed2f59c8e4cb2210ee74433a820 Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Wed, 21 Sep 2011 11:10:52 +0100 Subject: [PATCH 8/8] use qemu_* ctype functions Fix "warning: array subscript has type 'char'" on NetBSD. Signed-off-by: Christoph Egger Signed-off-by: Stefan Hajnoczi --- cmd.c | 2 +- ui/keymaps.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd.c b/cmd.c index ecca167399..f77897e00a 100644 --- a/cmd.c +++ b/cmd.c @@ -389,7 +389,7 @@ cvtnum( if (sp[1] != '\0') return -1LL; - c = tolower(*sp); + c = qemu_tolower(*sp); switch (c) { default: return i; diff --git a/ui/keymaps.c b/ui/keymaps.c index 81003bb5ca..f54a11437b 100644 --- a/ui/keymaps.c +++ b/ui/keymaps.c @@ -146,7 +146,7 @@ static kbd_layout_t *parse_keyboard_layout(const name2keysym_t *table, if (rest && strstr(rest, "addupper")) { char *c; for (c = line; *c; c++) - *c = toupper(*c); + *c = qemu_toupper(*c); keysym = get_keysym(table, line); if (keysym) add_keysym(line, keysym, keycode | SCANCODE_SHIFT, k);