Skip to contentSkip to conversation

Trivial patches for 2014-06-24

GIT PULL Applied Michael Tokarev 2 participants 16 messages Jun 24, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Here's another pull request for the trivial patches queue.

Nothing exciting, but it contains some bugfixes. For example, a build fix for FreeBSD by Ed Maste.

Please consider pulling/applying.

Thanks,

/mjt

The following changes since commit 513d80edc15d77b6d85df7dfad750ce95d091b78:

Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20140623' into staging (2014-06-24 15:33:42 +0100)

are available in the git repository at:

git://git.corpit.ru/qemu.git tags/trivial-patches-2014-06-24

for you to fetch changes up to d535508793a8e9389379543ef8d506e50c10cf67:

Add support for the arm breakpoint syscall (2014-06-24 20:01:24 +0400)

----------------------------------------------------------------
trivial patches for 2014-06-24

----------------------------------------------------------------
Bernhard Übelacker (1):
Increase maximum number of session of the internal TFTP server.

Chen Gang (1):
block.c: Remove useless 'buf' variable

Cole Robinson (1):
configure: Enable TPM by default, add --disable-tpm

Ed Maste (1):
vscclient: Add required headers to fix build on FreeBSD

Eduardo Habkost (1):
rng-random: NULL check not needed before g_free()

Hunter Laux (1):
Add support for the arm breakpoint syscall

Michael Tokarev (1):
build-sys: introduce install-prog macro to install&strip binaries and use it

Paolo Bonzini (1):
virtio-serial: remove useless set_config function

Peter Maydell (4):
tcg: mark tcg_out* and tcg_patch* with attribute 'unused'
target-unicore: Remove unused functions hw/moxie/moxiesim.c: Remove unused moxie_intc_create()
target-s390x: Remove unused ld_code6() function

Stefan Weil (2):
Fix new typos (found by codespell)
target-ppc: Fix compiler warning

 Makefile                        |   12 ++----------
 Makefile.target                 |    5 +----
 backends/rng-random.c           |    5 +----
 block.c                         |    2 --
 block/iscsi.c                   |    2 +-
 configure                       |    5 ++++-
 hw/char/virtio-serial-bus.c     |    8 --------
 hw/input/hid.c                  |    2 +-
 hw/moxie/moxiesim.c             |   13 -------------
 libcacard/vscclient.c           |    2 ++
 linux-user/arm/syscall.h        |    1 +
 linux-user/main.c               |    4 ++++
 rules.mak                       |    7 +++++++
 slirp/tftp.h                    |    2 +-
 target-arm/helper.c             |    2 +-
 target-ppc/dfp_helper.c         |    3 +--
 target-s390x/translate.c        |    5 -----
 target-unicore32/translate.c    |   28 ----------------------------
 target-unicore32/ucf64_helper.c |   22 ----------------------
 tcg/mips/tcg-target.c           |    4 ++--
 tcg/tcg.c                       |   20 ++++++++++++--------
 tests/qemu-iotests/common.qemu  |    2 +-
 translate-all.c                 |    2 +-
 23 files changed, 43 insertions(+), 115 deletions(-)
#1 lore raw

[Qemu-devel] [PULL 02/14] Fix new typos (found by codespell)

From: Stefan Weil <[email protected]>

* accomodate -> accommodate
* aquiring -> acquiring
* beacuse -> because
* loosing -> losing
* prefering -> preferring
* threshhold -> threshold

---
 block/iscsi.c                  |    2 +-
 hw/input/hid.c                 |    2 +-
 target-arm/helper.c            |    2 +-
 tcg/mips/tcg-target.c          |    4 ++--
 tests/qemu-iotests/common.qemu |    2 +-
 translate-all.c                |    2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)
block/iscsi.c +1 -1
index 84aa22a..f3e83e2 100644
@@ -101,7 +101,7 @@ typedef struct IscsiAIOCB {
 #define ISCSI_CMD_RETRIES ARRAY_SIZE(iscsi_retry_times)
 static const unsigned iscsi_retry_times[] = {8, 32, 128, 512, 2048};
 
-/* this threshhold is a trade-off knob to choose between
+/* this threshold is a trade-off knob to choose between
  * the potential additional overhead of an extra GET_LBA_STATUS request
  * vs. unnecessarily reading a lot of zero sectors over the wire.
  * If a read request is greater or equal than ISCSI_CHECKALLOC_THRES
hw/input/hid.c +1 -1
index 295bdab..9656e90 100644
@@ -164,7 +164,7 @@ static void hid_pointer_sync(DeviceState *dev)
 
     if (hs->n == QUEUE_LENGTH-1) {
         /*
-         * Queue full.  We are loosing information, but we at least
+         * Queue full.  We are losing information, but we at least
          * keep track of most recent button state.
          */
         return;
target-arm/helper.c +1 -1
index ed4d2bb..d343856 100644
@@ -2350,7 +2350,7 @@ void register_cp_regs_for_features(ARMCPU *cpu)
             { .name = "ID_AA64DFR0_EL1", .state = ARM_CP_STATE_AA64,
               .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 0,
               .access = PL1_R, .type = ARM_CP_CONST,
-              /* We mask out the PMUVer field, beacuse we don't currently
+              /* We mask out the PMUVer field, because we don't currently
                * implement the PMU. Not advertising it prevents the guest
                * from trying to use it and getting UNDEFs on registers we
                * don't implement.
tcg/mips/tcg-target.c +2 -2
index 8855d50..9cce356 100644
@@ -781,7 +781,7 @@ static void tcg_out_brcond2(TCGContext *s, TCGCond cond, TCGReg al, TCGReg ah,
         break;
 
     default:
-        /* Minimize code size by prefering a compare not requiring INV.  */
+        /* Minimize code size by preferring a compare not requiring INV.  */
         if (mips_cmp_map[cond] & MIPS_CMP_INV) {
             cond = tcg_invert_cond(cond);
             b_cond = TCG_COND_EQ;
@@ -810,7 +810,7 @@ static void tcg_out_movcond(TCGContext *s, TCGCond cond, TCGReg ret,
         break;
 
     default:
-        /* Minimize code size by prefering a compare not requiring INV.  */
+        /* Minimize code size by preferring a compare not requiring INV.  */
         if (mips_cmp_map[cond] & MIPS_CMP_INV) {
             cond = tcg_invert_cond(cond);
             m_opc = OPC_MOVZ;
tests/qemu-iotests/common.qemu +1 -1
index 918af31..ee7ebb4 100644
@@ -103,7 +103,7 @@ function _send_qemu_cmd()
         count=${qemu_cmd_repeat}
         use_error="no"
     fi
-    # This array element extraction is done to accomodate pathnames with spaces
+    # This array element extraction is done to accommodate pathnames with spaces
     cmd=${@: 1:${#@}-1}
     shift $(($# - 1))
 
translate-all.c +1 -1
index 5425d03..8f7e11b 100644
@@ -594,7 +594,7 @@ static inline void *alloc_code_gen_buffer(void)
 
 #ifdef __mips__
     if (cross_256mb(buf, tcg_ctx.code_gen_buffer_size)) {
-        /* Try again, with the original still mapped, to avoid re-aquiring
+        /* Try again, with the original still mapped, to avoid re-acquiring
            that 256mb crossing.  This time don't specify an address.  */
         size_t size2, size1 = tcg_ctx.code_gen_buffer_size;
         void *buf2 = mmap(NULL, size1, PROT_WRITE | PROT_READ | PROT_EXEC,
Signature · 1 line
1.7.10.4
#2 lore raw

[Qemu-devel] [PULL 06/14] block.c: Remove useless 'buf' variable

In reply to Michael Tokarev

From: Chen Gang <[email protected]>

'buf' is not used actually, so remove it and related snprintf() statement.

---
 block.c |    2 --
 1 file changed, 2 deletions(-)
block.c +0 -2
index e6f9b71..217f523 100644
@@ -5581,7 +5581,6 @@ void bdrv_img_create(const char *filename, const char *fmt,
         if (backing_file) {
             BlockDriverState *bs;
             uint64_t size;
-            char buf[32];
             int back_flags;
 
             /* backing files always opened read-only */
@@ -5602,7 +5601,6 @@ void bdrv_img_create(const char *filename, const char *fmt,
             bdrv_get_geometry(bs, &size);
             size *= 512;
 
-            snprintf(buf, sizeof(buf), "%" PRId64, size);
             qemu_opt_set_number(opts, BLOCK_OPT_SIZE, size);
 
             bdrv_unref(bs);
Signature · 1 line
1.7.10.4
#3 lore raw

[Qemu-devel] [PULL 01/14] virtio-serial: remove useless set_config function

In reply to Michael Tokarev

From: Paolo Bonzini <[email protected]>

Its only contents are a dead memcpy. Since it is optional, drop the function altogether.

---
 hw/char/virtio-serial-bus.c |    8 --------
 1 file changed, 8 deletions(-)
hw/char/virtio-serial-bus.c +0 -8
index 2b647b6..a2958ff 100644
@@ -465,13 +465,6 @@ static void get_config(VirtIODevice *vdev, uint8_t *config_data)
     memcpy(config_data, &vser->config, sizeof(struct virtio_console_config));
 }
 
-static void set_config(VirtIODevice *vdev, const uint8_t *config_data)
-{
-    struct virtio_console_config config;
-
-    memcpy(&config, config_data, sizeof(config));
-}
-
 static void guest_reset(VirtIOSerial *vser)
 {
     VirtIOSerialPort *port;
@@ -1024,7 +1017,6 @@ static void virtio_serial_class_init(ObjectClass *klass, void *data)
     vdc->unrealize = virtio_serial_device_unrealize;
     vdc->get_features = get_features;
     vdc->get_config = get_config;
-    vdc->set_config = set_config;
     vdc->set_status = set_status;
     vdc->reset = vser_reset;
 }
Signature · 1 line
1.7.10.4
#4 lore raw

[Qemu-devel] [PULL 03/14] configure: Enable TPM by default, add --disable-tpm

In reply to Michael Tokarev

From: Cole Robinson <[email protected]>

I don't see why tpm is disabled by default: it doesn't have any external dependencies, or change default behavior. Leaving it disabled is just going to cause it to bit rot.

Enable it by default, and add a --disable-tpm option.

---
 configure |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
configure +4 -1
index 9c1471e..7102964 100755
@@ -330,7 +330,7 @@ virtio_blk_data_plane=""
 gtk=""
 gtkabi=""
 vte=""
-tpm="no"
+tpm="yes"
 libssh2=""
 vhdx=""
 quorum=""
@@ -1105,6 +1105,8 @@ for opt do
   ;;
   --enable-vte) vte="yes"
   ;;
+  --disable-tpm) tpm="no"
+  ;;
   --enable-tpm) tpm="yes"
   ;;
   --disable-libssh2) libssh2="no"
@@ -1382,6 +1384,7 @@ Advanced options (experts only):
   --disable-glusterfs      disable GlusterFS backend
   --enable-gcov            enable test coverage analysis with gcov
   --gcov=GCOV              use specified gcov [$gcov_tool]
+  --disable-tpm            disable TPM support
   --enable-tpm             enable TPM support
   --disable-libssh2        disable ssh block device support
   --enable-libssh2         enable ssh block device support
Signature · 1 line
1.7.10.4
#5 lore raw

[Qemu-devel] [PULL 07/14] rng-random: NULL check not needed before g_free()

In reply to Michael Tokarev

From: Eduardo Habkost <[email protected]>

g_free() is NULL-safe.

---
 backends/rng-random.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
backends/rng-random.c +1 -4
index 136499d..601d9dc 100644
@@ -106,10 +106,7 @@ static void rng_random_set_filename(Object *obj, const char *filename,
         return;
     }
 
-    if (s->filename) {
-        g_free(s->filename);
-    }
-
+    g_free(s->filename);
     s->filename = g_strdup(filename);
 }
 
Signature · 1 line
1.7.10.4
#6 lore raw

[Qemu-devel] [PULL 14/14] Add support for the arm breakpoint syscall

In reply to Michael Tokarev

From: Hunter Laux <[email protected]>

OABI arm used a software interrupt(0xef9f0001) for breakpoints. Since 2005 gdb has used the break instruction(0xe7f001f0) for EABI. Apparently Steel Bank Common Lisp still uses the swi instruction.

This is the kernel implementation:
http://lxr.free-electrons.com/source/arch/arm/kernel/traps.c#L598

---
 linux-user/arm/syscall.h |    1 +
 linux-user/main.c        |    4 ++++
 2 files changed, 5 insertions(+)
linux-user/arm/syscall.h +1 -0
index ce2c2a8..e0d2cc3 100644
@@ -29,6 +29,7 @@ struct target_pt_regs {
 #define ARM_THUMB_SYSCALL	0
 
 #define ARM_NR_BASE	  0xf0000
+#define ARM_NR_breakpoint (ARM_NR_BASE + 1)
 #define ARM_NR_cacheflush (ARM_NR_BASE + 2)
 #define ARM_NR_set_tls	  (ARM_NR_BASE + 5)
 
linux-user/main.c +4 -0
index df1bb0e..900a17f 100644
@@ -806,6 +806,9 @@ void cpu_loop(CPUARMState *env)
                             cpu_set_tls(env, env->regs[0]);
                             env->regs[0] = 0;
                             break;
+                        case ARM_NR_breakpoint:
+                            env->regs[15] -= env->thumb ? 2 : 4;
+                            goto excp_debug;
                         default:
                             gemu_log("qemu: Unsupported ARM syscall: 0x%x\n",
                                      n);
@@ -849,6 +852,7 @@ void cpu_loop(CPUARMState *env)
             }
             break;
         case EXCP_DEBUG:
+        excp_debug:
             {
                 int sig;
 
Signature · 1 line
1.7.10.4
#7 lore raw

[Qemu-devel] [PULL 12/14] target-s390x: Remove unused ld_code6() function

In reply to Michael Tokarev

From: Peter Maydell <[email protected]>

The ld_code6() function is unused; remove it.

---
 target-s390x/translate.c |    5 -----
 1 file changed, 5 deletions(-)
target-s390x/translate.c +0 -5
index 8ca4824..e2a1d05 100644
@@ -264,11 +264,6 @@ static inline uint64_t ld_code4(CPUS390XState *env, uint64_t pc)
     return (uint64_t)(uint32_t)cpu_ldl_code(env, pc);
 }
 
-static inline uint64_t ld_code6(CPUS390XState *env, uint64_t pc)
-{
-    return (ld_code2(env, pc) << 32) | ld_code4(env, pc + 2);
-}
-
 static int get_mem_index(DisasContext *s)
 {
     switch (s->tb->flags & FLAG_MASK_ASC) {
Signature · 1 line
1.7.10.4
#8 lore raw

[Qemu-devel] [PULL 13/14] Increase maximum number of session of the internal TFTP server.

In reply to Michael Tokarev

From: Bernhard Übelacker <[email protected]>

Grub fails to boot from internal TFTP server when loading more than 3 initrd files.

Grub first opens a session to the TFTP server for every initrd file and retrieves only the file size for all.
Then it wants to download the content using the old sessions which are already expired.

Increasing the maximum number of session of the internal TFTP server avoids this issue.

The error message reads as following:
error: timeout reading
`/boot/ISO.ROOT/BOOTMGR'.

Press any key to continue...

---
 slirp/tftp.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
slirp/tftp.h +1 -1
index 87adeb5..e1cc24b 100644
@@ -2,7 +2,7 @@
 #ifndef SLIRP_TFTP_H
 #define SLIRP_TFTP_H 1
 
-#define TFTP_SESSIONS_MAX 3
+#define TFTP_SESSIONS_MAX 20
 
 #define TFTP_SERVER	69
 
Signature · 1 line
1.7.10.4
#9 lore raw

[Qemu-devel] [PULL 08/14] tcg: mark tcg_out* and tcg_patch* with attribute 'unused'

In reply to Michael Tokarev

From: Peter Maydell <[email protected]>

The tcg_out* and tcg_patch* functions are utility routines that may or may not be used by a particular backend; mark them with the 'unused' attribute to suppress spurious warnings if they aren't used.

---
 tcg/tcg.c |   20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
tcg/tcg.c +12 -8
index 815eec1..c068990 100644
@@ -124,19 +124,20 @@ static TCGRegSet tcg_target_available_regs[2];
 static TCGRegSet tcg_target_call_clobber_regs;
 
 #if TCG_TARGET_INSN_UNIT_SIZE == 1
-static inline void tcg_out8(TCGContext *s, uint8_t v)
+static __attribute__((unused)) inline void tcg_out8(TCGContext *s, uint8_t v)
 {
     *s->code_ptr++ = v;
 }
 
-static inline void tcg_patch8(tcg_insn_unit *p, uint8_t v)
+static __attribute__((unused)) inline void tcg_patch8(tcg_insn_unit *p,
+                                                      uint8_t v)
 {
     *p = v;
 }
 #endif
 
 #if TCG_TARGET_INSN_UNIT_SIZE <= 2
-static inline void tcg_out16(TCGContext *s, uint16_t v)
+static __attribute__((unused)) inline void tcg_out16(TCGContext *s, uint16_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 2) {
         *s->code_ptr++ = v;
@@ -147,7 +148,8 @@ static inline void tcg_out16(TCGContext *s, uint16_t v)
     }
 }
 
-static inline void tcg_patch16(tcg_insn_unit *p, uint16_t v)
+static __attribute__((unused)) inline void tcg_patch16(tcg_insn_unit *p,
+                                                       uint16_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 2) {
         *p = v;
@@ -158,7 +160,7 @@ static inline void tcg_patch16(tcg_insn_unit *p, uint16_t v)
 #endif
 
 #if TCG_TARGET_INSN_UNIT_SIZE <= 4
-static inline void tcg_out32(TCGContext *s, uint32_t v)
+static __attribute__((unused)) inline void tcg_out32(TCGContext *s, uint32_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 4) {
         *s->code_ptr++ = v;
@@ -169,7 +171,8 @@ static inline void tcg_out32(TCGContext *s, uint32_t v)
     }
 }
 
-static inline void tcg_patch32(tcg_insn_unit *p, uint32_t v)
+static __attribute__((unused)) inline void tcg_patch32(tcg_insn_unit *p,
+                                                       uint32_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 4) {
         *p = v;
@@ -180,7 +183,7 @@ static inline void tcg_patch32(tcg_insn_unit *p, uint32_t v)
 #endif
 
 #if TCG_TARGET_INSN_UNIT_SIZE <= 8
-static inline void tcg_out64(TCGContext *s, uint64_t v)
+static __attribute__((unused)) inline void tcg_out64(TCGContext *s, uint64_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 8) {
         *s->code_ptr++ = v;
@@ -191,7 +194,8 @@ static inline void tcg_out64(TCGContext *s, uint64_t v)
     }
 }
 
-static inline void tcg_patch64(tcg_insn_unit *p, uint64_t v)
+static __attribute__((unused)) inline void tcg_patch64(tcg_insn_unit *p,
+                                                       uint64_t v)
 {
     if (TCG_TARGET_INSN_UNIT_SIZE == 8) {
         *p = v;
Signature · 1 line
1.7.10.4
#10 lore raw

[Qemu-devel] [PULL 10/14] target-unicore: Remove unused functions

In reply to Michael Tokarev

From: Peter Maydell <[email protected]>

The functions gen_st64, gen_ld64, gen_mulxy, ucf64_itod and ucf64_dtoi are all unused; remove them.

---
 target-unicore32/translate.c    |   28 ----------------------------
 target-unicore32/ucf64_helper.c |   22 ----------------------
 2 files changed, 50 deletions(-)
target-unicore32/translate.c +0 -28
index 5a8c7c8..e3643c2 100644
@@ -576,13 +576,6 @@ static inline TCGv gen_ld32(TCGv addr, int index)
     return tmp;
 }
 
-static inline TCGv_i64 gen_ld64(TCGv addr, int index)
-{
-    TCGv_i64 tmp = tcg_temp_new_i64();
-    tcg_gen_qemu_ld64(tmp, addr, index);
-    return tmp;
-}
-
 static inline void gen_st8(TCGv val, TCGv addr, int index)
 {
     tcg_gen_qemu_st8(val, addr, index);
@@ -601,12 +594,6 @@ static inline void gen_st32(TCGv val, TCGv addr, int index)
     dead_tmp(val);
 }
 
-static inline void gen_st64(TCGv_i64 val, TCGv addr, int index)
-{
-    tcg_gen_qemu_st64(val, addr, index);
-    tcg_temp_free_i64(val);
-}
-
 static inline void gen_set_pc_im(uint32_t val)
 {
     tcg_gen_movi_i32(cpu_R[31], val);
@@ -1128,21 +1115,6 @@ static inline void gen_jmp(DisasContext *s, uint32_t dest)
     }
 }
 
-static inline void gen_mulxy(TCGv t0, TCGv t1, int x, int y)
-{
-    if (x) {
-        tcg_gen_sari_i32(t0, t0, 16);
-    } else {
-        gen_sxth(t0);
-    }
-    if (y) {
-        tcg_gen_sari_i32(t1, t1, 16);
-    } else {
-        gen_sxth(t1);
-    }
-    tcg_gen_mul_i32(t0, t0, t1);
-}
-
 /* Returns nonzero if access to the PSR is not permitted. Marks t0 as dead. */
 static int gen_set_psr(DisasContext *s, uint32_t mask, int bsr, TCGv t0)
 {
target-unicore32/ucf64_helper.c +0 -22
index 0c7ea26..5af008f 100644
@@ -290,28 +290,6 @@ static inline uint32_t ucf64_stoi(float32 s)
     return v.i;
 }
 
-static inline float64 ucf64_itod(uint64_t i)
-{
-    union {
-        uint64_t i;
-        float64 d;
-    } v;
-
-    v.i = i;
-    return v.d;
-}
-
-static inline uint64_t ucf64_dtoi(float64 d)
-{
-    union {
-        uint64_t i;
-        float64 d;
-    } v;
-
-    v.d = d;
-    return v.i;
-}
-
 /* Integer to float conversion.  */
 float32 HELPER(ucf64_si2sf)(float32 x, CPUUniCore32State *env)
 {
Signature · 1 line
1.7.10.4
#11 lore raw

[Qemu-devel] [PULL 05/14] vscclient: Add required headers to fix build on FreeBSD

In reply to Michael Tokarev

From: Ed Maste <[email protected]>

---
 libcacard/vscclient.c |    2 ++
 1 file changed, 2 insertions(+)
libcacard/vscclient.c +2 -0
index ab9b2b8..80111df 100644
@@ -11,6 +11,8 @@
  */
 
 #ifndef _WIN32
+#include <sys/socket.h>
+#include <netinet/in.h>
 #include <netdb.h>
 #define closesocket(x) close(x)
 #endif
Signature · 1 line
1.7.10.4
#12 lore raw

[Qemu-devel] [PULL 09/14] build-sys: introduce install-prog macro to install&strip binaries and use it

In reply to Michael Tokarev

Use common rule (macro) to install and strip binaries, and use it in all places where we install binaries, instead of fixing bugs like 1319493 in every place.
(This fixes https://bugs.launchpad.net/bugs/1319493)

---
 Makefile        |   12 ++----------
 Makefile.target |    5 +----
 rules.mak       |    7 +++++++
 3 files changed, 10 insertions(+), 14 deletions(-)
Makefile +2 -10
index 7d0c8ec..145adb6 100644
@@ -385,12 +385,8 @@ install-sysconfig: install-datadir install-confdir
 
 install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \
 install-datadir install-localstatedir
-	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
 ifneq ($(TOOLS),)
-	$(INSTALL_PROG) $(TOOLS) "$(DESTDIR)$(bindir)"
-ifneq ($(STRIP),)
-	$(STRIP) $(TOOLS:%="$(DESTDIR)$(bindir)/%")
-endif
+	$(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
 endif
 ifneq ($(CONFIG_MODULES),)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_moddir)"
@@ -401,11 +397,7 @@ ifneq ($(CONFIG_MODULES),)
 	done
 endif
 ifneq ($(HELPERS-y),)
-	$(INSTALL_DIR) "$(DESTDIR)$(libexecdir)"
-	$(INSTALL_PROG) $(HELPERS-y) "$(DESTDIR)$(libexecdir)"
-ifneq ($(STRIP),)
-	$(STRIP) $(HELPERS-y:%="$(DESTDIR)$(libexecdir)/%")
-endif
+	$(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir))
 endif
 ifneq ($(BLOBS),)
 	set -e; for x in $(BLOBS); do \
Makefile.target +1 -4
index fc5827c..6089d29 100644
@@ -190,10 +190,7 @@ endif
 
 install: all
 ifneq ($(PROGS),)
-	$(INSTALL_PROG) $(PROGS) "$(DESTDIR)$(bindir)"
-ifneq ($(STRIP),)
-	$(STRIP) $(PROGS:%="$(DESTDIR)$(bindir)/%")
-endif
+	$(call install-prog,$(PROGS),$(DESTDIR)$(bindir))
 endif
 ifdef CONFIG_TRACE_SYSTEMTAP
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
rules.mak +7 -0
index 945484e..ba2f4c1 100644
@@ -101,6 +101,13 @@ cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
 VPATH_SUFFIXES = %.c %.h %.S %.cc %.cpp %.m %.mak %.texi %.sh %.rc
 set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))
 
+# install-prog list, dir
+define install-prog
+	$(INSTALL_DIR) "$2"
+	$(INSTALL_PROG) $1 "$2"
+	$(if $(STRIP),$(STRIP) $(foreach T,$1,"$2/$(notdir $T)"),)
+endef
+
 # find-in-path
 # Usage: $(call find-in-path, prog)
 # Looks in the PATH if the argument contains no slash, else only considers one
Signature · 1 line
1.7.10.4
#13 lore raw

[Qemu-devel] [PULL 04/14] target-ppc: Fix compiler warning

In reply to Michael Tokarev

From: Stefan Weil <[email protected]>

gcc reports a warning which is usually wrong:

target-ppc/dfp_helper.c: In function ‘dfp_get_digit’:
target-ppc/dfp_helper.c:417:1: warning:
control reaches end of non-void function [-Wreturn-type]

The compiler shows the warning if assert is not marked with the noreturn attribute or if the code is compiled with -DNDEBUG.

Using g_assert_not_reached better documents the intention and does not have these problems.

---
 target-ppc/dfp_helper.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
target-ppc/dfp_helper.c +1 -2
index 773803a..49820bf 100644
@@ -411,9 +411,8 @@ static inline int dfp_get_digit(decNumber *dn, int n)
         return (dn->lsu[unit] / 10) % 10;
     case 2:
         return dn->lsu[unit] / 100;
-    default:
-        assert(0);
     }
+    g_assert_not_reached();
 }
 
 #define DFP_HELPER_TAB(op, dnop, postprocs, size)                              \
Signature · 1 line
1.7.10.4
#14 lore raw

[Qemu-devel] [PULL 11/14] hw/moxie/moxiesim.c: Remove unused moxie_intc_create()

In reply to Michael Tokarev

From: Peter Maydell <[email protected]>

The function moxie_intc_create() is unused; remove it.

---
 hw/moxie/moxiesim.c |   13 -------------
 1 file changed, 13 deletions(-)
hw/moxie/moxiesim.c +0 -13
index f4357cf..430f841 100644
@@ -94,19 +94,6 @@ static void main_cpu_reset(void *opaque)
     cpu_reset(CPU(cpu));
 }
 
-static inline DeviceState *
-moxie_intc_create(hwaddr base, qemu_irq irq, int kind_of_intr)
-{
-    DeviceState *dev;
-
-    dev = qdev_create(NULL, "moxie,intc");
-    qdev_prop_set_uint32(dev, "kind-of-intr", kind_of_intr);
-    qdev_init_nofail(dev);
-    sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
-    sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq);
-    return dev;
-}
-
 static void moxiesim_init(MachineState *machine)
 {
     MoxieCPU *cpu = NULL;
Signature · 1 line
1.7.10.4
#15 lore raw
In reply to Michael Tokarev
Quoted 18 lines · Michael Tokarev

Here's another pull request for the trivial patches queue.

Nothing exciting, but it contains some bugfixes. For example, a build fix for FreeBSD by Ed Maste.

Please consider pulling/applying.

Thanks,

/mjt

The following changes since commit 513d80edc15d77b6d85df7dfad750ce95d091b78:

Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20140623' into staging (2014-06-24 15:33:42 +0100)

are available in the git repository at:

Quoted 9 lines

git://git.corpit.ru/qemu.git tags/trivial-patches-2014-06-24

for you to fetch changes up to d535508793a8e9389379543ef8d506e50c10cf67:

Add support for the arm breakpoint syscall (2014-06-24 20:01:24 +0400)

----------------------------------------------------------------
trivial patches for 2014-06-24

Applied, thanks.

-- PMM