From 29eb6aeceb545fc4cc7dfb27008efe9c64040385 Mon Sep 17 00:00:00 2001 From: kettenis Date: Thu, 8 Aug 2024 18:46:13 +0000 Subject: [PATCH] Fix gasio access size. --- sys/dev/acpi/intelpmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/acpi/intelpmc.c b/sys/dev/acpi/intelpmc.c index c22da5a76b0..be543e30426 100644 --- a/sys/dev/acpi/intelpmc.c +++ b/sys/dev/acpi/intelpmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intelpmc.c,v 1.2 2024/08/08 07:01:22 kettenis Exp $ */ +/* $OpenBSD: intelpmc.c,v 1.3 2024/08/08 18:46:13 kettenis Exp $ */ /* * Copyright (c) 2024 Mark Kettenis * @@ -278,7 +278,7 @@ intelpmc_suspend(void *cookie) acpi_gasio(sc->sc_acpi, ACPI_IOREAD, sc->sc_counter[i].address_space_id, sc->sc_counter[i].address, - (1 << sc->sc_counter[i].access_size), + (1 << (sc->sc_counter[i].access_size - 1)), sc->sc_counter[i].register_bit_width / 8, &sc->sc_lpit[i][0]); } @@ -321,7 +321,7 @@ intelpmc_resume(void *cookie) acpi_gasio(sc->sc_acpi, ACPI_IOREAD, sc->sc_counter[i].address_space_id, sc->sc_counter[i].address, - (1 << sc->sc_counter[i].access_size), + (1 << (sc->sc_counter[i].access_size - 1)), sc->sc_counter[i].register_bit_width / 8, &sc->sc_lpit[i][1]); } -- 2.20.1