From bbf7c27a9c9f62647c11b237856d6fbb3dd3dfd2 Mon Sep 17 00:00:00 2001 From: Nate Lawson Date: Fri, 13 Aug 2004 06:22:07 +0000 Subject: [PATCH] MPSAFE locking * Serialize calls to acpi_pcib_route_interrupt(). * Note that acpi_pcib_attach() should not be called concurrently. --- sys/dev/acpica/acpi_pcib.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/acpica/acpi_pcib.c b/sys/dev/acpica/acpi_pcib.c index e7086dc4af0..f8b8e9db5e2 100644 --- a/sys/dev/acpica/acpi_pcib.c +++ b/sys/dev/acpica/acpi_pcib.c @@ -45,6 +45,12 @@ __FBSDID("$FreeBSD$"); #define _COMPONENT ACPI_BUS ACPI_MODULE_NAME("PCI") +ACPI_SERIAL_DECL(pcib, "ACPI PCI bus methods"); + +/* + * For locking, we assume the caller is not concurrent since this is + * triggered by newbus methods. + */ int acpi_pcib_attach(device_t dev, ACPI_BUFFER *prt, int busno) { @@ -114,6 +120,8 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin) /* ACPI numbers pins 0-3, not 1-4 like the BIOS. */ pin--; + ACPI_SERIAL_BEGIN(pcib); + /* Look up the PRT entry for this device. */ entry = acpi_pci_find_prt(pcib, dev, pin); if (entry == NULL) { @@ -190,6 +198,7 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin) acpi_name(entry->prt_source)); out: + ACPI_SERIAL_END(pcib); return_VALUE (interrupt); }