Commit ab153f21 authored by Steffen Persvold's avatar Steffen Persvold Committed by Greg Kroah-Hartman

iommu/amd: Fix section warning for prealloc_protection_domains

commit cebd5fa4 upstream.

Fix the following section warning in drivers/iommu/amd_iommu.c :

WARNING: vmlinux.o(.text+0x526e77): Section mismatch in reference from the function prealloc_protection_domains() to the function .init.text:alloc_passthrough_domain()
The function prealloc_protection_domains() references
the function __init alloc_passthrough_domain().
This is often because prealloc_protection_domains lacks a __init
annotation or the annotation of alloc_passthrough_domain is wrong.
Signed-off-by: default avatarSteffen Persvold <sp@numascale.com>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4177c364
...@@ -2432,7 +2432,7 @@ static int amd_iommu_dma_supported(struct device *dev, u64 mask) ...@@ -2432,7 +2432,7 @@ static int amd_iommu_dma_supported(struct device *dev, u64 mask)
* we don't need to preallocate the protection domains anymore. * we don't need to preallocate the protection domains anymore.
* For now we have to. * For now we have to.
*/ */
static void prealloc_protection_domains(void) static void __init prealloc_protection_domains(void)
{ {
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
struct dma_ops_domain *dma_dom; struct dma_ops_domain *dma_dom;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment