From 8cf28bcaf182a52be8890f4bceb88aca6f0b23cc Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 22 Sep 2011 19:08:47 +0200 Subject: [PATCH 1/7] makefile: extract tools-obj-y Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6ed3194fd7..5723108e53 100644 --- a/Makefile +++ b/Makefile @@ -145,11 +145,12 @@ endif qemu-img.o: qemu-img-cmds.h qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o cmd.o qemu-ga.o: $(GENERATED_HEADERS) -qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o +tools-obj-y = qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) \ + $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o -qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o - -qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(oslib-obj-y) $(trace-obj-y) $(block-obj-y) $(qobject-obj-y) $(version-obj-y) qemu-timer-common.o +qemu-img$(EXESUF): qemu-img.o $(tools-obj-y) +qemu-nbd$(EXESUF): qemu-nbd.o $(tools-obj-y) +qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") From ce8d2800f7858a3847a585d23a3e5e56bedf4e65 Mon Sep 17 00:00:00 2001 From: Antony Pavlov Date: Mon, 26 Sep 2011 09:02:37 +0400 Subject: [PATCH 2/7] gt64xxx.c: fix length modifier in DPRINTF format string The commit fc2bf44972349b078d8310466c3866615500e67f changed the type of val argument of the function gt64120_writel() from uint32_t to uint64_t, so we need to change the corresponding length modifier from "%x" to "%" PRIx64. Signed-off-by: Antony Pavlov Signed-off-by: Stefan Hajnoczi --- hw/gt64xxx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c index 1c3425372a..73454ff065 100644 --- a/hw/gt64xxx.c +++ b/hw/gt64xxx.c @@ -543,19 +543,19 @@ static void gt64120_writel (void *opaque, target_phys_addr_t addr, /* not really implemented */ s->regs[saddr] = ~(~(s->regs[saddr]) | ~(val & 0xfffffffe)); s->regs[saddr] |= !!(s->regs[saddr] & 0xfffffffe); - DPRINTF("INTRCAUSE %x\n", val); + DPRINTF("INTRCAUSE %" PRIx64 "\n", val); break; case GT_INTRMASK: s->regs[saddr] = val & 0x3c3ffffe; - DPRINTF("INTRMASK %x\n", val); + DPRINTF("INTRMASK %" PRIx64 "\n", val); break; case GT_PCI0_ICMASK: s->regs[saddr] = val & 0x03fffffe; - DPRINTF("ICMASK %x\n", val); + DPRINTF("ICMASK %" PRIx64 "\n", val); break; case GT_PCI0_SERR0MASK: s->regs[saddr] = val & 0x0000003f; - DPRINTF("SERR0MASK %x\n", val); + DPRINTF("SERR0MASK %" PRIx64 "\n", val); break; /* Reserved when only PCI_0 is configured. */ From f6c610653799749cdb5bcd4799ca3ef61b974eb7 Mon Sep 17 00:00:00 2001 From: Antony Pavlov Date: Mon, 26 Sep 2011 09:02:38 +0400 Subject: [PATCH 3/7] gt64xxx.c: remove reference to non-existing ISD_handle field The commit fc2bf44972349b078d8310466c3866615500e67f removed ISD_handle field from struct GT64120State, so remove the field from DPRINTF too. Signed-off-by: Antony Pavlov Signed-off-by: Stefan Hajnoczi --- hw/gt64xxx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c index 73454ff065..432683acea 100644 --- a/hw/gt64xxx.c +++ b/hw/gt64xxx.c @@ -275,8 +275,9 @@ static void gt64120_isd_mapping(GT64120State *s) check_reserved_space(&start, &length); length = 0x1000; /* Map new address */ - DPRINTF("ISD: "TARGET_FMT_plx"@"TARGET_FMT_plx" -> "TARGET_FMT_plx"@"TARGET_FMT_plx", %x\n", s->ISD_length, s->ISD_start, - length, start, s->ISD_handle); + DPRINTF("ISD: "TARGET_FMT_plx"@"TARGET_FMT_plx + " -> "TARGET_FMT_plx"@"TARGET_FMT_plx"\n", + s->ISD_length, s->ISD_start, length, start); s->ISD_start = start; s->ISD_length = length; memory_region_add_subregion(get_system_memory(), s->ISD_start, &s->ISD_mem); From 4789bc39aafb56c0a30e74fc5848e8ae05ae015c Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Mon, 26 Sep 2011 11:30:49 +0200 Subject: [PATCH 4/7] lsi: Fix tag reference in debug print Signed-off-by: Jan Kiszka Signed-off-by: Stefan Hajnoczi --- hw/lsi53c895a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index 75a03a74b9..e077ec07cc 100644 --- a/hw/lsi53c895a.c +++ b/hw/lsi53c895a.c @@ -697,7 +697,7 @@ static int lsi_queue_req(LSIState *s, SCSIRequest *req, uint32_t len) lsi_reselect(s, p); return 0; } else { - DPRINTF("Queueing IO tag=0x%x\n", tag); + DPRINTF("Queueing IO tag=0x%x\n", p->tag); p->pending = len; return 1; } From 297d1b4e9ddff27067e773d0945362622415fd76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 2 Oct 2011 18:35:48 +0200 Subject: [PATCH 5/7] target-arm: Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The command line option is called -kernel, not -kenrel. Cc: Paul Brook Reviewed-by: Peter Maydell Signed-off-by: Andreas Färber Signed-off-by: Stefan Hajnoczi --- target-arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index d3a3ba207f..e2428eb7b2 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -298,7 +298,7 @@ void cpu_reset(CPUARMState *env) if (rom) { /* We should really use ldl_phys here, in case the guest modified flash and reset itself. However images - loaded via -kenrel have not been copied yet, so load the + loaded via -kernel have not been copied yet, so load the values directly from there. */ env->regs[13] = ldl_p(rom); pc = ldl_p(rom + 4); From 5354d08312c1fdc752a498a9857e913a890c4e10 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 2 Oct 2011 18:53:09 +0200 Subject: [PATCH 6/7] Fix mismatching allocation and deallocation This error was reported by cppcheck. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console.c b/console.c index 6dfcc47940..e43de92c00 100644 --- a/console.c +++ b/console.c @@ -1538,7 +1538,7 @@ int text_console_init(QemuOpts *opts, CharDriverState **_chr) } if (!s) { - free(chr); + g_free(chr); return -EBUSY; } From ca8a277ccc911ce8501b1bc984a09f988379d8c3 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 3 Oct 2011 22:43:19 +0200 Subject: [PATCH 7/7] linux-user: Remove unused code The code is unused since 8 years, so remove it. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- linux-user/signal.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 89276eb6a5..40c5eb1846 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -1274,10 +1274,7 @@ setup_return(CPUState *env, struct target_sigaction *ka, if (__put_user(retcodes[idx], rc)) return 1; -#if 0 - flush_icache_range((abi_ulong)rc, - (abi_ulong)(rc + 1)); -#endif + retcode = rc_addr + thumb; }