Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 162cefc5 authored by Greg Ungerer's avatar Greg Ungerer Committed by Greg Kroah-Hartman
Browse files

m68k: fix ColdFire node shift size calculation




[ Upstream commit f55ab8f2 ]

The m68k pg_data_table is a fix size array defined in arch/m68k/mm/init.c.
Index numbers within it are defined based on memory size. But for Coldfire
these don't take into account a non-zero physical RAM base address, and this
causes us to access past the end of this array at system start time.

Change the node shift calculation so that we keep the index inside its range.

Reported-by: default avatarAngelo Dureghello <angelo@sysam.it>
Tested-by: default avatarAngelo Dureghello <angelo@sysam.it>
Signed-off-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ff8cc6f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment