From patchwork Wed Oct 19 08:32:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5166 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp253908wrs; Wed, 19 Oct 2022 03:58:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6jqHRR5+TZrtyn6eEkuzF/T/pjLOXL0301/nQiNyHse2o5bQFpGD9p+5cfzAqwplXIU7b0 X-Received: by 2002:a63:cf48:0:b0:439:7d1c:fedc with SMTP id b8-20020a63cf48000000b004397d1cfedcmr6805371pgj.281.1666177122171; Wed, 19 Oct 2022 03:58:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666177122; cv=none; d=google.com; s=arc-20160816; b=dku6nQzkNRQNbZZyym2ludvSFR9hHErejfaJzOyzPK6VZkRwwNgPCzYQ/SZEHz7qqv WNW8WtKDRJk9oKkMUfVlQWhO5pEiJAUY8XTzONFCVN73fcj3VN/xt5WRqBDzkFvuYMPt C7/mamV3hgQUiyww5MAPZGEbvxQBsgin0aD5OxI9fayN2XCh+vU8t2GTgifSqjYEa9WK 3qJmS7Shq4R7QJ0Gz7zTFDVSXz2NKl/lJI5OYEhfFVzdYdu8N86hONYrGJf/e/u4hE+a +zAN8vx1UlEhY+3v8Om6ZVu0ddi+/MpnxnnVU1qpeXz5IU0jJyE+B3OYdSppB/t7dHPy ClhA== 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=75D//KZgHpYEcOwXlamXNLfZpo2zN1wlZC84KO2X8vY=; b=mKLJMQ4Jmco6jQe3ARfLAMRHvPtIEptkZnV/eQm4djxPcKut3HOKCHGr5eY4otQXMh r9VKnnqnlPlNTk7WJwbHSDPpj93K/C52nt5ZVwuMHnFpxWSxQ2U93/p2C1e2R4crdSQV J2slPZLM8Ge5hRWfuOHVaSBsXEP9l3QHrP7g/aicJSqWLzaHYqoSw4WwCayqCrbMLjb6 wWxcN/KPjbXOzRYJrxWPAQ4q5J90cFslXBxqD+ffBA2BLu/nXkaajo4Q4AKPuFJSL2fC oS41IDoHUkUfAD9OmXEvOI4a19BSRaG8LYJRfSK7q4F13oQReImJY09r94FujUqRD4JI LKUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KXZzLOs1; 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 q12-20020a638c4c000000b0046b08e9060fsi18324840pgn.485.2022.10.19.03.58.29; Wed, 19 Oct 2022 03:58:42 -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=KXZzLOs1; 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 S234688AbiJSK6A (ORCPT + 99 others); Wed, 19 Oct 2022 06:58:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234738AbiJSK4i (ORCPT ); Wed, 19 Oct 2022 06:56:38 -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 5452B125020; Wed, 19 Oct 2022 03:27: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 E6AFBB82499; Wed, 19 Oct 2022 09:08:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50C63C43470; Wed, 19 Oct 2022 09:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170488; bh=5Yd5FDDaRj03dfa4ccEHYsYfRgXcz6zUyLgXc1qtPKY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KXZzLOs1AarKEfiCVyE2FSuvtfXl4vpMnUpC6GC/gQXNWBQtIg4cda2lSYjX8k0aK y9XXR+1fiE3wm29Wtf9yFCWnMc6N7fnEQ24Av3TgLndYPsvYq/4jdd5qudAEEXBIyr Cv0ODjYaf6Arqr0p+9ckFRj5aVX4+/YdGnvqN0nM= 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 6.0 642/862] iommu/iova: Fix module config properly Date: Wed, 19 Oct 2022 10:32:09 +0200 Message-Id: <20221019083318.289016215@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747113341742370730?= X-GMAIL-MSGID: =?utf-8?q?1747113341742370730?= 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 c6ba6d95d79c..83c00fac2acb 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);