summaryrefslogtreecommitdiffstats
path: root/sys/x86/iommu
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-02-20 13:37:04 +0000
committerkib <kib@FreeBSD.org>2016-02-20 13:37:04 +0000
commit9b01734b012a01764d2995c361ed8a153da472e5 (patch)
tree2679ade09b0cb6e989ae0ba55bd645332a7f254c /sys/x86/iommu
parentefb12984b6d52eac82dfc5e14fa4e55b23fc1685 (diff)
downloadFreeBSD-src-9b01734b012a01764d2995c361ed8a153da472e5.zip
FreeBSD-src-9b01734b012a01764d2995c361ed8a153da472e5.tar.gz
Some BIOSes ACPI bytecode needs to take (sleepable) acpi mutex for
acpi_GetInteger() execution. Intel DMAR interrupt remapping code needs to know UID of the HPET to properly route the FSB interrupts from the HPET, even when interrupt remapping is disabled, and the code is executed under some non-sleepable mutexes. Cache HPET UIDs in the device softc at the attach time and provide lock-less method to get UID, use the method from the dmar hpet handling code instead of calling GetInteger(). Reported and tested by: Larry Rosenman <ler@lerctr.org> Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'sys/x86/iommu')
-rw-r--r--sys/x86/iommu/intel_drv.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c
index 47588af..e5d7783 100644
--- a/sys/x86/iommu/intel_drv.c
+++ b/sys/x86/iommu/intel_drv.c
@@ -826,13 +826,9 @@ dmar_find_nonpci(u_int id, u_int entry_type, uint16_t *rid)
struct dmar_unit *
dmar_find_hpet(device_t dev, uint16_t *rid)
{
- ACPI_HANDLE handle;
- uint32_t hpet_id;
- handle = acpi_get_handle(dev);
- if (ACPI_FAILURE(acpi_GetInteger(handle, "_UID", &hpet_id)))
- return (NULL);
- return (dmar_find_nonpci(hpet_id, ACPI_DMAR_SCOPE_TYPE_HPET, rid));
+ return (dmar_find_nonpci(hpet_get_uid(dev), ACPI_DMAR_SCOPE_TYPE_HPET,
+ rid));
}
struct dmar_unit *
OpenPOWER on IntegriCloud