[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 42/63] hw/acpi/core: Trace enable and status registers of GPE sepa
From: |
Michael S. Tsirkin |
Subject: |
[PULL 42/63] hw/acpi/core: Trace enable and status registers of GPE separately |
Date: |
Wed, 4 Oct 2023 04:45:26 -0400 |
From: Bernhard Beschow <shentey@gmail.com>
The bit positions of both registers are related. Tracing the registers
independently results in the same offsets across these registers which
eases debugging.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230908084234.17642-9-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/acpi/core.c | 10 +++++++---
hw/acpi/trace-events | 6 ++++--
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index c561845a4a..ec5e127d17 100644
--- a/hw/acpi/core.c
+++ b/hw/acpi/core.c
@@ -687,13 +687,13 @@ void acpi_gpe_ioport_writeb(ACPIREGS *ar, uint32_t addr,
uint32_t val)
{
uint8_t *cur;
- trace_acpi_gpe_ioport_writeb(addr, val);
-
cur = acpi_gpe_ioport_get_ptr(ar, addr);
if (addr < ar->gpe.len / 2) {
+ trace_acpi_gpe_sts_ioport_writeb(addr, val);
/* GPE_STS */
*cur = (*cur) & ~val;
} else if (addr < ar->gpe.len) {
+ trace_acpi_gpe_en_ioport_writeb(addr - (ar->gpe.len / 2), val);
/* GPE_EN */
*cur = val;
} else {
@@ -712,7 +712,11 @@ uint32_t acpi_gpe_ioport_readb(ACPIREGS *ar, uint32_t addr)
val = *cur;
}
- trace_acpi_gpe_ioport_readb(addr, val);
+ if (addr < ar->gpe.len / 2) {
+ trace_acpi_gpe_sts_ioport_readb(addr, val);
+ } else {
+ trace_acpi_gpe_en_ioport_readb(addr - (ar->gpe.len / 2), val);
+ }
return val;
}
diff --git a/hw/acpi/trace-events b/hw/acpi/trace-events
index 159937ddb9..edc93e703c 100644
--- a/hw/acpi/trace-events
+++ b/hw/acpi/trace-events
@@ -18,8 +18,10 @@ mhp_acpi_pc_dimm_deleted(uint32_t slot) "slot[0x%"PRIx32"]
pc-dimm deleted"
mhp_acpi_pc_dimm_delete_failed(uint32_t slot) "slot[0x%"PRIx32"] pc-dimm
delete failed"
# core.c
-acpi_gpe_ioport_readb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " ==>
0x%" PRIx8
-acpi_gpe_ioport_writeb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " <==
0x%" PRIx8
+acpi_gpe_en_ioport_readb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " ==>
0x%02" PRIx8
+acpi_gpe_en_ioport_writeb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " <==
0x%02" PRIx8
+acpi_gpe_sts_ioport_readb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 " ==>
0x%02" PRIx8
+acpi_gpe_sts_ioport_writeb(uint32_t addr, uint8_t val) "addr: 0x%" PRIx32 "
<== 0x%02" PRIx8
# cpu.c
cpuhp_acpi_invalid_idx_selected(uint32_t idx) "0x%"PRIx32
--
MST
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, (continued)
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Jonathan Cameron, 2023/10/06
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Dan Williams, 2023/10/06
- [PATCH v4] hw/cxl: Add QTG _DSM support for ACPI0017 device, Dave Jiang, 2023/10/06
- Re: [PATCH v4] hw/cxl: Add QTG _DSM support for ACPI0017 device, Jonathan Cameron, 2023/10/09
- Re: [PATCH v4] hw/cxl: Add QTG _DSM support for ACPI0017 device, Dave Jiang, 2023/10/09
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Jonathan Cameron, 2023/10/09
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Michael S. Tsirkin, 2023/10/07
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Jonathan Cameron, 2023/10/09
- Re: [PATCH v3] hw/cxl: Add QTG _DSM support for ACPI0017 device, Michael S. Tsirkin, 2023/10/05
[PULL 35/63] hw/i386/acpi-build: Use pc_madt_cpu_entry() directly, Michael S. Tsirkin, 2023/10/04
[PULL 42/63] hw/acpi/core: Trace enable and status registers of GPE separately,
Michael S. Tsirkin <=
[PULL 48/63] hw/cxl: Support 4 HDM decoders at all levels of topology, Michael S. Tsirkin, 2023/10/04
[PULL 51/63] vdpa net: stop probing if cannot set features, Michael S. Tsirkin, 2023/10/04
[PULL 55/63] pcie_sriov: unregister_vfs(): fix error path, Michael S. Tsirkin, 2023/10/04
[PULL 47/63] hw/cxl: Fix and use same calculation for HDM decoder block size everywhere, Michael S. Tsirkin, 2023/10/04
[PULL 45/63] hw/cxl: Push cxl_decoder_count_enc() and cxl_decode_ig() into .c, Michael S. Tsirkin, 2023/10/04
[PULL 60/63] util/uuid: add a hash function, Michael S. Tsirkin, 2023/10/04
[PULL 53/63] amd_iommu: Fix APIC address check, Michael S. Tsirkin, 2023/10/04
[PULL 56/63] libvhost-user.c: add assertion to vu_message_read_default, Michael S. Tsirkin, 2023/10/04
[PULL 61/63] hw/display: introduce virtio-dmabuf, Michael S. Tsirkin, 2023/10/04
[PULL 57/63] virtio: use shadow_avail_idx while checking number of heads, Michael S. Tsirkin, 2023/10/04