From: Joerg Roedel Date: Tue, 3 Sep 2019 13:15:44 +0000 (+0200) Subject: iommu: Don't use sme_active() in generic code X-Git-Tag: v5.15~5388^2~11^10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2896ba40d0becdb72b45f096cad70633abc014f6;p=platform%2Fkernel%2Flinux-starfive.git iommu: Don't use sme_active() in generic code Switch to the generic function mem_encrypt_active() because sme_active() is x86 specific and can't be called from generic code on other platforms than x86. Fixes: 2cc13bb4f59f ("iommu: Disable passthrough mode when SME is active") Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 66cfaca..d658c7c 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -120,8 +120,8 @@ static int __init iommu_subsys_init(void) else iommu_set_default_translated(false); - if (iommu_default_passthrough() && sme_active()) { - pr_info("SME detected - Disabling default IOMMU Passthrough\n"); + if (iommu_default_passthrough() && mem_encrypt_active()) { + pr_info("Memory encryption detected - Disabling default IOMMU Passthrough\n"); iommu_set_default_translated(false); } }