aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-03-26 15:50:29 +0000
committerPeter Maydell <peter.maydell@linaro.org>2024-03-26 15:50:29 +0000
commit38a23eb35c4799d6cad88f81a5556f5d424b3a07 (patch)
tree343875e1151fbd0e69c8713d1df1e5693600398f /hw
parent5107022a616247216a7f7338bd7c62b4399d89eb (diff)
parentccebb9ae352eea63cb1491cb829e4cd0f7576f1c (diff)
Merge tag 'hw-misc-20240326' of https://github.com/philmd/qemu into staging
Misc HW patch queue [hw] - Do not silently overwrite 'io_timeout' property in scsi-generic (Lorenz) - Propagate period when enabling a clock in stm32l4x5 mux (Arnaud, Phil) - Add missing smbios_get_table_legacy() stub (Igor) - Append a space in gpa2hva() HMP error message (Yao) - Fix compiler warning in 'execlog' plugin (Yao) [target] - i386: Enable page walking from MMIO memory (Gregory, Jonathan) - tricore: Use correct string format in cpu_tlb_fill (Phil) [docs] - Fix formatting in amigang.rst (Zoltan) [ui] - Fix cocoa regression in platform fullscreen toggling (Akihiko) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmYC7QoACgkQ4+MsLN6t # wN4WIw//cLw1caDa8ki3htGWGVI2P/QFdsvId7ah4Iul7znf6NWUORDBjvIvLpaF # sesPF7BRQ/qJFT5ttB8DsKc1IHw3IASAGL/NK3i7v9GkRiBJNJvQRO2rVfNmXvN8 # ++AZ/J+Y1OZ4Y1hcxXGUVIpwKzndR5Oz9zNXQ+C0CQqYljwxC3huB3m6C7vKOgeq # SNKVw/hrTBYLzyvooKqLb6Xual2+olSwc2/BwqUOOCP6Y1HmgQeWy5ckJqsuVS2T # 5q5VtkduBCsUhgmflsLF3LCKrNTQUw+jOAGH2gyRvXMjmvwCmNy5xo8eOD0iTwXb # +Ffp/kfqm2N1QwNWcBi39+BU+Plti03mnL7C9jNzaEBaQ9Q7wMNqASN0daHSk3vh # 4Vw/FsaUJAohInKYghCgO0fUVpeLis+8p5lDD7QwAL9tiYk7/tgrbtyNLb+m/3P9 # pPNGt9Fnijg+/zDDfjVYwtDMRbL0df7SqTjhJW3TIQ+d83tmoVuCDmBysEXywzSt # 5e4yyjDf8q1C23yipK9I84wuvWjfIDYIPSUzCKaZYf4xbdx7GyNaOoOqWZYpordD # ua/4hRuQ4AcDuCe3XBKsmAex6wpYodjnfEi5Y5uV8vyPfeiVQodY/07pok/NZjEL # tUNy3EkQFqXxT1ctT7FhN2eh6WjSo0SJFtIjVDarJ0mUkS4VXgM= # =ccz/ # -----END PGP SIGNATURE----- # gpg: Signature made Tue 26 Mar 2024 15:43:06 GMT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * tag 'hw-misc-20240326' of https://github.com/philmd/qemu: ui/cocoa: Use NSTrackingInVisibleRect ui/cocoa: Resize window after toggling zoom-to-fit ui/cocoa: Fix aspect ratio hw/smbios: add stub for smbios_get_table_legacy() contrib/plugins/execlog: Fix compiler warning docs/system/ppc/amigang.rst: Fix formatting hw/misc/stm32l4x5_rcc: Propagate period when enabling a clock hw/misc/stm32l4x5_rcc: Inline clock_update() in clock_mux_update() hw/clock: Let clock_set_mul_div() return a boolean value target/tricore/helper: Use correct string format in cpu_tlb_fill() monitor/hmp-cmds-target: Append a space in error message in gpa2hva() hw/scsi/scsi-generic: Fix io_timeout property not applying target/i386/tcg: Enable page walking from MMIO memory Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/core/clock.c8
-rw-r--r--hw/misc/stm32l4x5_rcc.c9
-rw-r--r--hw/scsi/scsi-generic.c1
-rw-r--r--hw/smbios/smbios_legacy_stub.c5
4 files changed, 19 insertions, 4 deletions
diff --git a/hw/core/clock.c b/hw/core/clock.c
index d82e44cd1a..a19c7db7df 100644
--- a/hw/core/clock.c
+++ b/hw/core/clock.c
@@ -143,14 +143,20 @@ char *clock_display_freq(Clock *clk)
return freq_to_str(clock_get_hz(clk));
}
-void clock_set_mul_div(Clock *clk, uint32_t multiplier, uint32_t divider)
+bool clock_set_mul_div(Clock *clk, uint32_t multiplier, uint32_t divider)
{
assert(divider != 0);
+ if (clk->multiplier == multiplier && clk->divider == divider) {
+ return false;
+ }
+
trace_clock_set_mul_div(CLOCK_PATH(clk), clk->multiplier, multiplier,
clk->divider, divider);
clk->multiplier = multiplier;
clk->divider = divider;
+
+ return true;
}
static void clock_initfn(Object *obj)
diff --git a/hw/misc/stm32l4x5_rcc.c b/hw/misc/stm32l4x5_rcc.c
index bc2d63528b..ed2dbd9dc3 100644
--- a/hw/misc/stm32l4x5_rcc.c
+++ b/hw/misc/stm32l4x5_rcc.c
@@ -48,6 +48,8 @@ static void clock_mux_update(RccClockMuxState *mux, bool bypass_source)
uint64_t src_freq;
Clock *current_source = mux->srcs[mux->src];
uint32_t freq_multiplier = 0;
+ bool clk_changed = false;
+
/*
* To avoid rounding errors, we use the clock period instead of the
* frequency.
@@ -59,8 +61,11 @@ static void clock_mux_update(RccClockMuxState *mux, bool bypass_source)
freq_multiplier = mux->divider;
}
- clock_set_mul_div(mux->out, freq_multiplier, mux->multiplier);
- clock_update(mux->out, clock_get(current_source));
+ clk_changed |= clock_set_mul_div(mux->out, freq_multiplier, mux->multiplier);
+ clk_changed |= clock_set(mux->out, clock_get(current_source));
+ if (clk_changed) {
+ clock_propagate(mux->out);
+ }
src_freq = clock_get_hz(current_source);
/* TODO: can we simply detect if the config changed so that we reduce log spam ? */
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index b7b04e1d63..ee945f87e3 100644
--- a/hw/scsi/scsi-generic.c
+++ b/hw/scsi/scsi-generic.c
@@ -752,7 +752,6 @@ static void scsi_generic_realize(SCSIDevice *s, Error **errp)
/* Only used by scsi-block, but initialize it nevertheless to be clean. */
s->default_scsi_version = -1;
- s->io_timeout = DEFAULT_IO_TIMEOUT;
scsi_generic_read_device_inquiry(s);
}
diff --git a/hw/smbios/smbios_legacy_stub.c b/hw/smbios/smbios_legacy_stub.c
index f29b15316c..7d593dca98 100644
--- a/hw/smbios/smbios_legacy_stub.c
+++ b/hw/smbios/smbios_legacy_stub.c
@@ -13,3 +13,8 @@
void smbios_add_usr_blob_size(size_t size)
{
}
+
+uint8_t *smbios_get_table_legacy(size_t *length, Error **errp)
+{
+ g_assert_not_reached();
+}