linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Mike Rapoport <rppt@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	PowerPC <linuxppc-dev@lists.ozlabs.org>
Subject: Re: linux-next: Tree for Oct 15
Date: Tue, 16 Oct 2018 13:19:27 +1100	[thread overview]
Message-ID: <20181016131927.6ceba6ab@canb.auug.org.au> (raw)
In-Reply-To: <20181016130216.3a417381@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 1727 bytes --]

Hi all,

On Tue, 16 Oct 2018 13:02:16 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Reverting fe3d2a45e8079fdd7d4da1ff07f4b40bc3cb499f (and the following 2
> commits) produces a kernel that boots.

Instead of that, I applied this patch on top of linux-next and it boots
and produces a stack trace ...

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 16 Oct 2018 13:07:01 +1100
Subject: [PATCH] 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.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 mm/memblock.c | 8 ++++++--
 1 file 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;
-- 
2.18.0

So, patch "memblock: stop using implicit alignment to SMP_CACHE_BYTES"
should *not* remove the 0 -> SMP_CACHE_BYTES update from mm/memblock.c
and just add the dump_stack().
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-10-16  2:19 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15  8:25 linux-next: Tree for Oct 15 Stephen Rothwell
2018-10-15 18:26 ` Guenter Roeck
2018-10-15 20:12   ` Stephen Rothwell
2018-10-15 20:24     ` Stephen Rothwell
2018-10-15 22:13       ` Andrew Morton
2018-10-16 13:36         ` Mike Rapoport
2018-10-16 20:41           ` Stephen Rothwell
2018-10-15 20:35     ` Rob Herring
2018-10-15 21:18       ` Guenter Roeck
2018-10-15 21:48         ` Rob Herring
2018-10-15 22:10           ` Guenter Roeck
2018-10-15 22:13             ` Rob Herring
2018-10-15 22:28               ` Guenter Roeck
2018-10-15 22:34               ` Guenter Roeck
2018-10-15 22:52                 ` Rob Herring
2018-10-16  1:00       ` Rob Herring
2018-10-16  1:34         ` David Miller
2018-10-15 19:39 ` Guenter Roeck
2018-10-15 20:33   ` Stephen Rothwell
2018-10-15 21:35     ` Guenter Roeck
2018-10-15 22:22     ` Guenter Roeck
2018-10-16  2:02       ` Stephen Rothwell
2018-10-16  2:19         ` Stephen Rothwell [this message]
2018-10-16  3:12           ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2021-10-15 10:06 Stephen Rothwell
2020-10-15  7:28 Stephen Rothwell
2019-10-15  5:16 Stephen Rothwell
2015-10-15  7:51 Stephen Rothwell
2014-10-15  4:29 Stephen Rothwell
2013-10-15 14:02 Thierry Reding
2013-10-16  5:21 ` Guenter Roeck
2013-10-16 15:50   ` Thierry Reding
2013-10-16 16:37     ` Guenter Roeck
2013-10-16 16:43       ` Thierry Reding
2012-10-15  2:41 Stephen Rothwell
2008-10-15 10:58 linux-next tree " Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181016131927.6ceba6ab@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=rppt@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).