trivial patches pull request 20220118

Fix comments and typos
 Add vmstate for ETRAX timers
 Use ldst in megasas
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmHmslQSHGxhdXJlbnRA
 dml2aWVyLmV1AAoJEPMMOL0/L748Q3wQAJ05K2z2dxGbK/25gMiZxT7CajTLKIz6
 nuHDz7GRFCNPsKZJbwOkBqVX+S6cDk9Du6zzUmD7lP9RDyAi8yqy2Au8oEyMmpWC
 hGRY8TUJRoyc33c4ND2SfmyIYQF5Hl477C05o+YnQogjqVN1RfXvukuRl97LxsCr
 9VP2Z1n5ykfb/CAUt52P2oXDCgPohw9EA3lPgKz1b/qBmgYbvnhlMzNmw9nOJkNb
 2WtIBDzWORcRCjIMbfkEJOuAVMKGXor8fw1qfFCMF9UggHDT+BYhScKp1hL1LNcp
 qe5X3+FvlU4hR0c3WID/3xVrnkHYRa/BurpdG1O+4tku8DlItX2GgpQyhFheLTV+
 JGl2yRY2j/8VBq50DhqUxH9NTMQ1nhVeVbQRxCXhGT4qrFwRxa421IwA+EXh4ALw
 k25kHsOGcOheR+pz489ZIfqBYlNnOjxLmp4gJKWuIWKStBbzpUjgJ0QRHcGyFcHy
 +tb4sJsGa8O1EcjrnIsVEwrQnupY7M26UqOghsYwMNkj8pXFQC8EkDPzkxZM5MlZ
 Zf5JGnMw8nBqvNwmagY+YNbOAXwxS0vDQUbBsEjjCuBCq6XeThPnfc/G/8dTsB6Y
 hYZBtOSdGBVRof3+VXDYRg9uLRgfmD26Cxg5l9qz2GqjLE9QMCb+Yuy07E4lISD7
 AzqUKof59Cdt
 =0iuX
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/lvivier-gitlab/tags/trivial-branch-for-7.0-pull-request' into staging

trivial patches pull request 20220118

Fix comments and typos
Add vmstate for ETRAX timers
Use ldst in megasas

# gpg: Signature made Tue 18 Jan 2022 12:28:04 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/lvivier-gitlab/tags/trivial-branch-for-7.0-pull-request:
  linux-user: Remove MAX_SIGQUEUE_SIZE
  linux-user: Return void from queue_signal()
  linux-user: Rename user_force_sig tracepoint to match function name
  linux-user: Fix comment typo in arm cpu_loop code
  softmmu: Provide a clue as to why device tree loading failed
  tests: Fix typo in check-help output
  qdev-core.h: Fix wrongly named reference to TYPE_SPLIT_IRQ
  hw/scsi/megasas: Simplify using the ldst API
  hw/timer/etraxfs_timer: Add vmstate for ETRAX timers

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
staging
Peter Maydell 2022-01-18 22:27:13 +00:00
commit dea52c223b
10 changed files with 50 additions and 30 deletions

View File

@ -383,8 +383,7 @@ static int megasas_setup_inquiry(uint8_t *cdb, int pg, int len)
cdb[1] = 0x1;
cdb[2] = pg;
}
cdb[3] = (len >> 8) & 0xff;
cdb[4] = (len & 0xff);
stw_be_p(&cdb[3], len);
return len;
}
@ -400,18 +399,8 @@ static void megasas_encode_lba(uint8_t *cdb, uint64_t lba,
} else {
cdb[0] = READ_16;
}
cdb[2] = (lba >> 56) & 0xff;
cdb[3] = (lba >> 48) & 0xff;
cdb[4] = (lba >> 40) & 0xff;
cdb[5] = (lba >> 32) & 0xff;
cdb[6] = (lba >> 24) & 0xff;
cdb[7] = (lba >> 16) & 0xff;
cdb[8] = (lba >> 8) & 0xff;
cdb[9] = (lba) & 0xff;
cdb[10] = (len >> 24) & 0xff;
cdb[11] = (len >> 16) & 0xff;
cdb[12] = (len >> 8) & 0xff;
cdb[13] = (len) & 0xff;
stq_be_p(&cdb[2], lba);
stl_be_p(&cdb[2 + 8], len);
}
/*

View File

@ -26,6 +26,7 @@
#include "hw/sysbus.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "qemu/timer.h"
#include "hw/irq.h"
@ -64,7 +65,7 @@ struct ETRAXTimerState {
ptimer_state *ptimer_t1;
ptimer_state *ptimer_wd;
int wd_hits;
uint32_t wd_hits;
/* Control registers. */
uint32_t rw_tmr0_div;
@ -83,6 +84,36 @@ struct ETRAXTimerState {
uint32_t r_masked_intr;
};
static const VMStateDescription vmstate_etraxfs = {
.name = "etraxfs",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
VMSTATE_PTIMER(ptimer_t0, ETRAXTimerState),
VMSTATE_PTIMER(ptimer_t1, ETRAXTimerState),
VMSTATE_PTIMER(ptimer_wd, ETRAXTimerState),
VMSTATE_UINT32(wd_hits, ETRAXTimerState),
VMSTATE_UINT32(rw_tmr0_div, ETRAXTimerState),
VMSTATE_UINT32(r_tmr0_data, ETRAXTimerState),
VMSTATE_UINT32(rw_tmr0_ctrl, ETRAXTimerState),
VMSTATE_UINT32(rw_tmr1_div, ETRAXTimerState),
VMSTATE_UINT32(r_tmr1_data, ETRAXTimerState),
VMSTATE_UINT32(rw_tmr1_ctrl, ETRAXTimerState),
VMSTATE_UINT32(rw_wd_ctrl, ETRAXTimerState),
VMSTATE_UINT32(rw_intr_mask, ETRAXTimerState),
VMSTATE_UINT32(rw_ack_intr, ETRAXTimerState),
VMSTATE_UINT32(r_intr, ETRAXTimerState),
VMSTATE_UINT32(r_masked_intr, ETRAXTimerState),
VMSTATE_END_OF_LIST()
}
};
static uint64_t
timer_read(void *opaque, hwaddr addr, unsigned int size)
{
@ -357,6 +388,7 @@ static void etraxfs_timer_class_init(ObjectClass *klass, void *data)
ResettableClass *rc = RESETTABLE_CLASS(klass);
dc->realize = etraxfs_timer_realize;
dc->vmsd = &vmstate_etraxfs;
rc->phases.enter = etraxfs_timer_reset_enter;
rc->phases.hold = etraxfs_timer_reset_hold;
}

View File

@ -493,7 +493,7 @@ qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const char *name, int n);
* qemu_irqs at once, or to connect multiple outbound GPIOs to the
* same qemu_irq. (Warning: there is no assertion or other guard to
* catch this error: the model will just not do the right thing.)
* Instead, for fan-out you can use the TYPE_IRQ_SPLIT device: connect
* Instead, for fan-out you can use the TYPE_SPLIT_IRQ device: connect
* a device's outbound GPIO to the splitter's input, and connect each
* of the splitter's outputs to a different device. For fan-in you
* can use the TYPE_OR_IRQ device, which is a model of a logical OR

View File

@ -434,8 +434,8 @@ void cpu_loop(CPUARMState *env)
case 0x6: /* Access flag fault, level 2 */
case 0x9: /* Domain fault, level 1 */
case 0xb: /* Domain fault, level 2 */
case 0xd: /* Permision fault, level 1 */
case 0xf: /* Permision fault, level 2 */
case 0xd: /* Permission fault, level 1 */
case 0xf: /* Permission fault, level 2 */
si_signo = TARGET_SIGSEGV;
si_code = TARGET_SEGV_ACCERR;
break;

View File

@ -89,8 +89,6 @@ struct vm86_saved_state {
#include "nwfpe/fpa11.h"
#endif
#define MAX_SIGQUEUE_SIZE 1024
struct emulated_sigtable {
int pending; /* true if signal is pending */
target_siginfo_t info;

View File

@ -59,8 +59,8 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
void process_pending_signals(CPUArchState *cpu_env);
void signal_init(void);
int queue_signal(CPUArchState *env, int sig, int si_type,
target_siginfo_t *info);
void queue_signal(CPUArchState *env, int sig, int si_type,
target_siginfo_t *info);
void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info);
void target_to_host_siginfo(siginfo_t *info, const target_siginfo_t *tinfo);
int target_to_host_signal(int sig);

View File

@ -734,7 +734,7 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig)
struct sigaction act;
host_sig = target_to_host_signal(target_sig);
trace_user_force_sig(env, target_sig, host_sig);
trace_user_dump_core_and_abort(env, target_sig, host_sig);
gdb_signalled(env, target_sig);
/* dump core if supported by target binary format */
@ -780,8 +780,8 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig)
/* queue a signal so that it will be send to the virtual CPU as soon
as possible */
int queue_signal(CPUArchState *env, int sig, int si_type,
target_siginfo_t *info)
void queue_signal(CPUArchState *env, int sig, int si_type,
target_siginfo_t *info)
{
CPUState *cpu = env_cpu(env);
TaskState *ts = cpu->opaque;
@ -794,7 +794,6 @@ int queue_signal(CPUArchState *env, int sig, int si_type,
ts->sync_signal.pending = sig;
/* signal that a new signal is pending */
qatomic_set(&ts->signal_pending, 1);
return 1; /* indicates that the signal was queued */
}

View File

@ -9,7 +9,7 @@ user_setup_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=0x%"PRIx64
user_setup_rt_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=0x%"PRIx64
user_do_rt_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=0x%"PRIx64
user_do_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=0x%"PRIx64
user_force_sig(void *env, int target_sig, int host_sig) "env=%p signal %d (host %d)"
user_dump_core_and_abort(void *env, int target_sig, int host_sig) "env=%p signal %d (host %d)"
user_handle_signal(void *env, int target_sig) "env=%p signal %d"
user_host_signal(void *env, int host_sig, int target_sig) "env=%p signal %d (target %d)"
user_queue_signal(void *env, int target_sig) "env=%p signal %d"

View File

@ -60,7 +60,8 @@ void *create_device_tree(int *sizep)
}
ret = fdt_open_into(fdt, fdt, *sizep);
if (ret) {
error_report("Unable to copy device tree in memory");
error_report("%s: Unable to copy device tree into memory: %s",
__func__, fdt_strerror(ret));
exit(1);
}
@ -104,7 +105,8 @@ void *load_device_tree(const char *filename_path, int *sizep)
ret = fdt_open_into(fdt, fdt, dt_size);
if (ret) {
error_report("Unable to copy device tree in memory");
error_report("%s: Unable to copy device tree into memory: %s",
__func__, fdt_strerror(ret));
goto fail;
}

View File

@ -23,7 +23,7 @@ endif
@echo " $(MAKE) check-clean Clean the tests and related data"
@echo
@echo "The following are useful for CI builds"
@echo " $(MAKE) check-build Build most test binaris"
@echo " $(MAKE) check-build Build most test binaries"
@echo " $(MAKE) get-vm-images Downloads all images used by avocado tests, according to configured targets (~350 MB each, 1.5 GB max)"
@echo
@echo