The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=10568445de92d59379e1c59fcdc7566065332453
commit 10568445de92d59379e1c59fcdc7566065332453 Author: John Baldwin <[email protected]> AuthorDate: 2025-12-09 20:02:51 +0000 Commit: John Baldwin <[email protected]> CommitDate: 2025-12-09 20:02:51 +0000 acpi_PkgGas: Pass rid by value Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53406 --- sys/dev/acpica/acpi_cpu.c | 2 +- sys/dev/acpica/acpi_package.c | 4 ++-- sys/dev/acpica/acpi_perf.c | 6 +++--- sys/dev/acpica/acpivar.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c index 37246890fd79..6eb364db276b 100644 --- a/sys/dev/acpica/acpi_cpu.c +++ b/sys/dev/acpica/acpi_cpu.c @@ -926,7 +926,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *sc) { cx_ptr->res_rid = sc->cpu_cx_count; acpi_PkgGas(sc->cpu_dev, pkg, 0, &cx_ptr->res_type, - &cx_ptr->res_rid, &cx_ptr->p_lvlx, RF_SHAREABLE); + cx_ptr->res_rid, &cx_ptr->p_lvlx, RF_SHAREABLE); if (cx_ptr->p_lvlx) { cx_ptr->do_mwait = false; ACPI_DEBUG_PRINT((ACPI_DB_INFO, diff --git a/sys/dev/acpica/acpi_package.c b/sys/dev/acpica/acpi_package.c index e0a3b40e507e..2ee439c64b8c 100644 --- a/sys/dev/acpica/acpi_package.c +++ b/sys/dev/acpica/acpi_package.c @@ -113,7 +113,7 @@ acpi_PkgStr(ACPI_OBJECT *res, int idx, void *dst, size_t size) } int -acpi_PkgGas(device_t dev, ACPI_OBJECT *res, int idx, int *type, int *rid, +acpi_PkgGas(device_t dev, ACPI_OBJECT *res, int idx, int *type, int rid, struct resource **dst, u_int flags) { ACPI_GENERIC_ADDRESS gas; @@ -126,7 +126,7 @@ acpi_PkgGas(device_t dev, ACPI_OBJECT *res, int idx, int *type, int *rid, memcpy(&gas, obj->Buffer.Pointer + 3, sizeof(gas)); - return (acpi_bus_alloc_gas(dev, type, *rid, &gas, dst, flags)); + return (acpi_bus_alloc_gas(dev, type, rid, &gas, dst, flags)); } int diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c index ee7a4355f32a..6889dae3ad7f 100644 --- a/sys/dev/acpica/acpi_perf.c +++ b/sys/dev/acpica/acpi_perf.c @@ -191,7 +191,7 @@ acpi_perf_probe(device_t dev) pkg = (ACPI_OBJECT *)buf.Pointer; if (ACPI_PKG_VALID(pkg, 2)) { rid = 0; - error = acpi_PkgGas(dev, pkg, 0, &type, &rid, &res, 0); + error = acpi_PkgGas(dev, pkg, 0, &type, rid, &res, 0); switch (error) { case 0: bus_release_resource(dev, type, rid, res); @@ -326,7 +326,7 @@ acpi_perf_evaluate(device_t dev) goto out; } - error = acpi_PkgGas(sc->dev, pkg, 0, &sc->perf_ctrl_type, &sc->px_rid, + error = acpi_PkgGas(sc->dev, pkg, 0, &sc->perf_ctrl_type, sc->px_rid, &sc->perf_ctrl, 0); if (error) { /* @@ -342,7 +342,7 @@ acpi_perf_evaluate(device_t dev) } sc->px_rid++; - error = acpi_PkgGas(sc->dev, pkg, 1, &sc->perf_sts_type, &sc->px_rid, + error = acpi_PkgGas(sc->dev, pkg, 1, &sc->perf_sts_type, sc->px_rid, &sc->perf_status, 0); if (error) { if (error == EOPNOTSUPP) { diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 4da1a5a35a41..6db55b10570d 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -573,7 +573,7 @@ int acpi_PkgInt32(ACPI_OBJECT *res, int idx, uint32_t *dst); int acpi_PkgInt16(ACPI_OBJECT *res, int idx, uint16_t *dst); int acpi_PkgStr(ACPI_OBJECT *res, int idx, void *dst, size_t size); int acpi_PkgGas(device_t dev, ACPI_OBJECT *res, int idx, int *type, - int *rid, struct resource **dst, u_int flags); + int rid, struct resource **dst, u_int flags); int acpi_PkgFFH_IntelCpu(ACPI_OBJECT *res, int idx, int *vendor, int *class, uint64_t *address, int *accsize); ACPI_HANDLE acpi_GetReference(ACPI_HANDLE scope, ACPI_OBJECT *obj);
