Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3976190pxb; Tue, 25 Jan 2022 00:26:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyE2P8zjoZG0uHVIZl8Huo0kGiO2o1U3DBAkAwzhg+Swy7glnuagUiF8cQU5S+EFIUhbX17 X-Received: by 2002:a17:906:f50:: with SMTP id h16mr15029014ejj.279.1643099194611; Tue, 25 Jan 2022 00:26:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643099194; cv=none; d=google.com; s=arc-20160816; b=jAebYBRNkCWhPUv1E/CoVxsnPp8rP3YZygatq1IQUKIQtawmkipxgHGXAUC/8ld+2m DUu2wXJvGfWEm1PmhNK9U4/Msuui/wjsY3JR3GH1rN/MCiIfdv1pn8m73RQz+Gh1asXh snkr3/EcxcsgqkDpTbJ8yYQ9On20jGRplkdy3Qqz9gyCaanfSFjktR6H9BXayKw4V8Qm whTBc3nrm/eXM32mzxrGfEN/3gsej7xYTWEXTKNAtrvkLCNtKzHxTrBEJs+vesF1Y35Q /PxlcNgc6GKbEDcdwV3UuTFpD+Imnopv34Vn1lEkHqoyajXbk0WeuUKj0WHZDOzas4hU X4fg== 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=s13oOHok4W9UnvW21zZFBtHU++rviFm4Ppu48Nhlr382fSEirLe25KstLA72+HqJng d9UQOp9T1qQybytqV9OjFg4MpWEtsPz36bY0KBB1vEQxa+Waw41whFrcOMyrG8mfKRrN qSWxT9F8sF+1YoKjDNstsIbqqVfuFCWgGEGIP2xKlSUmgC1YUn54JhPZQ0wOOM6lHk3M iVGyNiPY6oG6wJ/9rjpQ5KOZb1cj3IyoeGuC5b94315L3/+7DcZkMc9o2vix5VzJfVvm t2J51T1InSEHeR0DhtVwU1kGCQ3xE6MJeb6vQso64ld0Is0CSU5rwWVsCm3RIzUZ7KB6 WSrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oovzwR4Z; 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 hr36si3937200ejc.955.2022.01.25.00.26.09; Tue, 25 Jan 2022 00:26:34 -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=oovzwR4Z; 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 S3422064AbiAYCaE (ORCPT + 99 others); Mon, 24 Jan 2022 21:30:04 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:37336 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379254AbiAXUK5 (ORCPT ); Mon, 24 Jan 2022 15:10:57 -0500 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 dfw.source.kernel.org (Postfix) with ESMTPS id 560D261028; Mon, 24 Jan 2022 20:10:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4BBADC340E5; Mon, 24 Jan 2022 20:10:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055055; bh=QjAv+mVi3dI62MzHUFz7B9G4FS95ehWT/yUknSVrAwU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oovzwR4ZTDkLv/HqiGl0Q8ZtufrG2ZBMys4FEiSdCoOdhfGsk6dAT8wdlRPLSo2hh xd/fUQWSze1MUoRObt8G/ZaRwz1Ml2TSjad9kB6L6I3mbnpSU/mZ4OCbDL14MOt9g0 F9rdv4TaN8tLCrh9XZB9DU6eBm1gKnA4SMUNr1v4= 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.15 026/846] riscv: mm: fix wrong phys_ram_base value for RV64 Date: Mon, 24 Jan 2022 19:32:23 +0100 Message-Id: <20220124184101.822048720@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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