diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2022-03-01 10:43:35 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-03-01 10:43:36 +0000 |
commit | 648c15e4ec3470513624c4b54f09fd15adb12258 (patch) | |
tree | 1fb992c72a1704d3ec55452cf09100a016d45d5f /hw | |
parent | a8d39f5b5ae899b1c872f128f82959158cfce048 (diff) | |
parent | 1428502c8c0c0cfbb04212558144fef970042cf3 (diff) | |
download | qemu-648c15e4ec3470513624c4b54f09fd15adb12258.zip qemu-648c15e4ec3470513624c4b54f09fd15adb12258.tar.gz qemu-648c15e4ec3470513624c4b54f09fd15adb12258.tar.bz2 |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2022-02-28' into staging
QAPI patches patches for 2022-02-28
# gpg: Signature made Mon 28 Feb 2022 10:40:22 GMT
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qapi-2022-02-28:
qapi: Belatedly adjust limitations documentation
rtc: Have event RTC_CHANGE identify the RTC by QOM path
hw/rtc: Compile pl031 once-only
qapi: Document some missing details of RTC_CHANGE event
qapi: Move RTC_CHANGE back out of target schema
qapi/migration: Fix examples document wrong field name for arguments
qapi: Fix stale reference to scripts/qapi.py in a comment
keyval: Fix grammar comment to cover downstream prefix
scripts/qapi: minor delinting
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/spapr_rtc.c | 6 | ||||
-rw-r--r-- | hw/rtc/mc146818rtc.c | 5 | ||||
-rw-r--r-- | hw/rtc/meson.build | 2 | ||||
-rw-r--r-- | hw/rtc/pl031.c | 5 |
4 files changed, 11 insertions, 7 deletions
diff --git a/hw/ppc/spapr_rtc.c b/hw/ppc/spapr_rtc.c index 94a5510..d55b4b0 100644 --- a/hw/ppc/spapr_rtc.c +++ b/hw/ppc/spapr_rtc.c @@ -32,7 +32,7 @@ #include "hw/ppc/spapr.h" #include "migration/vmstate.h" #include "qapi/error.h" -#include "qapi/qapi-events-misc-target.h" +#include "qapi/qapi-events-misc.h" #include "qemu/cutils.h" #include "qemu/module.h" @@ -97,6 +97,7 @@ static void rtas_set_time_of_day(PowerPCCPU *cpu, SpaprMachineState *spapr, uint32_t nret, target_ulong rets) { SpaprRtcState *rtc = &spapr->rtc; + g_autofree const char *qom_path = NULL; struct tm tm; time_t new_s; int64_t host_ns; @@ -120,7 +121,8 @@ static void rtas_set_time_of_day(PowerPCCPU *cpu, SpaprMachineState *spapr, } /* Generate a monitor event for the change */ - qapi_event_send_rtc_change(qemu_timedate_diff(&tm)); + qom_path = object_get_canonical_path(OBJECT(rtc)); + qapi_event_send_rtc_change(qemu_timedate_diff(&tm), qom_path); host_ns = qemu_clock_get_ns(rtc_clock); diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c index e61a0cc..ac9a60c 100644 --- a/hw/rtc/mc146818rtc.c +++ b/hw/rtc/mc146818rtc.c @@ -40,7 +40,7 @@ #include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" #include "qapi/error.h" -#include "qapi/qapi-events-misc-target.h" +#include "qapi/qapi-events-misc.h" #include "qapi/visitor.h" #include "hw/rtc/mc146818rtc_regs.h" @@ -611,12 +611,13 @@ static void rtc_get_time(RTCState *s, struct tm *tm) static void rtc_set_time(RTCState *s) { struct tm tm; + g_autofree const char *qom_path = object_get_canonical_path(OBJECT(s)); rtc_get_time(s, &tm); s->base_rtc = mktimegm(&tm); s->last_update = qemu_clock_get_ns(rtc_clock); - qapi_event_send_rtc_change(qemu_timedate_diff(&tm)); + qapi_event_send_rtc_change(qemu_timedate_diff(&tm), qom_path); } static void rtc_set_cmos(RTCState *s, const struct tm *tm) diff --git a/hw/rtc/meson.build b/hw/rtc/meson.build index 8fd8d8f..7cecdee 100644 --- a/hw/rtc/meson.build +++ b/hw/rtc/meson.build @@ -2,7 +2,7 @@ softmmu_ss.add(when: 'CONFIG_DS1338', if_true: files('ds1338.c')) softmmu_ss.add(when: 'CONFIG_M41T80', if_true: files('m41t80.c')) softmmu_ss.add(when: 'CONFIG_M48T59', if_true: files('m48t59.c')) -specific_ss.add(when: 'CONFIG_PL031', if_true: files('pl031.c')) +softmmu_ss.add(when: 'CONFIG_PL031', if_true: files('pl031.c')) softmmu_ss.add(when: 'CONFIG_TWL92230', if_true: files('twl92230.c')) softmmu_ss.add(when: ['CONFIG_ISA_BUS', 'CONFIG_M48T59'], if_true: files('m48t59-isa.c')) softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP', if_true: files('xlnx-zynqmp-rtc.c')) diff --git a/hw/rtc/pl031.c b/hw/rtc/pl031.c index 38d9d3c..b01d0e7 100644 --- a/hw/rtc/pl031.c +++ b/hw/rtc/pl031.c @@ -24,7 +24,7 @@ #include "qemu/log.h" #include "qemu/module.h" #include "trace.h" -#include "qapi/qapi-events-misc-target.h" +#include "qapi/qapi-events-misc.h" #define RTC_DR 0x00 /* Data read register */ #define RTC_MR 0x04 /* Match register */ @@ -138,12 +138,13 @@ static void pl031_write(void * opaque, hwaddr offset, switch (offset) { case RTC_LR: { + g_autofree const char *qom_path = object_get_canonical_path(opaque); struct tm tm; s->tick_offset += value - pl031_get_count(s); qemu_get_timedate(&tm, s->tick_offset); - qapi_event_send_rtc_change(qemu_timedate_diff(&tm)); + qapi_event_send_rtc_change(qemu_timedate_diff(&tm), qom_path); pl031_set_alarm(s); break; |