dma-iommu: use static-key to minimize the impact in the fast-path
authorLianbo Jiang <lijiang@redhat.com>
Tue, 26 Jan 2021 11:53:36 +0000 (19:53 +0800)
committerJoerg Roedel <jroedel@suse.de>
Thu, 28 Jan 2021 12:27:21 +0000 (13:27 +0100)
commita8e8af35c9f4f75f981a95488c7066d31bac4bef
tree3295e01e3e1dc22ef30fd5be9936b2d8c777d181
parent262948f8ba573dc9c61650df8f23eaea7d43bc61
dma-iommu: use static-key to minimize the impact in the fast-path

Let's move out the is_kdump_kernel() check from iommu_dma_deferred_attach()
to iommu_dma_init(), and use the static-key in the fast-path to minimize
the impact in the normal case.

Co-developed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20210126115337.20068-2-lijiang@redhat.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dma-iommu.c