From 7a1d55dfd06b0731c2a485c32e2e952a62a9966f Mon Sep 17 00:00:00 2001 From: Takanori Watanabe Date: Tue, 2 Jan 2001 05:22:35 +0000 Subject: [PATCH] Change Embedded Controller lock to ACPI Global Lock.This is needed for mutual execution between BIOS and OS. --- sys/dev/acpica/acpi_ec.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c index 67b7f7d0731b..811ca2487c57 100644 --- a/sys/dev/acpica/acpi_ec.c +++ b/sys/dev/acpica/acpi_ec.c @@ -158,7 +158,6 @@ MODULE_NAME("EC") struct acpi_ec_softc { device_t ec_dev; ACPI_HANDLE ec_handle; - ACPI_HANDLE ec_semaphore; UINT32 ec_gpebit; int ec_data_rid; @@ -183,7 +182,7 @@ EcLock(struct acpi_ec_softc *sc) { ACPI_STATUS status; - status = AcpiOsWaitSemaphore((sc)->ec_semaphore, 1, EC_LOCK_TIMEOUT); + status = AcpiAcquireGlobalLock(); (sc)->ec_locked = 1; return(status); } @@ -192,7 +191,7 @@ static __inline void EcUnlock(struct acpi_ec_softc *sc) { (sc)->ec_locked = 0; - AcpiOsSignalSemaphore((sc)->ec_semaphore, 1); + AcpiReleaseGlobalLock(); } static __inline int @@ -328,14 +327,6 @@ acpi_ec_attach(device_t dev) sc->ec_csr_tag = rman_get_bustag(sc->ec_csr_res); sc->ec_csr_handle = rman_get_bushandle(sc->ec_csr_res); - /* - * Create serialisation semaphore - */ - if ((Status = AcpiOsCreateSemaphore(1, 1, &sc->ec_semaphore)) != AE_OK) { - device_printf(dev, "can't create semaphore - %s\n", acpi_strerror(Status)); - return_VALUE(ENXIO); - } - /* * Install GPE handler *