diff options
| -rw-r--r-- | audio/audio.c | 2 | ||||
| -rw-r--r-- | chardev/char.c | 2 | ||||
| -rw-r--r-- | docs/system/arm/palm.rst | 2 | ||||
| -rw-r--r-- | docs/system/arm/xscale.rst | 2 | ||||
| -rw-r--r-- | docs/system/devices/can.rst | 6 | ||||
| -rw-r--r-- | hw/misc/edu.c | 2 | ||||
| -rw-r--r-- | hw/net/cadence_gem.c | 4 | ||||
| -rw-r--r-- | target/loongarch/meson.build | 15 | ||||
| -rw-r--r-- | target/loongarch/tcg/constant_timer.c (renamed from target/loongarch/constant_timer.c) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/csr_helper.c (renamed from target/loongarch/csr_helper.c) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/fpu_helper.c (renamed from target/loongarch/fpu_helper.c) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_arith.c.inc (renamed from target/loongarch/insn_trans/trans_arith.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_atomic.c.inc (renamed from target/loongarch/insn_trans/trans_atomic.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_bit.c.inc (renamed from target/loongarch/insn_trans/trans_bit.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_branch.c.inc (renamed from target/loongarch/insn_trans/trans_branch.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_extra.c.inc (renamed from target/loongarch/insn_trans/trans_extra.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_farith.c.inc (renamed from target/loongarch/insn_trans/trans_farith.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_fcmp.c.inc (renamed from target/loongarch/insn_trans/trans_fcmp.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_fcnv.c.inc (renamed from target/loongarch/insn_trans/trans_fcnv.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_fmemory.c.inc (renamed from target/loongarch/insn_trans/trans_fmemory.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_fmov.c.inc (renamed from target/loongarch/insn_trans/trans_fmov.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_memory.c.inc (renamed from target/loongarch/insn_trans/trans_memory.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_privileged.c.inc (renamed from target/loongarch/insn_trans/trans_privileged.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_shift.c.inc (renamed from target/loongarch/insn_trans/trans_shift.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/insn_trans/trans_vec.c.inc (renamed from target/loongarch/insn_trans/trans_vec.c.inc) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/iocsr_helper.c (renamed from target/loongarch/iocsr_helper.c) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/meson.build | 19 | ||||
| -rw-r--r-- | target/loongarch/tcg/op_helper.c (renamed from target/loongarch/op_helper.c) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/tlb_helper.c (renamed from target/loongarch/tlb_helper.c) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/translate.c (renamed from target/loongarch/translate.c) | 0 | ||||
| -rw-r--r-- | target/loongarch/tcg/vec_helper.c (renamed from target/loongarch/vec_helper.c) | 0 | ||||
| -rw-r--r-- | target/riscv/csr.c | 14 |
32 files changed, 37 insertions, 31 deletions
diff --git a/audio/audio.c b/audio/audio.c index a1097bb016..af0ae33fed 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1744,7 +1744,7 @@ static AudioState *audio_init(Audiodev *dev, Error **errp) if (driver) { done = !audio_driver_init(s, driver, dev, errp); } else { - error_setg(errp, "Unknown audio driver `%s'\n", drvname); + error_setg(errp, "Unknown audio driver `%s'", drvname); } if (!done) { goto out; diff --git a/chardev/char.c b/chardev/char.c index 996a024c7a..119b548784 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -518,7 +518,7 @@ static const ChardevClass *char_get_class(const char *driver, Error **errp) if (object_class_is_abstract(oc)) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "driver", - "an abstract device type"); + "a non-abstract device type"); return NULL; } diff --git a/docs/system/arm/palm.rst b/docs/system/arm/palm.rst index 47ff9b36d4..61bc8d34f4 100644 --- a/docs/system/arm/palm.rst +++ b/docs/system/arm/palm.rst @@ -14,7 +14,7 @@ following elements: - On-chip Real Time Clock - TI TSC2102i touchscreen controller / analog-digital converter / - Audio CODEC, connected through MicroWire and |I2S| busses + Audio CODEC, connected through MicroWire and |I2S| buses - GPIO-connected matrix keypad diff --git a/docs/system/arm/xscale.rst b/docs/system/arm/xscale.rst index d2d5949e10..e239136c3c 100644 --- a/docs/system/arm/xscale.rst +++ b/docs/system/arm/xscale.rst @@ -32,4 +32,4 @@ The clamshell PDA models emulation includes the following peripherals: - Three on-chip UARTs -- WM8750 audio CODEC on |I2C| and |I2S| busses +- WM8750 audio CODEC on |I2C| and |I2S| buses diff --git a/docs/system/devices/can.rst b/docs/system/devices/can.rst index 0af3d9912a..09121836fd 100644 --- a/docs/system/devices/can.rst +++ b/docs/system/devices/can.rst @@ -1,12 +1,12 @@ CAN Bus Emulation Support ========================= The CAN bus emulation provides mechanism to connect multiple -emulated CAN controller chips together by one or multiple CAN busses -(the controller device "canbus" parameter). The individual busses +emulated CAN controller chips together by one or multiple CAN buses +(the controller device "canbus" parameter). The individual buses can be connected to host system CAN API (at this time only Linux SocketCAN is supported). -The concept of busses is generic and different CAN controllers +The concept of buses is generic and different CAN controllers can be implemented. The initial submission implemented SJA1000 controller which diff --git a/hw/misc/edu.c b/hw/misc/edu.c index a1f8bc77e7..e64a246d3f 100644 --- a/hw/misc/edu.c +++ b/hw/misc/edu.c @@ -115,7 +115,7 @@ static void edu_check_range(uint64_t addr, uint64_t size1, uint64_t start, uint64_t end2 = start + size2; if (within(addr, start, end2) && - end1 > addr && within(end1, start, end2)) { + end1 > addr && end1 <= end2) { return; } diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index d7b7b134b0..ec7bf562e5 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -199,8 +199,8 @@ REG32(PHYMNTNC, 0x34) /* Phy Maintenance reg */ FIELD(PHYMNTNC, PHY_ADDR, 23, 5) FIELD(PHYMNTNC, OP, 28, 2) FIELD(PHYMNTNC, ST, 30, 2) -#define MDIO_OP_READ 0x3 -#define MDIO_OP_WRITE 0x2 +#define MDIO_OP_READ 0x2 +#define MDIO_OP_WRITE 0x1 REG32(RXPAUSE, 0x38) /* RX Pause Time reg */ REG32(TXPAUSE, 0x3c) /* TX Pause Time reg */ diff --git a/target/loongarch/meson.build b/target/loongarch/meson.build index 18e8191e2b..e84e4c51f4 100644 --- a/target/loongarch/meson.build +++ b/target/loongarch/meson.build @@ -3,31 +3,18 @@ gen = decodetree.process('insns.decode') loongarch_ss = ss.source_set() loongarch_ss.add(files( 'cpu.c', -)) -loongarch_tcg_ss = ss.source_set() -loongarch_tcg_ss.add(gen) -loongarch_tcg_ss.add(files( - 'fpu_helper.c', - 'op_helper.c', - 'translate.c', 'gdbstub.c', - 'vec_helper.c', )) -loongarch_tcg_ss.add(zlib) loongarch_system_ss = ss.source_set() loongarch_system_ss.add(files( 'loongarch-qmp-cmds.c', 'machine.c', - 'tlb_helper.c', - 'constant_timer.c', - 'csr_helper.c', - 'iocsr_helper.c', )) common_ss.add(when: 'CONFIG_LOONGARCH_DIS', if_true: [files('disas.c'), gen]) -loongarch_ss.add_all(when: 'CONFIG_TCG', if_true: [loongarch_tcg_ss]) +subdir('tcg') target_arch += {'loongarch': loongarch_ss} target_system_arch += {'loongarch': loongarch_system_ss} diff --git a/target/loongarch/constant_timer.c b/target/loongarch/tcg/constant_timer.c index 1851f53fd6..1851f53fd6 100644 --- a/target/loongarch/constant_timer.c +++ b/target/loongarch/tcg/constant_timer.c diff --git a/target/loongarch/csr_helper.c b/target/loongarch/tcg/csr_helper.c index 55341551a5..55341551a5 100644 --- a/target/loongarch/csr_helper.c +++ b/target/loongarch/tcg/csr_helper.c diff --git a/target/loongarch/fpu_helper.c b/target/loongarch/tcg/fpu_helper.c index f6753c5875..f6753c5875 100644 --- a/target/loongarch/fpu_helper.c +++ b/target/loongarch/tcg/fpu_helper.c diff --git a/target/loongarch/insn_trans/trans_arith.c.inc b/target/loongarch/tcg/insn_trans/trans_arith.c.inc index 2be057e932..2be057e932 100644 --- a/target/loongarch/insn_trans/trans_arith.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_arith.c.inc diff --git a/target/loongarch/insn_trans/trans_atomic.c.inc b/target/loongarch/tcg/insn_trans/trans_atomic.c.inc index 80c2e286fd..80c2e286fd 100644 --- a/target/loongarch/insn_trans/trans_atomic.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_atomic.c.inc diff --git a/target/loongarch/insn_trans/trans_bit.c.inc b/target/loongarch/tcg/insn_trans/trans_bit.c.inc index ee5fa003ce..ee5fa003ce 100644 --- a/target/loongarch/insn_trans/trans_bit.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_bit.c.inc diff --git a/target/loongarch/insn_trans/trans_branch.c.inc b/target/loongarch/tcg/insn_trans/trans_branch.c.inc index 221e5159db..221e5159db 100644 --- a/target/loongarch/insn_trans/trans_branch.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_branch.c.inc diff --git a/target/loongarch/insn_trans/trans_extra.c.inc b/target/loongarch/tcg/insn_trans/trans_extra.c.inc index cfa361fecf..cfa361fecf 100644 --- a/target/loongarch/insn_trans/trans_extra.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_extra.c.inc diff --git a/target/loongarch/insn_trans/trans_farith.c.inc b/target/loongarch/tcg/insn_trans/trans_farith.c.inc index f4a0dea727..f4a0dea727 100644 --- a/target/loongarch/insn_trans/trans_farith.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_farith.c.inc diff --git a/target/loongarch/insn_trans/trans_fcmp.c.inc b/target/loongarch/tcg/insn_trans/trans_fcmp.c.inc index 3babf69e4a..3babf69e4a 100644 --- a/target/loongarch/insn_trans/trans_fcmp.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_fcmp.c.inc diff --git a/target/loongarch/insn_trans/trans_fcnv.c.inc b/target/loongarch/tcg/insn_trans/trans_fcnv.c.inc index 833c059d6d..833c059d6d 100644 --- a/target/loongarch/insn_trans/trans_fcnv.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_fcnv.c.inc diff --git a/target/loongarch/insn_trans/trans_fmemory.c.inc b/target/loongarch/tcg/insn_trans/trans_fmemory.c.inc index 13452bc7e5..13452bc7e5 100644 --- a/target/loongarch/insn_trans/trans_fmemory.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_fmemory.c.inc diff --git a/target/loongarch/insn_trans/trans_fmov.c.inc b/target/loongarch/tcg/insn_trans/trans_fmov.c.inc index 5cbd9d3f34..5cbd9d3f34 100644 --- a/target/loongarch/insn_trans/trans_fmov.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_fmov.c.inc diff --git a/target/loongarch/insn_trans/trans_memory.c.inc b/target/loongarch/tcg/insn_trans/trans_memory.c.inc index 42f4e74012..42f4e74012 100644 --- a/target/loongarch/insn_trans/trans_memory.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_memory.c.inc diff --git a/target/loongarch/insn_trans/trans_privileged.c.inc b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc index 01d457212b..01d457212b 100644 --- a/target/loongarch/insn_trans/trans_privileged.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_privileged.c.inc diff --git a/target/loongarch/insn_trans/trans_shift.c.inc b/target/loongarch/tcg/insn_trans/trans_shift.c.inc index 2f4bd6ff28..2f4bd6ff28 100644 --- a/target/loongarch/insn_trans/trans_shift.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_shift.c.inc diff --git a/target/loongarch/insn_trans/trans_vec.c.inc b/target/loongarch/tcg/insn_trans/trans_vec.c.inc index 92b1d22e28..92b1d22e28 100644 --- a/target/loongarch/insn_trans/trans_vec.c.inc +++ b/target/loongarch/tcg/insn_trans/trans_vec.c.inc diff --git a/target/loongarch/iocsr_helper.c b/target/loongarch/tcg/iocsr_helper.c index 6cd01d5f09..6cd01d5f09 100644 --- a/target/loongarch/iocsr_helper.c +++ b/target/loongarch/tcg/iocsr_helper.c diff --git a/target/loongarch/tcg/meson.build b/target/loongarch/tcg/meson.build new file mode 100644 index 0000000000..bdf34f9673 --- /dev/null +++ b/target/loongarch/tcg/meson.build @@ -0,0 +1,19 @@ +if 'CONFIG_TCG' not in config_all_accel + subdir_done() +endif + +loongarch_ss.add([zlib, gen]) + +loongarch_ss.add(files( + 'fpu_helper.c', + 'op_helper.c', + 'translate.c', + 'vec_helper.c', +)) + +loongarch_system_ss.add(files( + 'constant_timer.c', + 'csr_helper.c', + 'iocsr_helper.c', + 'tlb_helper.c', +)) diff --git a/target/loongarch/op_helper.c b/target/loongarch/tcg/op_helper.c index fe79c62fa4..fe79c62fa4 100644 --- a/target/loongarch/op_helper.c +++ b/target/loongarch/tcg/op_helper.c diff --git a/target/loongarch/tlb_helper.c b/target/loongarch/tcg/tlb_helper.c index 449043c68b..449043c68b 100644 --- a/target/loongarch/tlb_helper.c +++ b/target/loongarch/tcg/tlb_helper.c diff --git a/target/loongarch/translate.c b/target/loongarch/tcg/translate.c index 21f4db6fbd..21f4db6fbd 100644 --- a/target/loongarch/translate.c +++ b/target/loongarch/tcg/translate.c diff --git a/target/loongarch/vec_helper.c b/target/loongarch/tcg/vec_helper.c index 3faf52cbc4..3faf52cbc4 100644 --- a/target/loongarch/vec_helper.c +++ b/target/loongarch/tcg/vec_helper.c diff --git a/target/riscv/csr.c b/target/riscv/csr.c index fde7ce1a53..c50a33397c 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -907,11 +907,11 @@ static int write_mhpmcounterh(CPURISCVState *env, int csrno, target_ulong val) static RISCVException riscv_pmu_read_ctr(CPURISCVState *env, target_ulong *val, bool upper_half, uint32_t ctr_idx) { - PMUCTRState counter = env->pmu_ctrs[ctr_idx]; - target_ulong ctr_prev = upper_half ? counter.mhpmcounterh_prev : - counter.mhpmcounter_prev; - target_ulong ctr_val = upper_half ? counter.mhpmcounterh_val : - counter.mhpmcounter_val; + PMUCTRState *counter = &env->pmu_ctrs[ctr_idx]; + target_ulong ctr_prev = upper_half ? counter->mhpmcounterh_prev : + counter->mhpmcounter_prev; + target_ulong ctr_val = upper_half ? counter->mhpmcounterh_val : + counter->mhpmcounter_val; if (get_field(env->mcountinhibit, BIT(ctr_idx))) { /* @@ -919,12 +919,12 @@ static RISCVException riscv_pmu_read_ctr(CPURISCVState *env, target_ulong *val, * stop the icount counting. Just return the counter value written by * the supervisor to indicate that counter was not incremented. */ - if (!counter.started) { + if (!counter->started) { *val = ctr_val; return RISCV_EXCP_NONE; } else { /* Mark that the counter has been stopped */ - counter.started = false; + counter->started = false; } } |