summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_pcib.c
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-08-13 06:22:07 +0000
committernjl <njl@FreeBSD.org>2004-08-13 06:22:07 +0000
commit6184ec840c8e03a6963544bae3a12c7d4ea7f117 (patch)
tree57a7a67c4171df49dbe1abd87b1a119445e47e35 /sys/dev/acpica/acpi_pcib.c
parent136e740df9f9c4b7626d77311d87951d6bae08c3 (diff)
downloadFreeBSD-src-6184ec840c8e03a6963544bae3a12c7d4ea7f117.zip
FreeBSD-src-6184ec840c8e03a6963544bae3a12c7d4ea7f117.tar.gz
MPSAFE locking
* Serialize calls to acpi_pcib_route_interrupt(). * Note that acpi_pcib_attach() should not be called concurrently.
Diffstat (limited to 'sys/dev/acpica/acpi_pcib.c')
-rw-r--r--sys/dev/acpica/acpi_pcib.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_pcib.c b/sys/dev/acpica/acpi_pcib.c
index e7086dc..f8b8e9d 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);
}
OpenPOWER on IntegriCloud