Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2389375rwl; Thu, 30 Mar 2023 09:35:55 -0700 (PDT) X-Google-Smtp-Source: AKy350alpC2ee99dx5UY8Ui8PNU31SemqG9ZHMP0SETd1aUw9kly1GeB2XB2qpr93rZUxNb9KF1l X-Received: by 2002:a17:906:74c3:b0:944:4d7:d3d9 with SMTP id z3-20020a17090674c300b0094404d7d3d9mr2397606ejl.2.1680194155406; Thu, 30 Mar 2023 09:35:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680194155; cv=none; d=google.com; s=arc-20160816; b=ccAHutBC5GBI5WDN7FqeHJcSoC+f3EyBpiHtWbffunJ+iXis3+M7hOHrhxwpHmf5Ld YX+m/oMNJU5c4Qzoj9ZvTqBRhq4Fj9r2+mmQXGszhb2Qym4PFF4IdiICnMhuFnFN13z+ KPbkVc6dAXEQAAqPAj0hPlRmlfjtAxxZ3l9Ur2/eBWPapkzDV3iV5vJFW5WSWV8oxEQD N5omy7nJ72c+MnKIiSXUUT8HC52OZ/Jg0IPSi9Wojs0D8M3cn/VB+fM1cjB26x7yyC7M ZfI7EGdxw8CDyatl/2SEuI8RXdlh8fm567+h+9Anduz0u0PSoWt3wsiWt3xEEl1dH7fA aUiA== 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=8iqoB/LOhd3eqDt3y8zW+T/WDSFAa0SLrXN+ihNfCkM=; b=WbsrpkzitK3SHGSoCxQC1NLgqklXDQgEQTZVLRzNEJyME/U0uU9mnnJnUN2nYvWJJ1 PW1zYUaon12hkbKdhrLdLydiegPb2igcb8zFX92yHdzvsTxMTrTxVLHnrV9EbCGwTKm7 LF6hKozY7B4izXB0cpk3g+zdWWFpZ3LHvF+rO4X15Zv1Y6yD3hdupjZoEcJ/wnCBk7Eb y4faC5lWze96748xe+3R6wJdFzHMl3XuWdhFtzLhiywPLMC0uxHzkZrzDQ4l08Py/qcI qIvUmcq7BVaD8HX0Fz/jTyD9TrUJBGxYXAe4vW3QeaXBHmtjdLBheQnTkcjJX1UEKRYL nQZg== 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 lz5-20020a170906fb0500b0093defbd6279si3470ejb.1024.2023.03.30.09.35.28; Thu, 30 Mar 2023 09:35:55 -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 S231686AbjC3Qeb (ORCPT + 99 others); Thu, 30 Mar 2023 12:34:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231402AbjC3Qea (ORCPT ); Thu, 30 Mar 2023 12:34:30 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F232C168 for ; Thu, 30 Mar 2023 09:34:29 -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 11E892F4; Thu, 30 Mar 2023 09:35:13 -0700 (PDT) Received: from [10.57.54.254] (unknown [10.57.54.254]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9B4883F6C4; Thu, 30 Mar 2023 09:34:27 -0700 (PDT) Message-ID: <2529dd93-2cb2-6ed8-20c0-c424e6613717@arm.com> Date: Thu, 30 Mar 2023 17:34:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] iommu: PGTABLE_LPAE is also for RISCV Content-Language: en-GB To: Randy Dunlap , linux-kernel@vger.kernel.org Cc: Joerg Roedel , Will Deacon , iommu@lists.linux.dev, Conor Dooley , linux-riscv@lists.infradead.org References: <20230330060105.29460-1-rdunlap@infradead.org> From: Robin Murphy In-Reply-To: <20230330060105.29460-1-rdunlap@infradead.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 07:01, 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 RISCV as an allowed ARCH dependency to fix these problems. > > Fixes: d286a58bc8f4 ("iommu: Tidy up io-pgtable dependencies") BTW that doesn't look like the right fix target - this presumably dates back as far as when ARCH_RENESAS was added to RISCV, such that it was possible to start selecting IPMMU_VMSA without COMPILE_TEST? Thanks, Robin. > Signed-off-by: Randy Dunlap > Cc: Joerg Roedel > Cc: Will Deacon > Cc: Robin Murphy > Cc: iommu@lists.linux.dev > Cc: Conor Dooley > Cc: linux-riscv@lists.infradead.org > --- > drivers/iommu/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -- a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > --- a/drivers/iommu/Kconfig > +++ b/drivers/iommu/Kconfig > @@ -32,7 +32,7 @@ config IOMMU_IO_PGTABLE > config IOMMU_IO_PGTABLE_LPAE > bool "ARMv7/v8 Long Descriptor Format" > select IOMMU_IO_PGTABLE > - depends on ARM || ARM64 || COMPILE_TEST > + depends on ARM || ARM64 || RISCV || COMPILE_TEST > depends on !GENERIC_ATOMIC64 # for cmpxchg64() > help > Enable support for the ARM long descriptor pagetable format.