ARM: 8605/1: V7M: fix notrace variant of save_and_disable_irqs
authorVladimir Murzin <vladimir.murzin@arm.com>
Tue, 30 Aug 2016 16:28:43 +0000 (17:28 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Tue, 6 Sep 2016 14:51:07 +0000 (15:51 +0100)
Commit 8e43a905 "ARM: 7325/1: fix v7 boot with lockdep enabled"
introduced notrace variant of save_and_disable_irqs to balance notrace
variant of restore_irqs; however V7M case has been missed. It was not
noticed because cache-v7.S the only place where notrace variant is used.
So fix it, since we are going to extend V7 cache routines to handle V7M
case too.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Tested-by: Andras Szemzo <sza@esh.hu>
Tested-by: Joachim Eastwood <manabian@gmail.com>
Tested-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/assembler.h

index 4eaea21..68b06f9 100644 (file)
        .endm
 
        .macro  save_and_disable_irqs_notrace, oldcpsr
+#ifdef CONFIG_CPU_V7M
+       mrs     \oldcpsr, primask
+#else
        mrs     \oldcpsr, cpsr
+#endif
        disable_irq_notrace
        .endm