Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3690608pxb; Mon, 24 Jan 2022 15:28:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbyIzkSvnNZQbDXZ621ehXem9UB/38tIYMTMUcKzzfGGdSMnWW+TTLirPxvA+sEqfNp1gE X-Received: by 2002:a17:90b:1d0a:: with SMTP id on10mr542014pjb.167.1643066915607; Mon, 24 Jan 2022 15:28:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643066915; cv=none; d=google.com; s=arc-20160816; b=QnjJMie+EFg1GufYotPiptZFzVyn06WurObFLHyqHaneszBHccIDUzH050hZYMS6Is pgQeBq7oXxxyGHvimDIru488WVqA13ZsnbxX3dz63nFS4pX9L8JFSYo63hix5YXj0SDH MSV8tSekxqBp7rCZNhB164xAnR3PUBDYmlcvCopYGrHI6zOF+GvXrrFj7UwnEvHuxsbt ByiucMc4OZD2u40xy6tIjxRJqs6RvqR94Qw0OIJilnV/XC91QiNGYySjIMOWuBWzgBSM Noj0t1vMgBXJQ/y/h9YhC0ax81He7FyrvNvXebdxqtNKLNYbtUIeQo1brZG3bA1t3JW1 N6vA== 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=gxs5VvHwDeOdXIo03f52R5P+Yq+ZliXvDzVs7qdh4Zo=; b=uOaEnjiSOZxNneNeuIogKGmiJuErjB0Ngb0iQwU1cIGKp1xHJKy3lIE2hFLlx3pHyj xgtqqjx+ZMKG1sk7tvW56U4cd6q5HZj1w6A0eJXzU2esnDLxVbnfi5W+YjzwxM6xVZDM qxriqzB0JjBy9lPHwZA/2MlcOE/nr33wJEvcN9c+qHuY9J0zlpTX/ILaO0B0PMFw1IzY tNvbam7AI19P3cpWeNtla14xBioWtYMS1tF6lIAfTLrCIsKlK/fX09j56fH4Xxd0wAWa QujV0qvDMbOX5eulj/Ornnod3QZo1lWueDPxC5JxozWb8TNoY8e2SevGxTaF3eDSyjbX e8QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="E8/yhqkS"; 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=pass (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 h189si5854102pge.86.2022.01.24.15.28.23; Mon, 24 Jan 2022 15:28:35 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b="E8/yhqkS"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1848214AbiAXXV7 (ORCPT + 99 others); Mon, 24 Jan 2022 18:21:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1585424AbiAXWXb (ORCPT ); Mon, 24 Jan 2022 17:23:31 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1CE8C04189C; Mon, 24 Jan 2022 12:53:50 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 45B51B811FB; Mon, 24 Jan 2022 20:53:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82EC5C340E5; Mon, 24 Jan 2022 20:53:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057629; bh=QjAv+mVi3dI62MzHUFz7B9G4FS95ehWT/yUknSVrAwU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E8/yhqkSmwH+cz7jHIpLEntlFSlNqJgxVAJPzuKIWCjGYbNAugNSktBTv3oItVZOw MPD3J/xsvap3V5QWQ7OJRBBt1w+cfj7odnD3/SH8yK/0pQnxUv81ZqyJGBZnHsPrwE e2enNCaFKxjZGVCp6vrXLoSHbbe43M3hKqe0UjJU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jisheng Zhang , Alexandre Ghiti , Palmer Dabbelt Subject: [PATCH 5.16 0028/1039] riscv: mm: fix wrong phys_ram_base value for RV64 Date: Mon, 24 Jan 2022 19:30:17 +0100 Message-Id: <20220124184126.086370772@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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: Jisheng Zhang commit b0fd4b1bf995172b9efcee23600d4f69571c321c upstream. Currently, if 64BIT and !XIP_KERNEL, the phys_ram_base is always 0, no matter the real start of dram reported by memblock is. Fixes: 6d7f91d914bc ("riscv: Get rid of CONFIG_PHYS_RAM_BASE in kernel physical address conversion") Signed-off-by: Jisheng Zhang Reviewed-by: Alexandre Ghiti Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt Signed-off-by: Greg Kroah-Hartman --- arch/riscv/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -187,10 +187,10 @@ static void __init setup_bootmem(void) phys_ram_end = memblock_end_of_DRAM(); -#ifndef CONFIG_64BIT #ifndef CONFIG_XIP_KERNEL phys_ram_base = memblock_start_of_DRAM(); #endif +#ifndef CONFIG_64BIT /* * memblock allocator is not aware of the fact that last 4K bytes of * the addressable memory can not be mapped because of IS_ERR_VALUE