Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp721700pxk; Thu, 1 Oct 2020 12:09:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcKbR/JCP6QvPjjwE/Tk1p5QTMjTzAhUS0QkLzsZ1SvNvcbjTPvmdt3WbK7N1+Z4DOtnUh X-Received: by 2002:a17:906:3553:: with SMTP id s19mr9434633eja.178.1601579358320; Thu, 01 Oct 2020 12:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601579358; cv=none; d=google.com; s=arc-20160816; b=l0ge3doTjo8Ge9ouH3p+Org6uRW2kzdj9OSEVDhwL8ihcML4irFSo0AkNvGeoFJfRY PAGhwQvLy9nZTsjfXNC1H5hQMYbBdvn7lRTQnOTo/GYmPBPdReSPd2QVe6sT7x0lFawT hwtgk7EUq3Qm+EN7DdiKxoW5DNj2BApWcPL1JqiOZNvEPB8hIdXW9xO3yDkIC3yAKBvs htA3MsvcnnpAKDjnCdl8d7EFpXwSkU3hhXEV5xKg6fZTEOQA9vk2wA8N7H/ErDuAeuw9 3onTiUlcBHgvOWhmPuJ/kiDK4Jgan/LX+eX+o3kwyCAuV7s0g0gZzqXJBW3ZfaT0tXFp nYaA== 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:wdcironportexception :ironport-sdr:ironport-sdr:ironport-sdr:dkim-signature; bh=mCAQBfAMdNK1EW0niYIAvvGoRfbdVT3s+T6HvsQlS0g=; b=DXQLhYEgYC+H7n65SX3RSz9kJ+qn6Iii/OdBh2LvssNJXWvBSa1X/lOg/hVEXeh+d/ 6LekPmQL2NUYUzf1JGQq60BCzXBf733P4cYXNb9pJAZ1EOwR1rxr1Kw4/4Rv+bXkb9qC ra46j9g8whkWNkujJRkX95urGpgr+jyWNqQtNj9307ecmlOqePvKx6ZzgQJF42EcERL9 AuwU5X6MNOLsThnV3f4JLgPJj71e17PpU1kCmQvPAyBnUwSbt4xENX6UORN0bCugUnvm TF0R3AGUm8bCji/jpfnp/79vF6YEpVLJYWqvxS7EOqDG9/rClCVumjQyDk/Y067Gur6b 8Frg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=FxFJb639; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x24si4114207eju.477.2020.10.01.12.08.55; Thu, 01 Oct 2020 12:09:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=FxFJb639; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732894AbgJATFH (ORCPT + 99 others); Thu, 1 Oct 2020 15:05:07 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:19126 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729047AbgJATFF (ORCPT ); Thu, 1 Oct 2020 15:05:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1601579104; x=1633115104; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=mvG+0a31TUnr2CleZRBwC1uO2SIRLdp7lGvzolLznks=; b=FxFJb639QLF3QB4JTV2szdyYzGOqSrCn+hiHw5gtBobyZPhNQ1BKd4kC U2TlCOH5sMd4Zx6PNEWOsMAIafZSe7itcwPXCGA4UCtuyvlb+vRCxTR9w lZ2c7vIUB3d3h8UXouj3JxtMbEbJXi45sRFbno6TyWG+6QqAiERGwHoEJ tH0piOUeauJ0cjavXHJNYyctzx5g4Drk1L12WYzVIEy64w0+jPIeB8hLO e0tg08b/raSiI469w37WIVntMaS7ObzrkebPBapQqqbuujfZZNSyRjSWR SO9wMDGI5CWsw023BawUnvGlEWwPfsOIpW6r8vLPXEEy+xmNsoB1JlLIV g==; IronPort-SDR: gyxO8q3bJDi884dH2Imn0LAU6rjUzcCFxCDbNI4vgF7w3bc7abg44hcjRii6lZ256aHBsybIfB sfDFDe3zVRe0VZEa2V8yK1xXtfgMysUga0UiGKwAFbe/CLiuuwvs1X/e0v07sz7WzHiJgC9/dC f8EC7HsSAD5SFKuLX8ujjhd8FyVJJ6ZtDVcHyZF/9GT5611VRqIT4iDIYqmlv5N8768jFvcO97 XQXSAoD2Zqlmp7PQfH38Pf1IGEsSvwlrCPZck+jqG1sEGJvqbZK+JaCTNx7ixCGgqWlxQMSiLk MtY= X-IronPort-AV: E=Sophos;i="5.77,324,1596470400"; d="scan'208";a="148739896" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 02 Oct 2020 03:05:03 +0800 IronPort-SDR: /TUkh5ki1yOrS71KUVH61J2Pu+ExxSEap7IuwFfpE8Yvncn0rELnOFTEWDttKLen6vJVko4ItS b8CEBJcIdR9g== Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2020 11:51:00 -0700 IronPort-SDR: ANr0iEXCHrjkkstTEh+kleISfOPOrgEc0i+HKg80Rgg/9bBuEMNWDj59/ju9D1TYggD0hpBPNn st5KEKQTthnQ== WDCIronportException: Internal Received: from 30tyk72.ad.shared (HELO jedi-01.hgst.com) ([10.86.59.249]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Oct 2020 12:05:03 -0700 From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Albert Ou , Anup Patel , linux-riscv@lists.infradead.org, Palmer Dabbelt , Paul Walmsley , Zong Li , Alistair Francis , Damien Le Moal , Christoph Hellwig Subject: [PATCH] RISC-V: Make sure memblock reserves the memory containing DT Date: Thu, 1 Oct 2020 12:04:56 -0700 Message-Id: <20201001190456.2860155-1-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, the memory containing DT is not reserved. Thus, that region of memory can be reallocated or reused for other purposes. This may result in corrupted DT for nommu virt board in Qemu. We may not face any issue in kendryte as DT is embedded in the kernel image for that. Fixes: 6bd33e1ece52 ("riscv: add nommu support") Signed-off-by: Atish Patra --- @Palmer This patch is applicable for v5.9 & before. This fix is already part of the "RISC-V: Move DT mapping outof fixmap" patch from UEFI support series. That's why, this patch doesn't need to go into for-next. --- arch/riscv/mm/init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 564e0be677b7..cabf1697e748 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -510,6 +510,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa) #else dtb_early_va = (void *)dtb_pa; #endif + dtb_early_pa = dtb_pa; } static inline void setup_vm_final(void) -- 2.25.1