]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ACPI/IORT: Introduce linker section for IORT entries probing
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 21 Nov 2016 10:01:34 +0000 (10:01 +0000)
committerWill Deacon <will.deacon@arm.com>
Tue, 29 Nov 2016 15:57:42 +0000 (15:57 +0000)
commit34ceea275f626ae624b55f2b388a07f806988a55
tree6428ee6774cc692652ffb0be5908bc5ccbc3b1cf
parent027b25b26447aaf597c8b7729dd3b1fbebc6d5e8
ACPI/IORT: Introduce linker section for IORT entries probing

Since commit e647b532275b ("ACPI: Add early device probing
infrastructure") the kernel has gained the infrastructure that allows
adding linker script section entries to execute ACPI driver callbacks
(ie probe routines) for all subsystems that register a table entry
in the respective kernel section (eg clocksource, irqchip).

Since ARM IOMMU devices data is described through IORT tables when
booting with ACPI, the ARM IOMMU drivers must be made able to hook ACPI
callback routines that are called to probe IORT entries and initialize
the respective IOMMU devices.

To avoid adding driver specific hooks into IORT table initialization
code (breaking therefore code modularity - ie ACPI IORT code must be made
aware of ARM SMMU drivers ACPI init callbacks), this patch adds code
that allows ARM SMMU drivers to take advantage of the ACPI early probing
infrastructure, so that they can add linker script section entries
containing drivers callback to be executed on IORT tables detection.

Since IORT nodes are differentiated by a type, the callback routines
can easily parse the IORT table entries, check the IORT nodes and
carry out some actions whenever the IORT node type associated with
the driver specific callback is matched.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Reviewed-by: Tomasz Nowicki <tn@semihalf.com>
Tested-by: Hanjun Guo <hanjun.guo@linaro.org>
Tested-by: Tomasz Nowicki <tn@semihalf.com>
Cc: Tomasz Nowicki <tn@semihalf.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/acpi/arm64/iort.c
include/asm-generic/vmlinux.lds.h
include/linux/acpi_iort.h