diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-02 08:41:02 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-02 08:41:02 -0800 |
commit | 178cf7de6f1d3b95407f5a76af249fc924d42576 (patch) | |
tree | 4b3e5f3ef6dfa7866fb30811acdc60832a055269 /arch/arm/kernel/setup.c | |
parent | 89c468263befb4617aaab36ae8c54ba04164c7b0 (diff) | |
parent | e36f014edff70fc02b3d3d79cead1d58f289332e (diff) | |
download | linux-178cf7de6f1d3b95407f5a76af249fc924d42576.tar.gz linux-178cf7de6f1d3b95407f5a76af249fc924d42576.tar.bz2 linux-178cf7de6f1d3b95407f5a76af249fc924d42576.zip |
Merge 3.19-rc7 into staging-next
We want those fixes in here for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/kernel/setup.c')
-rw-r--r-- | arch/arm/kernel/setup.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 715ae19bc7c8..e55408e96559 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -657,10 +657,13 @@ int __init arm_add_memory(u64 start, u64 size) /* * Ensure that start/size are aligned to a page boundary. - * Size is appropriately rounded down, start is rounded up. + * Size is rounded down, start is rounded up. */ - size -= start & ~PAGE_MASK; aligned_start = PAGE_ALIGN(start); + if (aligned_start > start + size) + size = 0; + else + size -= aligned_start - start; #ifndef CONFIG_ARCH_PHYS_ADDR_T_64BIT if (aligned_start > ULONG_MAX) { |