From patchwork Thu Oct 20 07:58:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 6032 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp128847wrs; Thu, 20 Oct 2022 01:11:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+jPu2+xKWf28HXjDDu6Xrm+pItT+YbvEOE+jJcMRIvNEOBMjpzktUVxKETFiDHSy0aNak X-Received: by 2002:a17:903:124c:b0:184:cb7e:67c5 with SMTP id u12-20020a170903124c00b00184cb7e67c5mr12876495plh.117.1666253473043; Thu, 20 Oct 2022 01:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666253473; cv=none; d=google.com; s=arc-20160816; b=aj8HAxzpongiuNCRAsg7VP64LL810McqSkzrKAdiwKiTNNNu6xQvbI8OIbwS+sfY47 ygeViXBKRCDJx9L8+g7RSnA7NxILVB79EILvq8ckYapGX2YO2ew4N4mQ81USXvjgwpab VQ/+hcFgugXA22FnDXPIb7QTDJeX5ENKKG6ukOHs2PFBUokzPixsmfWXE8n65RBRgl5y 3D1Hg7aHA8U+TRO4XL5ffNSb97S7ytHOTv0ObfuuoeZ7pLxG+AyLqwJyeyrrxvY27L8d b9Dr+3QGJ23zRXwW9mrWTUXceTUft6IfmNhq3HAOSFTPX9w45rpr2aa2NVUwVn1sjXPi 02+w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pAsIYw7sZ9pedrVTYHgIfzcW6BaLpjWwdgXvgEmQOaY=; b=pw4DTg55UVBavKg0b21TOk0JH12rRnHWtwz5d1JdbrMJsUBdWBJwN+VKYonthJJ5jr ix/oefNT1Cp9JpWAgrHJ9vZxTN2VRGq7wnP3OL3V0bl1K++l1mz8+ZZu/KHF6n+UXEdp rvlAoyhsvNpCJqlU8AKQ5MY3QyTX7Jx8NWp4KlSOVXjUPPf8eaGKHUHBFTN4C5qX3gSI LOtl3RVAww5FHZ2K24JTVzVYLM5bLSsBwf7wbWgpAsF+SPAUrw/LxkNGggS/JSzrvQ+6 Q5yA7fSzWxKwNvr1N1JNm066KJID9LjX/F5ATF51e8TiLlH7LltTjOhbscEiU2vqR79F w0Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b="KVCqQo/Q"; 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 o27-20020a63921b000000b00448c6dd8fa9si19217189pgd.444.2022.10.20.01.11.00; Thu, 20 Oct 2022 01:11:13 -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=@ventanamicro.com header.s=google header.b="KVCqQo/Q"; 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 S231177AbiJTH7P (ORCPT + 99 others); Thu, 20 Oct 2022 03:59:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231168AbiJTH7C (ORCPT ); Thu, 20 Oct 2022 03:59:02 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E71D18027C for ; Thu, 20 Oct 2022 00:59:00 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id 128so18536450pga.1 for ; Thu, 20 Oct 2022 00:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pAsIYw7sZ9pedrVTYHgIfzcW6BaLpjWwdgXvgEmQOaY=; b=KVCqQo/Qymbi41s1GUvHpj3Wa5ZypO8gqStPS/9xn5zgaSL7zarcIcxDhnsDA/Iv6H xDxS2Ox3UAG1mZR376x/ShdVFwZWb1o8wEai1lgskVK8Y2IGL9/Ulx0HVzk8RtyhbKhm QP/grnXg+4nuN2+5lplMkJjPRv6pcSnWZCLkH/y8xE86Y4JaQp9Cijci1o5tTkUDzGPj rZU62/JDjfV98OLvz/x0lhSpy3gj5m3JOcNChEIHA6cpCS4LSCXSz7KKmPPpcsPMgEdl JOAGQSC4At6e1OBUJ0L17wsET+PnN4fPY/XJvBo81AgTiL+SNJb5OfHwaMExuIQ2rZ+/ 2AzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pAsIYw7sZ9pedrVTYHgIfzcW6BaLpjWwdgXvgEmQOaY=; b=7+74mbtNyuRoyBJcpNfNmc6UQCE5DK3vCKfOMYxKvwar5RbwfceQAILkbX1ve+oIzP 6tEwViBTeiCJdv5QS/HkpsL4wB/0SyZbfux0frhMs10/CDa7UIKxTcWURgFbEBrwKdjr Akb3QwyOaIkaDathZ4N7U+23o9LCGWO7pIYjEuCzQga8rpln9N1mTMuT+G35zlH+Zgkv ddn2RZG/6qS7ENl9+LNpEWcfyimv0bDc/PrAZOWda2HL59Bg3dP5FkJkL0NBwFdV9jFH aoKgM+nQx2T8EmBPkMLet7IV6S3Y8Dt4/4UUWrp64HeUoJoSHrlucr5oHPqM1GiihLUF OyVQ== X-Gm-Message-State: ACrzQf2aD3VWOpBTmegn2jb0xd+xBg1Ld5tCyTsurBLkSgN/hpbpc9pn aro/kD5Senl8NYSTpY0CfC1F3w== X-Received: by 2002:a63:cf4f:0:b0:462:da7a:1ded with SMTP id b15-20020a63cf4f000000b00462da7a1dedmr10543458pgj.605.1666252739916; Thu, 20 Oct 2022 00:58:59 -0700 (PDT) Received: from anup-ubuntu64-vm.. ([171.76.80.23]) by smtp.gmail.com with ESMTPSA id h30-20020aa79f5e000000b0052dfe83e19csm13206438pfr.16.2022.10.20.00.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 00:58:59 -0700 (PDT) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley Cc: Atish Patra , Heiko Stuebner , Arnd Bergmann , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Andrew Jones , kernel test robot , Anup Patel , Conor Dooley Subject: [PATCH v5 1/4] RISC-V: Fix compilation without RISCV_ISA_ZICBOM Date: Thu, 20 Oct 2022 13:28:43 +0530 Message-Id: <20221020075846.305576-2-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221020075846.305576-1-apatel@ventanamicro.com> References: <20221020075846.305576-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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?1747193401762879910?= X-GMAIL-MSGID: =?utf-8?q?1747193401762879910?= From: Andrew Jones riscv_cbom_block_size and riscv_init_cbom_blocksize() should always be available and riscv_init_cbom_blocksize() should always be invoked, even when compiling without RISCV_ISA_ZICBOM enabled. This is because disabling RISCV_ISA_ZICBOM means "don't use zicbom instructions in the kernel" not "pretend there isn't zicbom, even when there is". When zicbom is available, whether the kernel enables its use with RISCV_ISA_ZICBOM or not, KVM will offer it to guests. Ensure we can build KVM and that the block size is initialized even when compiling without RISCV_ISA_ZICBOM. Fixes: 8f7e001e0325 ("RISC-V: Clean up the Zicbom block size probing") Reported-by: kernel test robot Signed-off-by: Andrew Jones Signed-off-by: Anup Patel Reviewed-by: Conor Dooley Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- arch/riscv/include/asm/cacheflush.h | 8 ------ arch/riscv/mm/cacheflush.c | 38 ++++++++++++++++++++++++++ arch/riscv/mm/dma-noncoherent.c | 41 ----------------------------- 3 files changed, 38 insertions(+), 49 deletions(-) diff --git a/arch/riscv/include/asm/cacheflush.h b/arch/riscv/include/asm/cacheflush.h index 8a5c246b0a21..f6fbe7042f1c 100644 --- a/arch/riscv/include/asm/cacheflush.h +++ b/arch/riscv/include/asm/cacheflush.h @@ -42,16 +42,8 @@ void flush_icache_mm(struct mm_struct *mm, bool local); #endif /* CONFIG_SMP */ -/* - * The T-Head CMO errata internally probe the CBOM block size, but otherwise - * don't depend on Zicbom. - */ extern unsigned int riscv_cbom_block_size; -#ifdef CONFIG_RISCV_ISA_ZICBOM void riscv_init_cbom_blocksize(void); -#else -static inline void riscv_init_cbom_blocksize(void) { } -#endif #ifdef CONFIG_RISCV_DMA_NONCOHERENT void riscv_noncoherent_supported(void); diff --git a/arch/riscv/mm/cacheflush.c b/arch/riscv/mm/cacheflush.c index 6cb7d96ad9c7..57b40a350420 100644 --- a/arch/riscv/mm/cacheflush.c +++ b/arch/riscv/mm/cacheflush.c @@ -3,6 +3,7 @@ * Copyright (C) 2017 SiFive */ +#include #include #ifdef CONFIG_SMP @@ -86,3 +87,40 @@ void flush_icache_pte(pte_t pte) flush_icache_all(); } #endif /* CONFIG_MMU */ + +unsigned int riscv_cbom_block_size; +EXPORT_SYMBOL_GPL(riscv_cbom_block_size); + +void riscv_init_cbom_blocksize(void) +{ + struct device_node *node; + unsigned long cbom_hartid; + u32 val, probed_block_size; + int ret; + + probed_block_size = 0; + for_each_of_cpu_node(node) { + unsigned long hartid; + + ret = riscv_of_processor_hartid(node, &hartid); + if (ret) + continue; + + /* set block-size for cbom extension if available */ + ret = of_property_read_u32(node, "riscv,cbom-block-size", &val); + if (ret) + continue; + + if (!probed_block_size) { + probed_block_size = val; + cbom_hartid = hartid; + } else { + if (probed_block_size != val) + pr_warn("cbom-block-size mismatched between harts %lu and %lu\n", + cbom_hartid, hartid); + } + } + + if (probed_block_size) + riscv_cbom_block_size = probed_block_size; +} diff --git a/arch/riscv/mm/dma-noncoherent.c b/arch/riscv/mm/dma-noncoherent.c index b0add983530a..d919efab6eba 100644 --- a/arch/riscv/mm/dma-noncoherent.c +++ b/arch/riscv/mm/dma-noncoherent.c @@ -8,13 +8,8 @@ #include #include #include -#include -#include #include -unsigned int riscv_cbom_block_size; -EXPORT_SYMBOL_GPL(riscv_cbom_block_size); - static bool noncoherent_supported; void arch_sync_dma_for_device(phys_addr_t paddr, size_t size, @@ -77,42 +72,6 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, dev->dma_coherent = coherent; } -#ifdef CONFIG_RISCV_ISA_ZICBOM -void riscv_init_cbom_blocksize(void) -{ - struct device_node *node; - unsigned long cbom_hartid; - u32 val, probed_block_size; - int ret; - - probed_block_size = 0; - for_each_of_cpu_node(node) { - unsigned long hartid; - - ret = riscv_of_processor_hartid(node, &hartid); - if (ret) - continue; - - /* set block-size for cbom extension if available */ - ret = of_property_read_u32(node, "riscv,cbom-block-size", &val); - if (ret) - continue; - - if (!probed_block_size) { - probed_block_size = val; - cbom_hartid = hartid; - } else { - if (probed_block_size != val) - pr_warn("cbom-block-size mismatched between harts %lu and %lu\n", - cbom_hartid, hartid); - } - } - - if (probed_block_size) - riscv_cbom_block_size = probed_block_size; -} -#endif - void riscv_noncoherent_supported(void) { WARN(!riscv_cbom_block_size, From patchwork Thu Oct 20 07:58:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 6033 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp128859wrs; Thu, 20 Oct 2022 01:11:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ew03S1Fgb5yi4QcRBPiMFnVKMIE+G37L0i+6cX9QXkuPzX5QLbHWYDLx6vPPtyvHMVMI4 X-Received: by 2002:a17:90a:540e:b0:210:1e26:9422 with SMTP id z14-20020a17090a540e00b002101e269422mr6531722pjh.100.1666253475536; Thu, 20 Oct 2022 01:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666253475; cv=none; d=google.com; s=arc-20160816; b=ylHZ3D3rfwuwu5LQRwGF9sZVqPf8yQBlTPdqk3OAk40CR/6n7+YsbzB3LbnonqDfAE DUR/zE58CHHNr9bxc9cIJ63a2fN9UIOX/1rkOQSnex73Yy8rjwkuSg7nd/IZC+vis8r2 4nZeTBcpzget69rlAcAVqduWndggMjG6nRJjeE65ZDVMKO9fkTkYOCz89s4PQmkqeoS9 k1g2lQr7BQiFwKXn8hCi00dHEN2QbiFBDfsklkb9qA00efJTp8ogQw8+IsC2oRt+rFGS ssHiluqg5pxu1MbOYN7FTg537dlmOO+sj6Woim/wNyeGT01q6ZuZQXqbfEyh05Traf8A 6S4A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XuilwbSjTkXNw6j4kYlnUJ0pwJrZlWFK5/+cTZqJbNQ=; b=z1O9aa2V/552O5/LGNVdUydYvMyfIHXAxwTOGJ0LutuHPVzf0MTEt9wX4vDldwzyl4 rLNGWNkQMmKy19PuFBjfiJBiCd94NO+1yxWFkcF1kcWfdPuM2DH3dmmSiK7aXfnc9DHw 3YTtvDaCh9CB5/EEfeW1SvBchLCYfVSeEhySw9/o2uMa+JObl5gQQI6gDMulgtARViQZ K8Dn/rUIsK5np8uAD9eizIAcGHd6kwmmxp/YU4LscAmAvwTv+hGxMNtiwKvbsF0BdEGD scBKxU+PxG70gQO6j9llO8zsoFxEKJKmAR/rpPkMTpFDKNouT6rJAHdZ4WStfQjRrSlU kAEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=ZKNy4Em5; 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 r7-20020a635d07000000b0044c634e3051si21657122pgb.274.2022.10.20.01.11.02; Thu, 20 Oct 2022 01:11:15 -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=@ventanamicro.com header.s=google header.b=ZKNy4Em5; 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 S231190AbiJTH7R (ORCPT + 99 others); Thu, 20 Oct 2022 03:59:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231205AbiJTH7F (ORCPT ); Thu, 20 Oct 2022 03:59:05 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1ADF18027C for ; Thu, 20 Oct 2022 00:59:04 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id q10-20020a17090a304a00b0020b1d5f6975so2352456pjl.0 for ; Thu, 20 Oct 2022 00:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XuilwbSjTkXNw6j4kYlnUJ0pwJrZlWFK5/+cTZqJbNQ=; b=ZKNy4Em5+FuBRP2gsIy40Yrk6FnGU3CqJrbS4NGA0H4o/nv3ogel1a+BelUzdLO1+g EU+MmxJ/fG6lCskSK8CjnrO6mvqd192jk75tdkMPCx2sj0HVYrLPSIl/FCjUKLQqhXIR O+B28Y0IXu56SXNEgwVgKrhhZ6VobhnpNyQY2oG3K0B/EDQxN58o7Xd2xk1gaHZyl3fF njlaQHg7PekkPyXa7GZgMueBWS6N6jJ9f91rD5qgIsxZw9SBJj74KQ+Ze7eazFE4kmgx E0MgKtM0nHURmmTr65D876z74uLsOqBlxTsCGuq16N7OZB/lo37TXNpMWUkkYyqExwcp ohiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XuilwbSjTkXNw6j4kYlnUJ0pwJrZlWFK5/+cTZqJbNQ=; b=nt/YEA4WlhHgqWBYt5RKh0akxUMMIKOQsEEBz4ogQs8BGpL/uCHhhemZmr+9pB9xg0 oufUjil5VPqUNWsis2qnfUN6AQMy4lH0KZ9LD/GpMgc+iQbALWJ/2tqBO6K94H4S5Bty ZhKrRQ35nVvGC/xqYLJOJAO3E/cOG+2j/o6Uye7m4YugoIF1/mZGnNoxRFKWAG0uCVRY GfWc+XF4AsvWwdkd08vscqaz54BqJENpt0rxO9n7RGC9ZMXTPNuaAHQ1RVT1ALZ9T8tr 2XDtLbvmZNiLI7MBPt3XCsqJMqRwfXFqjiV427w0gdpVZJcjvGSx9sJg92pPP/Dr2Y4O eLRg== X-Gm-Message-State: ACrzQf3CFtLaPuN2tZ3rqh8lGOAIuC1DB5B4ZDCmAHlLKDexhKfGos0l 5J8eNzuAEaCfKKxMBrfpYqy8uQ== X-Received: by 2002:a17:902:eb89:b0:185:33d:cb34 with SMTP id q9-20020a170902eb8900b00185033dcb34mr12806731plg.55.1666252744045; Thu, 20 Oct 2022 00:59:04 -0700 (PDT) Received: from anup-ubuntu64-vm.. ([171.76.80.23]) by smtp.gmail.com with ESMTPSA id h30-20020aa79f5e000000b0052dfe83e19csm13206438pfr.16.2022.10.20.00.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 00:59:03 -0700 (PDT) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley Cc: Atish Patra , Heiko Stuebner , Arnd Bergmann , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel , Mayuresh Chitale Subject: [PATCH v5 2/4] RISC-V: Fix MEMREMAP_WB for systems with Svpbmt Date: Thu, 20 Oct 2022 13:28:44 +0530 Message-Id: <20221020075846.305576-3-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221020075846.305576-1-apatel@ventanamicro.com> References: <20221020075846.305576-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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?1747193404375574758?= X-GMAIL-MSGID: =?utf-8?q?1747193404375574758?= Currently, the memremap() called with MEMREMAP_WB maps memory using the generic ioremap() function which breaks on system with Svpbmt because memory mapped using _PAGE_IOREMAP page attributes is treated as strongly-ordered non-cacheable IO memory. To address this, we implement RISC-V specific arch_memremap_wb() which maps memory using _PAGE_KERNEL page attributes resulting in write-back cacheable mapping on systems with Svpbmt. Fixes: ff689fd21cb1 ("riscv: add RISC-V Svpbmt extension support") Co-developed-by: Mayuresh Chitale Signed-off-by: Mayuresh Chitale Signed-off-by: Anup Patel --- arch/riscv/include/asm/io.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/riscv/include/asm/io.h b/arch/riscv/include/asm/io.h index 92080a227937..42497d487a17 100644 --- a/arch/riscv/include/asm/io.h +++ b/arch/riscv/include/asm/io.h @@ -135,4 +135,9 @@ __io_writes_outs(outs, u64, q, __io_pbr(), __io_paw()) #include +#ifdef CONFIG_MMU +#define arch_memremap_wb(addr, size) \ + ((__force void *)ioremap_prot((addr), (size), _PAGE_KERNEL)) +#endif + #endif /* _ASM_RISCV_IO_H */ From patchwork Thu Oct 20 07:58:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 6035 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp129032wrs; Thu, 20 Oct 2022 01:11:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5TlGt1UvU5uetdyAxSheS80kTgobxpob20uPS2FKgM66AFEzGm7Ugtr+vnX1FFoRE2jkRR X-Received: by 2002:a17:907:270f:b0:78d:728b:ff4 with SMTP id w15-20020a170907270f00b0078d728b0ff4mr10137319ejk.501.1666253505505; Thu, 20 Oct 2022 01:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666253505; cv=none; d=google.com; s=arc-20160816; b=ndYi53e9HRvSuXOSGioKVVtWen3ZF6DJMwEztWjq+ngipJqczpbayuosPDuQd8OoI2 OhFbOoW4wGi48U78TBPp48zJsnhKUsYPPKL6zGbTiH8YN169z00vzuVnh6OFBBHauatW XpCvmxcguiZRHdm0+bT9zFA6WeQ6Qvv9ZU7cWBpM7mX614IXyCUzEE8FIdX/8F1o84KQ /4uIPbdJ8d0o/vHL9hD3vtDjKdUCZmULpnAfnJa782f2tzP74oiH1DdduBjKLbk70jod byICkBuq/xANy6wUtUhFNbeszp6mle8jUzN4AbD9c8AiPgeM2XkgPM1iPj/9G8Ypnbp9 t3kQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=VDJV4ZwRVQLzE0DQMb9i2tBKWni84XeHMbgigRoQK/0=; b=0QpW1zpzLogD6Ll69dWYnc0CcBnPmCIB3YqOmkoHsV9tWIZdZ2x+NdlYZpKs8MkCz5 QowFGgvvBZBtRiQYCB6DWmAIqadHX3Qi9Y/WOuLLIotPlijrMDvcWi7qIv8QtIIhKfVj qdTsBoSJsENwemG6y35e6thYHAkFoQf9hE77mK8ZZhCYxyNzKtyqgHm/gVzqJSQ8jRml 3OPXB60hJWh7m1FiBdgrN3Arj40VhfCuFBZUqsXpUC8yFwpoRl9iw/Th3WpxBQ1JFH1c +dvtoGsj4jH3mlUm9F64G1pIBh8ecZ5FvS0vyjwFchWVEJ/jG4Wb+4nJaN4azA9axXpt WAHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=RtIs+Fo5; 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 o5-20020a509b05000000b00456dc5c7346si13908082edi.97.2022.10.20.01.11.19; Thu, 20 Oct 2022 01:11:45 -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=@ventanamicro.com header.s=google header.b=RtIs+Fo5; 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 S231196AbiJTH7U (ORCPT + 99 others); Thu, 20 Oct 2022 03:59:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231237AbiJTH7J (ORCPT ); Thu, 20 Oct 2022 03:59:09 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6883180257 for ; Thu, 20 Oct 2022 00:59:08 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id bh13so18521894pgb.4 for ; Thu, 20 Oct 2022 00:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VDJV4ZwRVQLzE0DQMb9i2tBKWni84XeHMbgigRoQK/0=; b=RtIs+Fo57m4OyjqREQ+GmkLa1gtB+nd1wI1cynGPWeyR4VuzuTZWYwxJp3qb38jND+ jXzllqItnzM8dXynZdtd4gBtlQcrTFv3q3wLdb9aYmU1re7J1CS7QNaEBpwC5Es4tMoP 8fhXm+QGwvfvAnRFygQrEktJR97lrpRTNwcBmjOVjVyH0enR9liXz+TuLkEd3jbxNgtS 0Q5pPUbWB2jqGj3mst8Fq1vF9FPWmupAtBR8zOnr4ZeSflblwpcDKp/m4D9umY0Ly4J6 EgHMvrkLGNAoI6X8hUK3eiUWTy+WmHETYpx3tSzPJFfbAnLWn8XU2jYA24Eu1d6/08Ar W+wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VDJV4ZwRVQLzE0DQMb9i2tBKWni84XeHMbgigRoQK/0=; b=TgBb+aYLda1w0W6DSjRmXPwRaS3GkOmQNf5qF1X1MWZDoKq6q0hp7AIlB7GojRt/xw eIzIAcxdorCTQUK5sO4VTjuwg8RF5H1uRIol+Eg5J2kBTkhVLli6lBLJIv/fsiryjJrd lHE6FhWphm/oGsXGZiBuumvn0MAeO1jsziBsyPlfQZGU0fe3OsR+DYNGbicJlI4Mp4vL Hp+V1dTSTgqV+ZkyjVUQh0uTkQ5XHK2e7OziSSi7PH8Rsz5msf9dwEa23oueSYKBAKi5 fq6zxw678VJVm4o41mjrZmtJY4UTWN27Fq8P+Tcw/BcxtTtiN8IA8YZ2MWV2+gIYjWQ8 zs9Q== X-Gm-Message-State: ACrzQf3AJ07GFObNT1ndNcoEgwufJkm6b8DgqAsMUoyUVP4TLn/HpSMI gI9TidAr5KB515a77jfL2/Umig== X-Received: by 2002:a63:2b4b:0:b0:440:2963:5863 with SMTP id r72-20020a632b4b000000b0044029635863mr10501248pgr.28.1666252748070; Thu, 20 Oct 2022 00:59:08 -0700 (PDT) Received: from anup-ubuntu64-vm.. ([171.76.80.23]) by smtp.gmail.com with ESMTPSA id h30-20020aa79f5e000000b0052dfe83e19csm13206438pfr.16.2022.10.20.00.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 00:59:07 -0700 (PDT) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley Cc: Atish Patra , Heiko Stuebner , Arnd Bergmann , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel , Mayuresh Chitale Subject: [PATCH v5 3/4] RISC-V: Implement arch specific PMEM APIs Date: Thu, 20 Oct 2022 13:28:45 +0530 Message-Id: <20221020075846.305576-4-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221020075846.305576-1-apatel@ventanamicro.com> References: <20221020075846.305576-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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?1747193435343844239?= X-GMAIL-MSGID: =?utf-8?q?1747193435343844239?= The NVDIMM PMEM driver expects arch specific APIs for cache maintenance and if arch does not provide these APIs then NVDIMM PMEM driver will always use MEMREMAP_WT to map persistent memory which in-turn maps as UC memory type defined by the RISC-V Svpbmt specification. Now that the Svpbmt and Zicbom support is available in RISC-V kernel, we implement PMEM APIs using ALT_CMO_OP() macros so that the NVDIMM PMEM driver can use MEMREMAP_WB to map persistent memory. Co-developed-by: Mayuresh Chitale Signed-off-by: Mayuresh Chitale Signed-off-by: Anup Patel --- arch/riscv/Kconfig | 1 + arch/riscv/mm/Makefile | 1 + arch/riscv/mm/pmem.c | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 arch/riscv/mm/pmem.c diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 6b48a3ae9843..025e2a1b1c60 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -25,6 +25,7 @@ config RISCV select ARCH_HAS_GIGANTIC_PAGE select ARCH_HAS_KCOV select ARCH_HAS_MMIOWB + select ARCH_HAS_PMEM_API select ARCH_HAS_PTE_SPECIAL select ARCH_HAS_SET_DIRECT_MAP if MMU select ARCH_HAS_SET_MEMORY if MMU diff --git a/arch/riscv/mm/Makefile b/arch/riscv/mm/Makefile index d76aabf4b94d..3b368e547f83 100644 --- a/arch/riscv/mm/Makefile +++ b/arch/riscv/mm/Makefile @@ -31,3 +31,4 @@ endif obj-$(CONFIG_DEBUG_VIRTUAL) += physaddr.o obj-$(CONFIG_RISCV_DMA_NONCOHERENT) += dma-noncoherent.o +obj-$(CONFIG_ARCH_HAS_PMEM_API) += pmem.o diff --git a/arch/riscv/mm/pmem.c b/arch/riscv/mm/pmem.c new file mode 100644 index 000000000000..089df92ae876 --- /dev/null +++ b/arch/riscv/mm/pmem.c @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2022 Ventana Micro Systems Inc. + */ + +#include +#include + +#include + +void arch_wb_cache_pmem(void *addr, size_t size) +{ + ALT_CMO_OP(clean, addr, size, riscv_cbom_block_size); +} +EXPORT_SYMBOL_GPL(arch_wb_cache_pmem); + +void arch_invalidate_pmem(void *addr, size_t size) +{ + ALT_CMO_OP(inval, addr, size, riscv_cbom_block_size); +} +EXPORT_SYMBOL_GPL(arch_invalidate_pmem); From patchwork Thu Oct 20 07:58:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 6036 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp129474wrs; Thu, 20 Oct 2022 01:13:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5J1UuWeuJwgEEn0488dmR3nlI9MO0Z6p0j5fXNNfD6RDHbsHR0WWi4zTVSI+4Lg/ir9KLI X-Received: by 2002:a05:6a00:a22:b0:54e:6a90:fbef with SMTP id p34-20020a056a000a2200b0054e6a90fbefmr12816099pfh.53.1666253570767; Thu, 20 Oct 2022 01:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666253570; cv=none; d=google.com; s=arc-20160816; b=qLtYL7GiepGC88Q0Iu6rZO/1rmQYgxYtfFwK4wUrcSZYNhrSJLVHgAxDP0yoOoaP9W NCQYeEV8dQ9JyZn+/nV4iejIMpkgTrmIrYLn8+zE/SfSB6D9xoHDosfGnrTkVsqNfK5v cYfV29CpHKxhkNLHvJpJ9xlY9lezFfFAxD4kJUhcDP0h4G0bb14wSLol+RiNQW3lrN7U GV+kLQRUwbrHHj986WHBV0VHTFXRnHjOt1VUvGcGnaSW1jeWJt3YhgHxp0zhmZ0wwGSK bXky0FnOt8vMLbBtxDIQM9Vcd1xxS3DCsGg5C9VkUE4jJFdxsIEhfeHqLoKZLpFlJY9I R+BQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5TnLW0RVC/l/l6ZpSJGiQ9RS55Sh7Bww2u/zF6eZ2bY=; b=PPZRuWQ3aHyBQcM2syhURYD8oOb87iHmpgdldexIM2bHJfXCOVa8aDoAja928nR0RU 35+N5A252ckoY8KEAk3c3jJ2EsQGiIpYQreixalqxVuYPVzmf92MlZpoEYVp8q8Wsd+5 4Ke3MINOwi3W/GD3GMIHAPLy7t6/o3toT5VncZt7ML+Y7KFB50kWZkaEqtxwjMWlEb6j A6/y8xvCK83uEWUWQXKYEMylZtdCp+6pGoH4iqmd6sthk1NMZbnMTI8kjL+siEn1dBvz 2iGNTZUqAlTJRmO1EVOWM0E2yvhuI6e+jGFhNW3kAJ8ey3rjuPKjNQJUHiM4A0iudX3q cl9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b="eL/0WYug"; 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 g12-20020a056a0023cc00b00565e95c6dcdsi22886969pfc.356.2022.10.20.01.12.37; Thu, 20 Oct 2022 01:12:50 -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=@ventanamicro.com header.s=google header.b="eL/0WYug"; 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 S231214AbiJTH7Z (ORCPT + 99 others); Thu, 20 Oct 2022 03:59:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231158AbiJTH7N (ORCPT ); Thu, 20 Oct 2022 03:59:13 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6FD718027C for ; Thu, 20 Oct 2022 00:59:12 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id f193so18559306pgc.0 for ; Thu, 20 Oct 2022 00:59:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5TnLW0RVC/l/l6ZpSJGiQ9RS55Sh7Bww2u/zF6eZ2bY=; b=eL/0WYugw3H/1sxFC9WdKuigQo+DLOOuD80Q50Flm9AQs84m3h9nhYf0lLQYFWRd39 DXs4iq9U35DNMud1OLd+16okiAB2eoq7QcO9OSbRglrpg20DSO8trF8j8xmLmCcLLGPC cN3DT63GsaCqDSugUopR1AvikeqYg8gC613t1k9CY7q9hO9lJ8lvKYl8Ek4e6lDvJMlw vPg3fbNz3pUhmLaNqjOoHF5hZZCC/VZeRstJaWGQUmsQd8PNC4hcrRrPGFxTNz1xt4pK Bw1uR/NrBdi2x1QlXQ8AkRO/ok1dsPlcpY1fOB2o0/DwqFlo7APjo4OD+L3+tAq4gC1g HMtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5TnLW0RVC/l/l6ZpSJGiQ9RS55Sh7Bww2u/zF6eZ2bY=; b=WhwFTrE8ftZYt4ogBf4NIcY4ehAP3y9KdJxxEXVVXWbIx6WPeuQNgkTNn1HpXmIuvX +FYu3WIrh/jAvt0smaAu0IOsVHd7UzCp7iTMCklmt5fh+MkDS68U9J8/uqxKMnxMuIOE dhRN+jdQUjM03fIAkvLy52oyKCieJtMGaYlBFU623pRdxz6oiJyIgRvl2iMIXComa6zF diVmFy3YlMXi6TNbjzXdt1bYkC3hDF8f7+UcHlGKjFehfUkusoHEtmROfnU2YlFwo8mm cdzFQk2I6qdgW8u6TuFACiCZpmdWL+u7cN0d0Jw7TnFc404QIiUkfpia4r3ylFrpia/G MK9w== X-Gm-Message-State: ACrzQf1v1+BMm12DyjTxNbW6WhsNKjLUOmBTBu2SIiCZkTY6e88MGRm1 ESIV8yM9hvvjQXDCVkSZBYXHiQ== X-Received: by 2002:a63:ef18:0:b0:439:befc:d89c with SMTP id u24-20020a63ef18000000b00439befcd89cmr10373730pgh.504.1666252752020; Thu, 20 Oct 2022 00:59:12 -0700 (PDT) Received: from anup-ubuntu64-vm.. ([171.76.80.23]) by smtp.gmail.com with ESMTPSA id h30-20020aa79f5e000000b0052dfe83e19csm13206438pfr.16.2022.10.20.00.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 00:59:11 -0700 (PDT) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley Cc: Atish Patra , Heiko Stuebner , Arnd Bergmann , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Anup Patel Subject: [PATCH v5 4/4] RISC-V: Enable PMEM drivers Date: Thu, 20 Oct 2022 13:28:46 +0530 Message-Id: <20221020075846.305576-5-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221020075846.305576-1-apatel@ventanamicro.com> References: <20221020075846.305576-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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?1747193504276565059?= X-GMAIL-MSGID: =?utf-8?q?1747193504276565059?= We now have PMEM arch support available in RISC-V kernel so let us enable relevant drivers in defconfig. Signed-off-by: Anup Patel --- arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig index 05fd5fcf24f9..462da9f7410d 100644 --- a/arch/riscv/configs/defconfig +++ b/arch/riscv/configs/defconfig @@ -159,6 +159,7 @@ CONFIG_VIRTIO_MMIO=y CONFIG_RPMSG_CHAR=y CONFIG_RPMSG_CTRL=y CONFIG_RPMSG_VIRTIO=y +CONFIG_LIBNVDIMM=y CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y