[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 36/40] misc: zynq_slcr: Fix MMIO writes
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 36/40] misc: zynq_slcr: Fix MMIO writes |
Date: |
Wed, 21 Oct 2015 12:52:06 -0500 |
From: Peter Crosthwaite <address@hidden>
The /4 for offset calculation in MMIO writes was happening twice giving
wrong write offsets. Fix.
While touching the code, change the if-else to be a short returning if
and convert the debug message to a GUEST_ERROR, which is more accurate
for this condition.
Cc: address@hidden
Cc: Guenter Roeck <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
(cherry picked from commit c209b0537203c58a051e5d837320335cea23e494)
Signed-off-by: Michael Roth <address@hidden>
---
hw/misc/zynq_slcr.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c
index 964f253..3d78708 100644
--- a/hw/misc/zynq_slcr.c
+++ b/hw/misc/zynq_slcr.c
@@ -393,12 +393,12 @@ static void zynq_slcr_write(void *opaque, hwaddr offset,
return;
}
- if (!s->regs[LOCKSTA]) {
- s->regs[offset / 4] = val;
- } else {
- DB_PRINT("SCLR registers are locked. Unlock them first\n");
+ if (s->regs[LOCKSTA]) {
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "SCLR registers are locked. Unlock them first\n");
return;
}
+ s->regs[offset] = val;
switch (offset) {
case PSS_RST_CTRL:
--
1.9.1
- [Qemu-devel] [PATCH 28/40] target-ppc: fix vcipher, vcipherlast, vncipherlast and vpermxor, (continued)
- [Qemu-devel] [PATCH 28/40] target-ppc: fix vcipher, vcipherlast, vncipherlast and vpermxor, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 29/40] target-ppc: fix xscmpodp and xscmpudp decoding, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 02/40] mirror: Fix coroutine reentrance, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 31/40] virtio-net: unbreak self announcement and guest offloads after migration, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 32/40] vmxnet3: Drop net_vmxnet3_info.can_receive, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 30/40] virtio: avoid leading underscores for helpers, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 35/40] Revert "qdev: Use qdev_get_device_class() for -device <type>, help", Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 33/40] qmp: Fix device-list-properties not to crash for abstract device, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 34/40] qdev: Protect device-list-properties against broken devices, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 37/40] s390x/kvm: Fix vector validity bit in device machine checks, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 36/40] misc: zynq_slcr: Fix MMIO writes,
Michael Roth <=
- [Qemu-devel] [PATCH 38/40] util/qemu-config: fix missing machine command line options, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 40/40] virtio-input: ignore events until the guest driver is ready, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 39/40] Migration: Generate the completed event only when we complete, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 04/40] block/iscsi: validate block size returned from target, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 03/40] target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdb, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 05/40] exec-all: Translate TCI return addresses backwards too, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 06/40] block/nfs: fix calculation of allocated file size, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 07/40] qemu-img: Fix crash in amend invocation, Michael Roth, 2015/10/21
- [Qemu-devel] [PATCH 08/40] mac_dbdma: always clear FLUSH bit once DBDMA channel flush is complete, Michael Roth, 2015/10/21
- Message not available