Received: by 2002:ac8:156:0:b0:3e0:cd10:60c8 with SMTP id f22csp1211568qtg; Thu, 30 Mar 2023 09:59:03 -0700 (PDT) X-Google-Smtp-Source: AKy350Y1i+gDFjB/tt0L8n0EiZEvtGoXVBIGKc4oaB/+rHur4XVC+Pw5muNPeP4OxAmXSSiH8+bj X-Received: by 2002:a17:902:b702:b0:19a:723a:8405 with SMTP id d2-20020a170902b70200b0019a723a8405mr2994044pls.6.1680195543644; Thu, 30 Mar 2023 09:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680195543; cv=none; d=google.com; s=arc-20160816; b=pjhpVSWNHrhEbMipmSyMG1k0+D0YE3WmV8q1iEhjN9hRLvhFDIjOYvxPRgBnK2Yo1y IP420/6mXPkX4vOw1lKqmECVTDDJom6PtnI/yaNroE84FSo1xUtN0Xnm3memhR8uBgyv 4nwqie2jDOylz3A6pNZMCpwPefz0ovld8jlzN6ttEEQexYNK1LDORDPX4cOk6GyPe2YW T0UDCiIidI/UFK49XDeUflaOsSqRWqN439GoHPmZOeMgjkOT+d7/mIfDApQNrYiL9iEz MvBchsQ/psGygG7eDTFVoo2u/CsKJrReRNzUNBhHwdLSnzERNd0+SHb3TnYDRZdgqZMy YzGQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=lH22MfJIcQmsTzdoJbOcWiocllL7iIB6Gn2R5IPwbtA=; b=wLzQ/F4ADT4JfIzyWPKSj/pNvjfuUETS6k5XBfdD9GNmvs4XhMKQxauMrhHFsaSh6D mLeIA76v8PSVaavZVQDgNA8Hlvg85moRDqSH/sl4eY5YV9+9QwUYXheIuOw4e++BAxM7 6goyMAU2mmzgnL/mBNMHsRL+kS+ZbzdpAXPAVF+9jQ2JfjxroexvlB7AkOHdKFZuGK4x 9IEs08McYkvr4/2woUAeQzUB+YIkKADNbvnoT2oVIRkB8MUfoenH1Dhj+7CUupalVp4x QRYgjde7CXbeJ9xfsBAXuwR9mExFguExFOyQYWAwVII/cUz1qWg24403DvwVsacTAp8D EGSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=chSMsIYm; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k6-20020a170902ba8600b001a25c4e24ccsi7211152pls.608.2023.03.30.09.58.41; Thu, 30 Mar 2023 09:59:03 -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=@infradead.org header.s=bombadil.20210309 header.b=chSMsIYm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230391AbjC3Q6W (ORCPT + 99 others); Thu, 30 Mar 2023 12:58:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbjC3Q6V (ORCPT ); Thu, 30 Mar 2023 12:58:21 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87B345B8E for ; Thu, 30 Mar 2023 09:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=lH22MfJIcQmsTzdoJbOcWiocllL7iIB6Gn2R5IPwbtA=; b=chSMsIYmRHyrgsJenrc6k7iulK vkLxxOqgENYMoMgVQdjMvd3+YmI/wtTuZwoWhojz7C/5UWFv+1oitVkJjl9TXV8SLPAu1F6Jap+1h NtUsnCtOHxmZPgUYdGuDSHsoKjwHcrQQ1j56AooEiKQppTvIeFoJW1ku7IZYwNVszKVqNcKPRX9aj FxMwGPvAffQ6rA4TLkTnuYkxW7gwhwcfHeC77OTg78cbdPtN0FbG9wLTASwJJf2428tPWaQmFCOuN s/xowZsTepl0+4ghPdAPaf6DGOOPZtQj27G1yXhVLsZrvGqV6w3b+novy4/82dO3dhXcKD5H1wARe nt4FBkmQ==; Received: from [71.59.149.187] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1phvbO-004YvS-2H; Thu, 30 Mar 2023 16:58:18 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Geert Uytterhoeven , Joerg Roedel , Will Deacon , Robin Murphy , iommu@lists.linux.dev, Conor Dooley , Lad Prabhakar Subject: [PATCH v2] iommu: make IPMMU_VMSA dependencies more strict Date: Thu, 30 Mar 2023 09:58:17 -0700 Message-Id: <20230330165817.21920-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,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 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. 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