FIT: Fix an off by one error when allocating space for the memory node.
The code which calculated how much space we need for the memory node reg
property had an off by one error where it would allocate too much space if
the size of the region fell right on the boundary. This change replaces the
calculation with a more intuitive version which uses the ALIGN_UP macro and
which corrects the error.
BUG=None
TEST=Built and booted on big and verified that the phantom memory region was
no longer present. Booted in circumstances which had previous caused a kernel
panic and saw that the panic no longer happened.
BRANCH=None
Change-Id: I9698243d6c91936458f265a73443c329761c1709
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://chromium-review.googlesource.com/197377
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
1 file changed