From patchwork Thu Mar 30 06:01:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 76901 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp901136vqo; Wed, 29 Mar 2023 23:03:26 -0700 (PDT) X-Google-Smtp-Source: AKy350aIcL/NGy72p+q+tqGX2YPumXISctv6KXvzJq3d1X/vBdeji7foepMgBILjHfMmky0rnm44 X-Received: by 2002:a17:903:70f:b0:19e:bc8e:6421 with SMTP id kk15-20020a170903070f00b0019ebc8e6421mr18135703plb.47.1680156206498; Wed, 29 Mar 2023 23:03:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680156206; cv=none; d=google.com; s=arc-20160816; b=aLflv4eR63che6EePHTCl8YkVM5xsDmS9qEnqLw2VGiBwIFwhGai0vPNUrvm0dzTm0 HhmBPRYDcl4aE4s4th76ZB7NsIouEvvOG5V0qg9UnNhOghI78s1ufKH+8W80eXDGBrcY knVSEZ6ZoLYD7hwLiO5p4I5HNcBoBtbOGoguCeVfjSRV2kBsIP5gmROSnOkxZjMFEBHz FagWRFnKlvQ6na5NPX70pRAGQYhAbqvf4WZV+Sfc+WVEgsDUX53uV7JEL56RkCf/UcKE Wbume4S+Gqw93ahVlhc63lydMtBKJEGt6+MgUgCMSPhnxZ3205AKBgVm3aFC2paMiB1I BjKA== 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=7zxKJM+hffyzY8/mnbPlZjh2fBXL9zN4AP03zResViY=; b=Pe1cB0aBnU2UzqoG8/JpAkPr1Sfhu/m369QOJATBrdOjoTLbrrd7yy3h6LXGpqHpTP YATW/0GbgB6YqSKl1Miz54m9k7A0lzboNCdUoL7ipBHt9E6zGP+7v7MwgS8PdMiYnIBl +1zpQA4WzsUMjVRL2mlYVob8tkFKSESDMFml2/CNQ7EQ8n33PDNvgYg2xBxBS2xGCmDc w995h7U8Yo1my5gK4g94SwCNcLx6pw/uzunAakCP53/+ULImErNtVWm6qV/1zQhnjZRq /ilvg6M/kpG6Zup35Uy3GLZSnKN2YzW+ynGnNZJ0IcGlZrvndQ3T50+0+InxV7KK45JB H8wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=c11kkHW1; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n189-20020a6327c6000000b004fbb6a09b99si34725211pgn.341.2023.03.29.23.03.11; Wed, 29 Mar 2023 23:03:26 -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=c11kkHW1; 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 S229965AbjC3GBN (ORCPT + 99 others); Thu, 30 Mar 2023 02:01:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229517AbjC3GBL (ORCPT ); Thu, 30 Mar 2023 02:01:11 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EA3DE4 for ; Wed, 29 Mar 2023 23:01:09 -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=7zxKJM+hffyzY8/mnbPlZjh2fBXL9zN4AP03zResViY=; b=c11kkHW1gkFJ1DDyT7B7Lq4ggE elct902Q3wmKH6ivTqzkxq1kIRLCVebdk+0lefqrqgPmmW3OzkXwLG40UAqboNlENMi1KCODtF3P0 Shr/S+4CazLK+B/7ftHazEpioiTtuZ4wZzTuAS3H1LX5bi5IXJKZBGo1UV2XNDDizxS4aEGYRBtkM VYRm3K/RrsZnMJGQ27wEp3eC6jZ4VZpi6x9vDzdFvopfIFx9cmQ7l2+iXo68Y9fYYB1Yqe8ma2PlK 6A0qUx+04xqOAOWLKKlcuPDySZHbhkmKgIE//glpNni26064xWleSL1/4DMSse8O8JLXg+DFSHVh5 /UrfNPYQ==; Received: from [2601:1c2:980:9ec0::2764] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1phlLQ-002hoJ-0x; Thu, 30 Mar 2023 06:01:08 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Joerg Roedel , Will Deacon , Robin Murphy , iommu@lists.linux.dev, Conor Dooley , linux-riscv@lists.infradead.org Subject: [PATCH] iommu: PGTABLE_LPAE is also for RISCV Date: Wed, 29 Mar 2023 23:01:05 -0700 Message-Id: <20230330060105.29460-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761771474036672532?= X-GMAIL-MSGID: =?utf-8?q?1761771474036672532?= 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") 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.