summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/e500.h
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2019-05-03 20:50:40 +0300
committerPaul Burton <paul.burton@mips.com>2019-05-05 20:11:59 -0700
commit93fa5b280761a4dbb14c5330f260380385ab2b49 (patch)
tree8df23f64c96aa3843caaac462607694c97a5603e /arch/powerpc/kvm/e500.h
parent2f5bd0367e7a9e5f5a150500e016a9cb7042803b (diff)
downloadlinux-93fa5b280761a4dbb14c5330f260380385ab2b49.tar.bz2
mips: Make sure dt memory regions are valid
There are situations when memory regions coming from dts may be too big for the platform physical address space. This especially concerns XPA-capable systems. Bootloader may determine more than 4GB memory available and pass it to the kernel over dts memory node, while kernel is built without XPA/64BIT support. In this case the region may either simply be truncated by add_memory_region() method or by u64->phys_addr_t type casting. But in worst case the method can even drop the memory region if it exceeds PHYS_ADDR_MAX size. So lets make sure the retrieved from dts memory regions are valid, and if some of them aren't, just manually truncate them with a warning printed out. Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: Mike Rapoport <rppt@linux.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de> Cc: Huacai Chen <chenhc@lemote.com> Cc: Stefan Agner <stefan@agner.ch> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Juergen Gross <jgross@suse.com> Cc: Serge Semin <Sergey.Semin@t-platforms.ru> Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org
Diffstat (limited to 'arch/powerpc/kvm/e500.h')
0 files changed, 0 insertions, 0 deletions