]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Fix section mismatch warning for detect_ivrs()
authorJoerg Roedel <jroedel@suse.de>
Tue, 8 Jun 2021 12:28:43 +0000 (14:28 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 8 Jun 2021 12:29:33 +0000 (14:29 +0200)
commit996f5a4240cc8c6785204fe839b3d39db40ac971
treefcd00987367a25fcb55ffe2130eec5a0f9c55ef6
parent18cc0972288cb1516d599312155469f3d336a7aa
iommu/amd: Fix section mismatch warning for detect_ivrs()

A recent commit introduced this section mismatch warning:

WARNING: modpost: vmlinux.o(.text.unlikely+0x22a1f): Section mismatch in reference from the function detect_ivrs() to the variable .init.data:amd_iommu_force_enable

The reason is that detect_ivrs() is not marked __init while it should
be, because it is only called from another __init function. Mark
detect_ivrs() __init to get rid of the warning.

Fixes: 18cc0972288c ("iommu/amd: Add amd_iommu=force_enable option")
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Link: https://lore.kernel.org/r/20210608122843.8413-1-joro@8bytes.org
drivers/iommu/amd/init.c