diff mbox

[RFC] Revert "ARM: shmobile: defconfig: Do not enable CONFIG_CPU_BPREDICT_DISABLE"

Message ID 1456150225-12821-1-git-send-email-wsa@the-dreams.de (mailing list archive)
State RFC
Delegated to: Simon Horman
Headers show

Commit Message

Wolfram Sang Feb. 22, 2016, 2:10 p.m. UTC
From: Wolfram Sang <wsa+renesas@sang-engineering.com>

This reverts commit 406663ed61c8ad2b792824af1c1bc0e4faa711c6. With
BPREDICT enabled, my Lager board can't boot anymore and gets stuck
early in the boot process (mostly without any printout, sometimes with a
little printout)

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Let me know if I can do something to give you more information. Maybe we can
resolve it differently. But as it stands now, it is a regression.

 arch/arm/configs/shmobile_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Geert Uytterhoeven Feb. 22, 2016, 3:32 p.m. UTC | #1
Hi Wolfram,

On Mon, Feb 22, 2016 at 3:10 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
>
> This reverts commit 406663ed61c8ad2b792824af1c1bc0e4faa711c6. With
> BPREDICT enabled, my Lager board can't boot anymore and gets stuck
> early in the boot process (mostly without any printout, sometimes with a
> little printout)

And it just stops without printing anything special?

> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

I suspect you're bitten by the issue from "RCU lockup? (was: Re: [PATCH v2
tip/core/rcu 10/14] rcu: Don't redundantly disable irqs in
rcu_irq_{enter,exit}())" (http://www.spinics.net/lists/kernel/msg2167464.html).

At one point, I also thought it was related to CONFIG_CPU_BPREDICT_DISABLE,
but then I managed to reproduce the issue with that option disabled.
I suspect the issue is just more likely to happen with
CONFIG_CPU_BPREDICT_DISABLE=y.

Does it help if you add a function

        void filler(void)
        {
                asm("nop");
                asm("nop");
        }

to a file under arch/arm/mach-shmobile/?

What I saw was that the failure mode depends on the number of NOPs.
Sometimes it hangs early, sometimes it continues and hangs later,
sometimes it works reliably.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Wolfram Sang Feb. 22, 2016, 4:38 p.m. UTC | #2
> > This reverts commit 406663ed61c8ad2b792824af1c1bc0e4faa711c6. With
> > BPREDICT enabled, my Lager board can't boot anymore and gets stuck
> > early in the boot process (mostly without any printout, sometimes with a
> > little printout)
> 
> And it just stops without printing anything special?

Yes. The only notable difference I recognized in the output was the set
bit for branch prediction in the cr register output. That's why I
assumed this commit to be guilty...

> 
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> I suspect you're bitten by the issue from "RCU lockup? (was: Re: [PATCH v2
> tip/core/rcu 10/14] rcu: Don't redundantly disable irqs in
> rcu_irq_{enter,exit}())" (http://www.spinics.net/lists/kernel/msg2167464.html).

... but it seems you are right on the spot here. Thanks!

> Does it help if you add a function
> 
>         void filler(void)
>         {
>                 asm("nop");
>                 asm("nop");
>         }

Adding 21 nops made the board boot again. (Wow, adding NOPs everywhere
really feels like hacking the Commodore 64 when trying to get the timing
stable :D)

This is gonna be a nasty one :(
diff mbox

Patch

diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
index b7b714c3958c2f..6582b88e30672e 100644
--- a/arch/arm/configs/shmobile_defconfig
+++ b/arch/arm/configs/shmobile_defconfig
@@ -20,6 +20,7 @@  CONFIG_ARCH_R8A7791=y
 CONFIG_ARCH_R8A7793=y
 CONFIG_ARCH_R8A7794=y
 CONFIG_ARCH_SH73A0=y
+CONFIG_CPU_BPREDICT_DISABLE=y
 CONFIG_PL310_ERRATA_588369=y
 CONFIG_ARM_ERRATA_754322=y
 CONFIG_PCI=y