Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7097680rwi; Mon, 24 Oct 2022 09:46:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7TJGY5oRkpu9rTs1mgkIhWfq4vDn/Oyh8xGkWyp7oGTIrY4Zx4Pu7HslTwZeDSe/rtQg8j X-Received: by 2002:aa7:91c5:0:b0:56b:e2db:5b75 with SMTP id z5-20020aa791c5000000b0056be2db5b75mr4634125pfa.73.1666630004977; Mon, 24 Oct 2022 09:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666630004; cv=none; d=google.com; s=arc-20160816; b=yKwmGT9zr24RlE2ixaWBVfC2Z5g0mNVbbFd8sbCpSV+X+igXRnxLZj48EYOcNOMw0t 0NVVH/f7VLc+hd6o2KDWYvoepmxyIQX7tZablDufWwVrMO+miVVvN9O3OCnwiiU2Mlh6 z20ML5d/2B0QDHEyUw+pAMMDichP0uJk4fjiVgVFQ8sw3C9y5/0tp4UVjSW4h0gkI60t lo82GW2qt+1g5BV7K+xsQaTbxp74ZI+hteYLLnBhe0SkJpsv8/XRB1E2dnldl+kg7jP5 xHhkJaKalktbRBuEOPdzBE4Vn3u66VhezvEHT6b7222avuWPMHRGJsUVnZEWIs7a58uW rXlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gyVoBUNC/MILho5aT/jgt27ZIJOo8XCw0PF1RzeCb2E=; b=lIw9EpWJ3O9UqWALbqUaXRn3L9sL0sntLYreeHf+NwIecqdLcT74QoT0YYygl3m07v n8yiuC3WIx5iQ5PmqRTVzOawf36eK03ULStExjSv/UD83wEmq7LqBs0MJiZNFfnWrFu6 dfJIzHraUKhLJLcWOMswvlgLNmhJxVguLnACtDfIJHHyvxJIDE9H9wd0sZyBF1eRHElA LTpw5h1bkbdg+s/vMqfQiYxO6DaTWP7MANoVdOmk0Nqh3Qb0Y7Z9Y42x9nZlb1LR7TcY qEgMYJR36MS5luc4bKWG9wAfy+syZ8HFl3UO8kwktCsWUm/e9y0P+b5uwrtVVf78a1Gp W5FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zOCXyG0X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f25-20020a637559000000b004403d4f1f70si36125496pgn.455.2022.10.24.09.46.32; Mon, 24 Oct 2022 09:46:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zOCXyG0X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231724AbiJXQB4 (ORCPT + 99 others); Mon, 24 Oct 2022 12:01:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232795AbiJXP7W (ORCPT ); Mon, 24 Oct 2022 11:59:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3D2436BD9; Mon, 24 Oct 2022 07:54:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2BE18B819F4; Mon, 24 Oct 2022 12:50:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B062C433C1; Mon, 24 Oct 2022 12:49:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615798; bh=SNjKG8v+CT/LaOPc8T6i3wQHsHHlKBHNV1KQqMQmtW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zOCXyG0XlvUKZNNLlgSZBCwCH6QS1eLwNU+4Uq+x0WbCxA+hZiIzOolUu/gqUcUAg d2qDy58WOPLql9nbky8mKexNP8xO9AMPYWguK9DopwundHN+2OZ/4UrTF+uGf1nJh+ mIf5k40yvk/d4pKVIxThML35S9wU26A3EUggEw6Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thierry Reding , John Garry , Robin Murphy , Thierry Reding , Joerg Roedel , Sasha Levin Subject: [PATCH 5.15 387/530] iommu/iova: Fix module config properly Date: Mon, 24 Oct 2022 13:32:11 +0200 Message-Id: <20221024113102.585338636@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robin Murphy [ Upstream commit 4f58330fcc8482aa90674e1f40f601e82f18ed4a ] 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 Reported-by: John Garry Fixes: 15bbdec3931e ("iommu: Make the iova library a module") Signed-off-by: Robin Murphy Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/548c2f683ca379aface59639a8f0cccc3a1ac050.1663069227.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- include/linux/iova.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/iova.h b/include/linux/iova.h index 71d8a2de6635..6b6cc104e300 100644 --- a/include/linux/iova.h +++ b/include/linux/iova.h @@ -133,7 +133,7 @@ static inline unsigned long iova_pfn(struct iova_domain *iovad, dma_addr_t iova) return iova >> iova_shift(iovad); } -#if IS_ENABLED(CONFIG_IOMMU_IOVA) +#if IS_REACHABLE(CONFIG_IOMMU_IOVA) int iova_cache_get(void); void iova_cache_put(void); -- 2.35.1