ACPI: Make acpi_dma_configure() DMA regions aware
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 7 Aug 2017 10:29:49 +0000 (11:29 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 7 Aug 2017 12:28:51 +0000 (14:28 +0200)
commit7ad4263980826e8b02e121af22f4f4c9103fe86d
tree436c849f4eb9c25377579743121d8b956ae2e57d
parentc04ac679c6b86e4e36fbb675c6c061b4091f5810
ACPI: Make acpi_dma_configure() DMA regions aware

Current ACPI DMA configuration set-up device DMA capabilities through
kernel defaults that do not take into account platform specific DMA
configurations reported by firmware.

By leveraging the ACPI acpi_dev_get_dma_resources() API, add code
in acpi_dma_configure() to retrieve the DMA regions to correctly
set-up PCI devices DMA parameters.

Rework the ACPI IORT kernel API to make sure they can accommodate
the DMA set-up required by firmware. By making PCI devices DMA set-up
ACPI IORT specific, the kernel is shielded from unwanted regressions
that could be triggered by parsing DMA resources on arches that were
previously ignoring them (ie x86/ia64), leaving kernel behaviour
unchanged on those arches.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: Nate Watterson <nwatters@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/arm64/iort.c
drivers/acpi/scan.c
include/linux/acpi_iort.h