Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp587225rwd; Tue, 16 May 2023 05:27:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72YKNaTz71hYdQfSqpDr49iJFwh5ecKmwPWCnO9GDgjiGQCXH48O/ZgG0IMgq7ru1aTtob X-Received: by 2002:a17:902:bf47:b0:1aa:ebaa:51ce with SMTP id u7-20020a170902bf4700b001aaebaa51cemr33249727pls.14.1684240068037; Tue, 16 May 2023 05:27:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684240068; cv=none; d=google.com; s=arc-20160816; b=LjR1ts5G7KQnvyPBX9O1kVONB5QNu1e0ik2b8R1+ZZ8TDY3aQh07G5ZI184kyNN4aW 9ApPM2SyZTGE4JX+Z32f3a3DpYqfteQZi7oyE1ZDi5SZs2JiSo40VRLIlCQ8Gqj1j2Zm bnL6kAJwNqvaR7vguLBxZJn6jhGf375edJ5IJNqK5B2G9iHNhVWmUABEj6QAjV8kp80K WB4aUn5kwaohxVxGzzvmgEw82QSLnffE2fbS/TXBNssnfTAW5jbN7yDZLuZXTYXnwrrA Y5+7u5U/TjgtcjmKQgvlmEBw61LRjMJ+LEkWpwGvEHAbjO7AhFI+8VIraCAqla/fn4eJ zryw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=qJyhEizViCnswFsvpCEW7mvGM22hVVOGx5Bius0nfz0=; b=Jw5Q74hXFA3Cxqe8fBAx7Rfp16Djs5vitBv6JR9D8oIXckH+8jPXlCOrd06c9bKweM 5GheooGS0N+WmIY4VmqkflTxP5hDYe0qcHJRE9ctIVesehSG4K6qnoRaPveA3GfGhiAL tmKEvwjwEoKSvWbqSH/Ce0lcj9WPmzDprqEd53jGjANlIAQ8ijL/u3M640DkXN3+OgDl puqJZPpbKExxEjrlj+EWTELIs6nbQiEuqIgAawuQsOd1e9ebs6tac85dMKM/3XgZZL/X fU0Ymz3dRpY9EV2ZU9hjo9tCyT5B4m+uuRCYUb3ePDPcJDCi/ydgTAMo3mvyluAKB3Or Llpg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p17-20020a170902e75100b001a51bb4ad7dsi19088869plf.45.2023.05.16.05.27.33; Tue, 16 May 2023 05:27:48 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232355AbjEPLwF (ORCPT + 99 others); Tue, 16 May 2023 07:52:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233130AbjEPLvo (ORCPT ); Tue, 16 May 2023 07:51:44 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 306E27EE3 for ; Tue, 16 May 2023 04:51:17 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7FB242F4; Tue, 16 May 2023 04:52:01 -0700 (PDT) Received: from [10.57.83.102] (unknown [10.57.83.102]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 878AE3F663; Tue, 16 May 2023 04:51:15 -0700 (PDT) Message-ID: <29f6d2c8-fc10-6120-1ce6-888db8db13dc@arm.com> Date: Tue, 16 May 2023 12:51:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v2] iommu: make IPMMU_VMSA dependencies more strict Content-Language: en-GB To: Randy Dunlap , linux-kernel@vger.kernel.org Cc: Geert Uytterhoeven , Joerg Roedel , Will Deacon , iommu@lists.linux.dev, Conor Dooley , Lad Prabhakar References: <20230330165817.21920-1-rdunlap@infradead.org> From: Robin Murphy In-Reply-To: <20230330165817.21920-1-rdunlap@infradead.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On 2023-03-30 17:58, Randy Dunlap wrote: > On riscv64, linux-next-20233030 (and for several days earlier), > there is a kconfig warning: > > WARNING: unmet direct dependencies detected for IOMMU_IO_PGTABLE_LPAE > Depends on [n]: IOMMU_SUPPORT [=y] && (ARM || ARM64 || COMPILE_TEST [=n]) && !GENERIC_ATOMIC64 [=n] > Selected by [y]: > - IPMMU_VMSA [=y] && IOMMU_SUPPORT [=y] && (ARCH_RENESAS [=y] || COMPILE_TEST [=n]) && !GENERIC_ATOMIC64 [=n] > > and build errors: > > riscv64-linux-ld: drivers/iommu/io-pgtable-arm.o: in function `.L140': > io-pgtable-arm.c:(.init.text+0x1e8): undefined reference to `alloc_io_pgtable_ops' > riscv64-linux-ld: drivers/iommu/io-pgtable-arm.o: in function `.L168': > io-pgtable-arm.c:(.init.text+0xab0): undefined reference to `free_io_pgtable_ops' > riscv64-linux-ld: drivers/iommu/ipmmu-vmsa.o: in function `.L140': > ipmmu-vmsa.c:(.text+0xbc4): undefined reference to `free_io_pgtable_ops' > riscv64-linux-ld: drivers/iommu/ipmmu-vmsa.o: in function `.L0 ': > ipmmu-vmsa.c:(.text+0x145e): undefined reference to `alloc_io_pgtable_ops' > > Add ARM || ARM64 || COMPILE_TEST dependencies to IPMMU_VMSA to prevent > these issues, i.e., so that ARCH_RENESAS on RISC-V is not allowed. > > This makes the ARCH dependencies become: > depends on (ARCH_RENESAS && (ARM || ARM64)) || COMPILE_TEST > but that can be a bit hard to read. If it helps, Reviewed-by: Robin Murphy > Fixes: 8292493c22c8 ("riscv: Kconfig.socs: Add ARCH_RENESAS kconfig option") > Signed-off-by: Randy Dunlap > Suggested-by: Geert Uytterhoeven > Cc: Joerg Roedel > Cc: Will Deacon > Cc: Robin Murphy > Cc: iommu@lists.linux.dev > Cc: Conor Dooley > Cc: Lad Prabhakar > --- > drivers/iommu/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff -- a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > --- a/drivers/iommu/Kconfig > +++ b/drivers/iommu/Kconfig > @@ -287,6 +287,7 @@ config EXYNOS_IOMMU_DEBUG > config IPMMU_VMSA > bool "Renesas VMSA-compatible IPMMU" > depends on ARCH_RENESAS || COMPILE_TEST > + depends on ARM || ARM64 || COMPILE_TEST > depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE > select IOMMU_API > select IOMMU_IO_PGTABLE_LPAE