From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH for-11.0 6/7] hw/arm/omap1: Remove omap_badwidth_write* calls
Date: Wed, 10 Dec 2025 18:36:59 +0000 [thread overview]
Message-ID: <20251210183700.3446237-7-peter.maydell@linaro.org> (raw)
In-Reply-To: <20251210183700.3446237-1-peter.maydell@linaro.org>
Complete the conversion started in the previous commit by
changing all the omap_badwidth_write* calls to open-coded
log-and-ignore behaviour.
We can delete a FIXME comment about an infinite loop, because that
only looped infinitely back before 2011 when the device was still
using absolute physical addresses. Now that we are simply logging
the error we can clearly see that there's no loop.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/arm/omap1.c | 64 +++++++++++++++++++++++++++++++++-----------------
1 file changed, 42 insertions(+), 22 deletions(-)
diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c
index a187672897e..cfa4e1f677c 100644
--- a/hw/arm/omap1.c
+++ b/hw/arm/omap1.c
@@ -234,7 +234,8 @@ static void omap_mpu_timer_write(void *opaque, hwaddr addr,
struct omap_mpu_timer_s *s = opaque;
if (size != 4) {
- omap_badwidth_write32(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -343,7 +344,8 @@ static void omap_wd_timer_write(void *opaque, hwaddr addr,
struct omap_watchdog_timer_s *s = opaque;
if (size != 2) {
- omap_badwidth_write16(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -471,7 +473,8 @@ static void omap_os_timer_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 4) {
- omap_badwidth_write32(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -618,7 +621,8 @@ static void omap_ulpd_pm_write(void *opaque, hwaddr addr,
uint16_t diff;
if (size != 2) {
- omap_badwidth_write16(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -893,7 +897,8 @@ static void omap_pin_cfg_write(void *opaque, hwaddr addr,
uint32_t diff;
if (size != 4) {
- omap_badwidth_write32(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -1051,7 +1056,8 @@ static void omap_id_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
if (size != 4) {
- omap_badwidth_write32(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -1123,7 +1129,8 @@ static void omap_mpui_write(void *opaque, hwaddr addr,
struct omap_mpu_state_s *s = opaque;
if (size != 4) {
- omap_badwidth_write32(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -1220,7 +1227,8 @@ static void omap_tipb_bridge_write(void *opaque, hwaddr addr,
struct omap_tipb_bridge_s *s = opaque;
if (size < 2) {
- omap_badwidth_write16(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -1331,7 +1339,8 @@ static void omap_tcmi_write(void *opaque, hwaddr addr,
struct omap_mpu_state_s *s = opaque;
if (size != 4) {
- omap_badwidth_write32(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -1429,7 +1438,8 @@ static void omap_dpll_write(void *opaque, hwaddr addr,
int div, mult;
if (size != 2) {
- omap_badwidth_write16(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -1702,7 +1712,8 @@ static void omap_clkm_write(void *opaque, hwaddr addr,
};
if (size != 2) {
- omap_badwidth_write16(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -1832,7 +1843,8 @@ static void omap_clkdsp_write(void *opaque, hwaddr addr,
uint16_t diff;
if (size != 2) {
- omap_badwidth_write16(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -2042,7 +2054,8 @@ static void omap_mpuio_write(void *opaque, hwaddr addr,
int ln;
if (size != 2) {
- omap_badwidth_write16(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -2267,7 +2280,8 @@ static void omap_uwire_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 2) {
- omap_badwidth_write16(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -2396,7 +2410,8 @@ static void omap_pwl_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 1) {
- omap_badwidth_write8(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -2493,7 +2508,8 @@ static void omap_pwt_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 1) {
- omap_badwidth_write8(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -2690,7 +2706,8 @@ static void omap_rtc_write(void *opaque, hwaddr addr,
time_t ti[2];
if (size != 1) {
- omap_badwidth_write8(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -3418,7 +3435,8 @@ static void omap_mcbsp_writew(void *opaque, hwaddr addr,
return;
}
- omap_badwidth_write16(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, 4);
}
static void omap_mcbsp_write(void *opaque, hwaddr addr,
@@ -3432,7 +3450,8 @@ static void omap_mcbsp_write(void *opaque, hwaddr addr,
omap_mcbsp_writew(opaque, addr, value);
break;
default:
- omap_badwidth_write16(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
}
}
@@ -3606,7 +3625,8 @@ static void omap_lpg_write(void *opaque, hwaddr addr,
int offset = addr & OMAP_MPUI_REG_MASK;
if (size != 1) {
- omap_badwidth_write8(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
return;
}
@@ -3680,8 +3700,8 @@ static uint64_t omap_mpui_io_read(void *opaque, hwaddr addr,
static void omap_mpui_io_write(void *opaque, hwaddr addr,
uint64_t value, unsigned size)
{
- /* FIXME: infinite loop */
- omap_badwidth_write16(opaque, addr, value);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: write at offset 0x%" HWADDR_PRIx
+ " with bad width %d\n", __func__, addr, size);
}
static const MemoryRegionOps omap_mpui_io_ops = {
--
2.43.0
next prev parent reply other threads:[~2025-12-10 18:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 18:36 [PATCH for-11.0 0/7] hw/arm/omap: Remove omap_badwidth_* functions Peter Maydell
2025-12-10 18:36 ` [PATCH for-11.0 1/7] hw/sd/omap_mmc: Remove omap_badwidth_* calls Peter Maydell
2025-12-10 18:36 ` [PATCH for-11.0 2/7] hw/i2c/omap_i2c: " Peter Maydell
2025-12-10 18:36 ` [PATCH for-11.0 3/7] hw/gpio/omap_gpio: " Peter Maydell
2025-12-10 18:36 ` [PATCH for-11.0 4/7] hw/dma/omap_dma: " Peter Maydell
2025-12-10 18:36 ` [PATCH for-11.0 5/7] hw/arm/omap1: Remove omap_badwidth_read* calls Peter Maydell
2025-12-10 18:36 ` Peter Maydell [this message]
2025-12-10 18:37 ` [PATCH for-11.0 7/7] hw/arm/omap1: Remove omap_badwidth_* implementations Peter Maydell
2025-12-11 15:18 ` [PATCH for-11.0 0/7] hw/arm/omap: Remove omap_badwidth_* functions Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251210183700.3446237-7-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).