Skip to content

Commit 2bc655c

Browse files
committed
Merge branch 'for-next/misc' into for-next/core
* for-next/misc: arm64: Select POSIX_CPU_TIMERS_TASK_WORK arm64: Document boot requirements for FEAT_SME_FA64 arm64: ftrace: use function_nocfi for _mcount as well arm64: asm: setup.h: export common variables arm64/traps: Avoid unnecessary kernel/user pointer conversion
2 parents 082f6b4 + a68773b commit 2bc655c

File tree

5 files changed

+20
-3
lines changed

5 files changed

+20
-3
lines changed

Documentation/arm64/booting.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,16 @@ Before jumping into the kernel, the following conditions must be met:
340340
- SMCR_EL2.LEN must be initialised to the same value for all CPUs the
341341
kernel will execute on.
342342

343+
For CPUs with the Scalable Matrix Extension FA64 feature (FEAT_SME_FA64)
344+
345+
- If EL3 is present:
346+
347+
- SMCR_EL3.FA64 (bit 31) must be initialised to 0b1.
348+
349+
- If the kernel is entered at EL1 and EL2 is present:
350+
351+
- SMCR_EL2.FA64 (bit 31) must be initialised to 0b1.
352+
343353
The requirements described above for CPU mode, caches, MMUs, architected
344354
timers, coherency and system registers apply to all CPUs. All CPUs must
345355
enter the kernel in the same exception level. Where the values documented

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ config ARM64
192192
select HAVE_PERF_REGS
193193
select HAVE_PERF_USER_STACK_DUMP
194194
select HAVE_REGS_AND_STACK_ACCESS_API
195+
select HAVE_POSIX_CPU_TIMERS_TASK_WORK
195196
select HAVE_FUNCTION_ARG_ACCESS_API
196197
select HAVE_FUTEX_CMPXCHG if FUTEX
197198
select MMU_GATHER_RCU_TABLE_FREE

arch/arm64/include/asm/ftrace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS
1616
#define ARCH_SUPPORTS_FTRACE_OPS 1
1717
#else
18-
#define MCOUNT_ADDR ((unsigned long)_mcount)
18+
#define MCOUNT_ADDR ((unsigned long)function_nocfi(_mcount))
1919
#endif
2020

2121
/* The BL at the callsite's adjusted rec->ip */

arch/arm64/include/asm/setup.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@
88
void *get_early_fdt_ptr(void);
99
void early_fdt_map(u64 dt_phys);
1010

11+
/*
12+
* These two variables are used in the head.S file.
13+
*/
14+
extern phys_addr_t __fdt_pointer __initdata;
15+
extern u64 __cacheline_aligned boot_args[4];
16+
1117
#endif

arch/arm64/kernel/traps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,11 @@ static int call_undef_hook(struct pt_regs *regs)
400400
unsigned long flags;
401401
u32 instr;
402402
int (*fn)(struct pt_regs *regs, u32 instr) = NULL;
403-
void __user *pc = (void __user *)instruction_pointer(regs);
403+
unsigned long pc = instruction_pointer(regs);
404404

405405
if (!user_mode(regs)) {
406406
__le32 instr_le;
407-
if (get_kernel_nofault(instr_le, (__force __le32 *)pc))
407+
if (get_kernel_nofault(instr_le, (__le32 *)pc))
408408
goto exit;
409409
instr = le32_to_cpu(instr_le);
410410
} else if (compat_thumb_mode(regs)) {

0 commit comments

Comments
 (0)