From patchwork Sat Oct 22 07:26:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7691 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1109121wrr; Sat, 22 Oct 2022 01:47:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4+6wwUjNDQYAlrqAhh1wHYsT0Mf/wv9kHdLIE0tvoD8MFZebDzIQznzGG+KkbBbRcME8ka X-Received: by 2002:a17:907:a429:b0:78d:b6bb:304f with SMTP id sg41-20020a170907a42900b0078db6bb304fmr18782490ejc.497.1666428440439; Sat, 22 Oct 2022 01:47:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666428440; cv=none; d=google.com; s=arc-20160816; b=prpwACYH3EpqufL2zGC14B8curR9+Rf+HHz8O+KdJcIoJxnbF28g9VJsnoGL2vZZgC DWtBDKSXO6mD7MOg308mHvzqKIaqfmsdReixHPyGExfS8E+Wl4GDX+ymkMfaOb7EMhpo 6LN+zDe9ARlPomnwbFRrVSfaqysQkrM9To9asC0g06beF9ShQa7BjwqaZNQcpUQO//6o stUKpl6Ku9tPmKVS70ldk2aTpusH/jPlz4NQssZlgWKODW87pGozaFoK00z2M6qyaaSw jcfBd88ojWQJTmWCV6nVvvxZ2lcCD9REzbr7rkilAFazZy0fvdU7ozgKt2GJG6r+2F0A HyoA== 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=kKDaTjIux1XjAbVFr8dc8yMLBlt3gTaYg9LlN+mVqKw=; b=isMJ60QNv8wb6fAb/G12yPtnUV2CV9SwPyVKniByZh5Mg1pM3fWH1IghNwC+6X/4c8 m+89J+0TIRp6Lc8Q2FfWqX7QNjEo8HThBRNfPazDAWd9jSRUQS9GVPlIOKLozo4MDuch yWuYtKH3ag6mbDZ9/t3GH/oNEkDXosc0130FAbEFvuR8Lq9XDeYuQDRbiusdNBdM5oKE uzRVsGjmfHMw7yEOZ+soEKG02K3mlY2b7Nj/MiVaxONPET6mcwLiAT9IlESB0DdOEVpL PldIO6FzIcMj4Tj/t2/cQg7xfTVNDGNCbRFU7QSERV5imcaJKEH/uOVHtvGrQQCIW4z8 c+Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mOg24Kdz; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i15-20020a05640242cf00b0045a1dbedd92si29506498edc.35.2022.10.22.01.46.55; Sat, 22 Oct 2022 01:47:20 -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=mOg24Kdz; 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 S234177AbiJVIqZ (ORCPT + 99 others); Sat, 22 Oct 2022 04:46:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234977AbiJVIoL (ORCPT ); Sat, 22 Oct 2022 04:44:11 -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 140472C6E1F; Sat, 22 Oct 2022 01:07:55 -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 848D3B82DFE; Sat, 22 Oct 2022 07:59:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5EC9C433D6; Sat, 22 Oct 2022 07:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425592; bh=/EJsLI7IGYST8ISKH+nK60rKSqHNZhQC+NgTJrfGF38=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mOg24KdzpT+jAILFINJlXFhS9OY8JvvGD1LrIYv92zvyJU490oxW8NKC2O4tg58AU PjsZYyuDcREuYVAyJMHGSvF0IVgGsGPXHFnXDz56eXki+6CO5sWG0m+rJkJ7R0FoGg GKaCVQA8jVJtnwVTLOtDk64SHE5qH6IWkdvb7kp4= 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.19 524/717] iommu/iova: Fix module config properly Date: Sat, 22 Oct 2022 09:26:43 +0200 Message-Id: <20221022072521.495197957@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747376868220651276?= X-GMAIL-MSGID: =?utf-8?q?1747376868220651276?= 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 320a70e40233..f1dba47cfc97 100644 --- a/include/linux/iova.h +++ b/include/linux/iova.h @@ -75,7 +75,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);