All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Cc: scottwood@freescale.com
Subject: Re: powerpc/nohash: Fix use of mmu_has_feature() in setup_initial_memory_limit()
Date: Tue, 11 Apr 2017 08:49:26 +1000 (AEST)	[thread overview]
Message-ID: <3w253B5mN3z9sNJ@ozlabs.org> (raw)
In-Reply-To: <1491185155-27876-1-git-send-email-mpe@ellerman.id.au>

On Mon, 2017-04-03 at 02:05:55 UTC, Michael Ellerman wrote:
> setup_initial_memory_limit() is called from early_init_devtree(), which
> runs prior to feature patching. If the kernel is built with CONFIG_JUMP_LABEL=y
> and CONFIG_JUMP_LABEL_FEATURE_CHECKS=y then we will potentially get the
> wrong value.
> 
> If we also have CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG=y we get a warning
> and backtrace:
> 
>   Warning! mmu_has_feature() used prior to jump label init!
>   CPU: 0 PID: 0 Comm: swapper Not tainted 4.11.0-rc4-gccN-next-20170331-g6af2434 #1
>   Call Trace:
>   [c000000000fc3d50] [c000000000a26c30] .dump_stack+0xa8/0xe8 (unreliable)
>   [c000000000fc3de0] [c00000000002e6b8] .setup_initial_memory_limit+0xa4/0x104
>   [c000000000fc3e60] [c000000000d5c23c] .early_init_devtree+0xd0/0x2f8
>   [c000000000fc3f00] [c000000000d5d3b0] .early_setup+0x90/0x11c
>   [c000000000fc3f90] [c000000000000520] start_here_multiplatform+0x68/0x80
> 
> Fix it by using early_mmu_has_feature().
> 
> Fixes: c12e6f24d413 ("powerpc: Add option to use jump label for mmu_has_feature()")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc next.

https://git.kernel.org/powerpc/c/4868e3508d1934d28961f940ed6b9f

cheers

      reply	other threads:[~2017-04-10 22:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03  2:05 [PATCH] powerpc/nohash: Fix use of mmu_has_feature() in setup_initial_memory_limit() Michael Ellerman
2017-04-10 22:49 ` Michael Ellerman [this message]

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=3w253B5mN3z9sNJ@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=scottwood@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.