Skip to content

Commit 4f58330

Browse files
rmurphy-armjoergroedel
authored andcommitted
iommu/iova: Fix module config properly
IOMMU_IOVA is intended to be an optional library for users to select as and when they desire. Since it can be a module now, this means that built-in code which has chosen not to select it should not fail to link if it happens to have selected as a module by someone else. Replace IS_ENABLED() with IS_REACHABLE() to do the right thing. CC: Thierry Reding <thierry.reding@gmail.com> Reported-by: John Garry <john.garry@huawei.com> Fixes: 15bbdec ("iommu: Make the iova library a module") Signed-off-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/548c2f683ca379aface59639a8f0cccc3a1ac050.1663069227.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent c7883f8 commit 4f58330

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/iova.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static inline unsigned long iova_pfn(struct iova_domain *iovad, dma_addr_t iova)
7575
return iova >> iova_shift(iovad);
7676
}
7777

78-
#if IS_ENABLED(CONFIG_IOMMU_IOVA)
78+
#if IS_REACHABLE(CONFIG_IOMMU_IOVA)
7979
int iova_cache_get(void);
8080
void iova_cache_put(void);
8181

0 commit comments

Comments
 (0)