From patchwork Mon Oct 24 11:31:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10331 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp669349wru; Mon, 24 Oct 2022 14:57:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7wI847fXnRewmJjHEFAkcQSrztgmNSq1rQK3WP52cR0trg+9R1BSNquKAGWtDdqWS86lZY X-Received: by 2002:a05:6402:4303:b0:45c:cd3d:f5 with SMTP id m3-20020a056402430300b0045ccd3d00f5mr32438745edc.188.1666648632474; Mon, 24 Oct 2022 14:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666648632; cv=none; d=google.com; s=arc-20160816; b=cK62UT22dZXt7Nrw8BjWkRVzEN59iatf3zU6c9KEdoyZr0KNqFTOhhxQwWfepL3H3b Z+mRUSy3xhQUUkkYSBmnFRhYsztFe/8GmQvmL+JsS51qxJTf4ck/gQsGYO7L+NTbFkbb Zmy9F/9EfUaBwAMMOJ4PHXfpPU4kMN488T3IdI9cPPgtYPTQ/+LWiJzmLZMluWCyfNET 2GomDXsbFxjigGM5wGIG13T5p4SW50O4iYSiEsnu8wVQ6OPCDegQkwr3E1trDBvJx8ym 7bCjelgaXWqjxHDIxfJYBc81fFWo8O0IvriTXbPzfLK+YAKgdcPkhhlXqa9qry8WFv5T 2YSQ== 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=/yIv/TiNzDkV862+WWJeo0gFEhSGBGJcXAw9+6YoxsY=; b=phK4umobDx2EuX6j3Fxly9Ysyg122pCHxEHLTif8r7tKKqSKInES6SGIvK7k5sN10l AJRghWv3IIjnbyBSr7rpAnWu1qMrWuZ6JvJBeSv+9Vf4gxBcov9c92xnI3NZepOFn8eR 4TSv7SLavSQ6KQo7yszfbgdkK8q0EdZf01Q8za0aQb8MHpL13bBDFYKNUNhRhLs9ifqP HUkQzlopqjw4Kz4VoWKb/aAjq0YdaVyABohZ5XBZ5QOrQDJKWTIRbxf0kdMudZqNbQz/ f3YcjgNVN0W8u2gPqmA2wNv1cLuuAO1zM4c4ZsTfYNdPb/KVWhnZ8cKsDLayC/OLmL3w mnZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qCiOgUxq; 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 qw34-20020a1709066a2200b0078239e3f846si227261ejc.1.2022.10.24.14.56.48; Mon, 24 Oct 2022 14:57:12 -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=qCiOgUxq; 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 S231364AbiJXVsP (ORCPT + 99 others); Mon, 24 Oct 2022 17:48:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230265AbiJXVrw (ORCPT ); Mon, 24 Oct 2022 17:47:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D90B0A571E; Mon, 24 Oct 2022 12:59:47 -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 A0C77B815F6; Mon, 24 Oct 2022 12:12:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 017FBC433D6; Mon, 24 Oct 2022 12:12:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613555; bh=fzcrBvCZW7mXwVLKymyezTswcQKSn+eSTCs7/2xGe8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qCiOgUxqXTEekqdxYFZOsiTrzb1xBKNoDq49wmNC29OMg5GsiggFCcUJbV2Di5Afn QudTPrzVQQXAeWSfGWZabvWYqUPRgm16x7M23ls5GzNuL6dZJZVKFi7nUBbjB62+C9 fYs15zvr4hGmi7IWq8pre7p4IQdlbw85YyxqlghU= 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.4 181/255] iommu/iova: Fix module config properly Date: Mon, 24 Oct 2022 13:31:31 +0200 Message-Id: <20221024113008.882222839@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113002.471093005@linuxfoundation.org> References: <20221024113002.471093005@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747607756719807198?= X-GMAIL-MSGID: =?utf-8?q?1747607756719807198?= 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 a0637abffee8..6c19b09e9663 100644 --- a/include/linux/iova.h +++ b/include/linux/iova.h @@ -132,7 +132,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);