aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2018-10-17 11:18:31 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2018-10-19 17:25:08 +1100
commit284c6a94abf94a91034d3d1785e40912a57843e9 (patch)
tree63c75ccbe49057fbeb8a0c6c195ad4f5140b1c6c
parent668d2401eccca9b00edf2880ca9b176f6f974c0c (diff)
download96b-common-284c6a94abf94a91034d3d1785e40912a57843e9.tar.gz
mm/memblock.c: use dump_stack() instead of WARN_ON_ONCE for the alignment checks
Using WARN_ON_ONCE too early causes the PowerPC kernel to fail. Link: http://lkml.kernel.org/r/20181016131927.6ceba6ab@canb.auug.org.au Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-rw-r--r--mm/memblock.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index 5fefc70253ee..f2ef3915a356 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -1298,8 +1298,10 @@ static phys_addr_t __init memblock_alloc_range_nid(phys_addr_t size,
{
phys_addr_t found;
- if (WARN_ON_ONCE(!align))
+ if (!align) {
+ dump_stack();
align = SMP_CACHE_BYTES;
+ }
found = memblock_find_in_range_node(size, align, start, end, nid,
flags);
@@ -1423,8 +1425,10 @@ static void * __init memblock_alloc_internal(
if (WARN_ON_ONCE(slab_is_available()))
return kzalloc_node(size, GFP_NOWAIT, nid);
- if (WARN_ON_ONCE(!align))
+ if (!align) {
+ dump_stack();
align = SMP_CACHE_BYTES;
+ }
if (max_addr > memblock.current_limit)
max_addr = memblock.current_limit;