Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4342417pxu; Mon, 12 Oct 2020 16:54:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDG8nvlaFJGDUfCMdWBpM1gr3+l8WyuLcd9IfImzNFcM/R9doVC9KUJq6oAnVPDI5SnDmB X-Received: by 2002:a50:b063:: with SMTP id i90mr17506020edd.187.1602546841827; Mon, 12 Oct 2020 16:54:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602546841; cv=none; d=google.com; s=arc-20160816; b=mbdzKXHKAqDxvNv3akRNybHyrOjPPYCF2xUt2n3mu44NB2ByTTuwBIzBQX3TzVBVsi XBHXI7UhqgqweVDw85Ei56DDxAX7GTg9Nhk4pubM7y0/nR5CZe7jhkF9ffnhic3RP+FC bIl6MIbmsIfloOqsUm1QqVhZ7ojLhbj00AepVKAt2RmEZYYXeVxJDYhSRzLEkIsMH6lP FipTZZqXyZsQkvlgqPMrp6SlG7f00teFbq9ziRTgVFHq5whjA2dZ7MGyegW98Cz/mLPj g2Xczi9kak+uTL5JWvIF34/X6HsdrY5epLKYfCB/gX2/2mfK9odgv4A38zpz2fwpgs5C jlXQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MsrPMINRaCFre3oDPeXbdXUa3MteS+gDQB/9sR622cQ=; b=Njl3JpEYRGdD/NHvVODjra9FIiE4olIv4bQHQsNiMCiR/kczFz54inwxKDvd+PAAdk cCHr+Jn03JoIFGkRFfcRZ6dkm64Tc4xHTBXh0o8WT/KVgBeUEZsP9VML4tmG6XMQJLEw BrjHEhe20Yj6fE/UZ8GG75hKXKWkgS37LWHenqcTtCXqduRT5+kjTeb7prJEPRuj2XdM Yx9xw47U2nY2r+meAYAMheAjaPvrIy6BwZ3oamH+56mklzxLc2nObKss8kwLBlQ7MBGi iVc7UdWkmwRmkPgE4DHTIZFIV6fglbzY3P8GEAFlaHVvZY13ipE9WtaRzobqIR7pQfow NsVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e30ICbWn; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u12si3610527ejt.420.2020.10.12.16.53.39; Mon, 12 Oct 2020 16:54:01 -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=pass header.i=@kernel.org header.s=default header.b=e30ICbWn; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390067AbgJLNzF (ORCPT + 99 others); Mon, 12 Oct 2020 09:55:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:49174 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389685AbgJLNpp (ORCPT ); Mon, 12 Oct 2020 09:45:45 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1698322266; Mon, 12 Oct 2020 13:44:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602510271; bh=Cq25miAfdQyRlTPU8qtyp+GbvM4dFtyLo9Qe4f8Imhg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e30ICbWnvDDDYWk0HoIZZ4AMHOuxn+d2jxKPXqI+NjitdJ/4TKVwg5MbogfOKjsNv 3QrKy72ZnwxK+K5U1BXOzEOduSi0grBMatnLYz0AWK6OwamqAOEby7uSOzImf2rgbD gfjZjTAwTfcE1eYQlmAoEN5/cRb9qhZfsJKeinZs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Atish Patra , Palmer Dabbelt Subject: [PATCH 5.8 028/124] RISC-V: Make sure memblock reserves the memory containing DT Date: Mon, 12 Oct 2020 15:30:32 +0200 Message-Id: <20201012133148.208719220@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012133146.834528783@linuxfoundation.org> References: <20201012133146.834528783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Atish Patra commit a78c6f5956a949b496a5b087188dde52483edf51 upstream. 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") Cc: stable@vger.kernel.org Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt Signed-off-by: Greg Kroah-Hartman --- arch/riscv/mm/init.c | 1 + 1 file changed, 1 insertion(+) --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -515,6 +515,7 @@ asmlinkage void __init setup_vm(uintptr_ #else dtb_early_va = (void *)dtb_pa; #endif + dtb_early_pa = dtb_pa; } static inline void setup_vm_final(void)