Skip to content

Commit 9520b53

Browse files
committed
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: "A small number of ARM fixes - Fix function tracer and unwinder dependencies so that we don't end up building kernels that will crash - Fix ARMv7M nommu initialisation (missing register initialisation) - Fix EFI decompressor entry (ensuring barrier instructions are enabled prior to use)" * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8857/1: efi: enable CP15 DMB instructions before cleaning the cache ARM: 8856/1: NOMMU: Fix CCR register faulty initialization when MPU is disabled ARM: fix function graph tracer and unwinder dependencies
2 parents 0d82044 + e17b1af commit 9520b53

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

arch/arm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ config ARM
7373
select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU
7474
select HAVE_EXIT_THREAD
7575
select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
76-
select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL
76+
select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL && !CC_IS_CLANG
7777
select HAVE_FUNCTION_TRACER if !XIP_KERNEL
7878
select HAVE_GCC_PLUGINS
7979
select HAVE_HW_BREAKPOINT if PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)

arch/arm/Kconfig.debug

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ config DEBUG_WX
4747

4848
choice
4949
prompt "Choose kernel unwinder"
50-
default UNWINDER_ARM if AEABI && !FUNCTION_GRAPH_TRACER
51-
default UNWINDER_FRAME_POINTER if !AEABI || FUNCTION_GRAPH_TRACER
50+
default UNWINDER_ARM if AEABI
51+
default UNWINDER_FRAME_POINTER if !AEABI
5252
help
5353
This determines which method will be used for unwinding kernel stack
5454
traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
@@ -65,7 +65,7 @@ config UNWINDER_FRAME_POINTER
6565

6666
config UNWINDER_ARM
6767
bool "ARM EABI stack unwinder"
68-
depends on AEABI
68+
depends on AEABI && !FUNCTION_GRAPH_TRACER
6969
select ARM_UNWIND
7070
help
7171
This option enables stack unwinding support in the kernel

arch/arm/boot/compressed/head.S

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,21 @@ ENTRY(efi_stub_entry)
14381438

14391439
@ Preserve return value of efi_entry() in r4
14401440
mov r4, r0
1441-
bl cache_clean_flush
1441+
1442+
@ our cache maintenance code relies on CP15 barrier instructions
1443+
@ but since we arrived here with the MMU and caches configured
1444+
@ by UEFI, we must check that the CP15BEN bit is set in SCTLR.
1445+
@ Note that this bit is RAO/WI on v6 and earlier, so the ISB in
1446+
@ the enable path will be executed on v7+ only.
1447+
mrc p15, 0, r1, c1, c0, 0 @ read SCTLR
1448+
tst r1, #(1 << 5) @ CP15BEN bit set?
1449+
bne 0f
1450+
orr r1, r1, #(1 << 5) @ CP15 barrier instructions
1451+
mcr p15, 0, r1, c1, c0, 0 @ write SCTLR
1452+
ARM( .inst 0xf57ff06f @ v7+ isb )
1453+
THUMB( isb )
1454+
1455+
0: bl cache_clean_flush
14421456
bl cache_off
14431457

14441458
@ Set parameters for booting zImage according to boot protocol

arch/arm/kernel/head-nommu.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ __secondary_data:
133133
*/
134134
.text
135135
__after_proc_init:
136-
#ifdef CONFIG_ARM_MPU
137136
M_CLASS(movw r12, #:lower16:BASEADDR_V7M_SCB)
138137
M_CLASS(movt r12, #:upper16:BASEADDR_V7M_SCB)
138+
#ifdef CONFIG_ARM_MPU
139139
M_CLASS(ldr r3, [r12, 0x50])
140140
AR_CLASS(mrc p15, 0, r3, c0, c1, 4) @ Read ID_MMFR0
141141
and r3, r3, #(MMFR0_PMSA) @ PMSA field

0 commit comments

Comments
 (0)