[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190304081633.897912798@linuxfoundation.org>
Date: Mon, 4 Mar 2019 09:23:04 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Mike Rapoport <rppt@...ux.ibm.com>,
Thomas Bogendoerfer <tbogendoerfer@...e.de>,
Paul Burton <paul.burton@...s.com>,
Ralf Baechle <ralf@...ux-mips.org>,
James Hogan <jhogan@...nel.org>, linux-mips@...r.kernel.org,
Mike Rapoport <rppt@...ux.vnet.ibm.com>
Subject: [PATCH 4.20 81/88] MIPS: fix memory setup for platforms with PHYS_OFFSET != 0
4.20-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Bogendoerfer <tbogendoerfer@...e.de>
commit e0bf304e4a00d66d90904a6c5b93141f177cf6d2 upstream.
For platforms, which use a PHYS_OFFSET != 0, symbol _end also
contains that offset. So when calling memblock_reserve() for
reserving kernel the size argument needs to be adjusted.
Fixes: bcec54bf3118 ("mips: switch to NO_BOOTMEM")
Acked-by: Mike Rapoport <rppt@...ux.ibm.com>
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@...e.de>
Signed-off-by: Paul Burton <paul.burton@...s.com>
Cc: Ralf Baechle <ralf@...ux-mips.org>
Cc: James Hogan <jhogan@...nel.org>
Cc: linux-mips@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Cc: Mike Rapoport <rppt@...ux.vnet.ibm.com>
Cc: stable@...r.kernel.org # v4.20+
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
arch/mips/kernel/setup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -384,7 +384,8 @@ static void __init bootmem_init(void)
init_initrd();
reserved_end = (unsigned long) PFN_UP(__pa_symbol(&_end));
- memblock_reserve(PHYS_OFFSET, reserved_end << PAGE_SHIFT);
+ memblock_reserve(PHYS_OFFSET,
+ (reserved_end << PAGE_SHIFT) - PHYS_OFFSET);
/*
* max_low_pfn is not a number of pages. The number of pages
Powered by blists - more mailing lists