Skip to content

Commit 322a3b8

Browse files
committed
Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King: - Fix BSS size calculation for LLVM - Improve robustness of kernel entry around v7_invalidate_l1 - Fix and update kprobes assembly - Correct breakpoint overflow handler check - Pause function graph tracer when suspending a CPU - Switch to generic syscallhdr.sh and syscalltbl.sh - Remove now unused set_kernel_text_r[wo] functions - Updates for ptdump (__init marking and using DEFINE_SHOW_ATTRIBUTE) - Fix for interrupted SMC (secure) calls - Remove Compaq Personal Server platform * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: footbridge: remove personal server platform ARM: 9075/1: kernel: Fix interrupted SMC calls ARM: 9074/1: ptdump: convert to DEFINE_SHOW_ATTRIBUTE ARM: 9073/1: ptdump: add __init section marker to three functions ARM: 9072/1: mm: remove set_kernel_text_r[ow]() ARM: 9067/1: syscalls: switch to generic syscallhdr.sh ARM: 9068/1: syscalls: switch to generic syscalltbl.sh ARM: 9066/1: ftrace: pause/unpause function graph tracer in cpu_suspend() ARM: 9064/1: hw_breakpoint: Do not directly check the event's overflow_handler hook ARM: 9062/1: kprobes: rewrite test-arm.c in UAL ARM: 9061/1: kprobes: fix UNPREDICTABLE warnings ARM: 9060/1: kexec: Remove unused kexec_reinit callback ARM: 9059/1: cache-v7: get rid of mini-stack ARM: 9058/1: cache-v7: refactor v7_invalidate_l1 to avoid clobbering r5/r6 ARM: 9057/1: cache-v7: add missing ISB after cache level selection ARM: 9056/1: decompressor: fix BSS size calculation for LLVM ld.lld
2 parents 939b7cb + 298a58e commit 322a3b8

27 files changed

+246
-454
lines changed

arch/arm/boot/compressed/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ asflags-y := -DZIMAGE
118118

119119
# Supply kernel BSS size to the decompressor via a linker symbol.
120120
KBSS_SZ = $(shell echo $$(($$($(NM) $(obj)/../../../../vmlinux | \
121-
sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \
122-
-e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) )
121+
sed -n -e 's/^\([^ ]*\) [ABD] __bss_start$$/-0x\1/p' \
122+
-e 's/^\([^ ]*\) [ABD] __bss_stop$$/+0x\1/p') )) )
123123
LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
124124
# Supply ZRELADDR to the decompressor via a linker symbol.
125125
ifneq ($(CONFIG_AUTO_ZRELADDR),y)

arch/arm/configs/footbridge_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ CONFIG_EXPERT=y
77
CONFIG_MODULES=y
88
CONFIG_ARCH_FOOTBRIDGE=y
99
CONFIG_ARCH_CATS=y
10-
CONFIG_ARCH_PERSONAL_SERVER=y
1110
CONFIG_ARCH_EBSA285_HOST=y
1211
CONFIG_ARCH_NETWINDER=y
1312
CONFIG_LEDS=y

arch/arm/include/asm/kexec.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
5656
}
5757
}
5858

59-
/* Function pointer to optional machine-specific reinitialization */
60-
extern void (*kexec_reinit)(void);
61-
6259
static inline unsigned long phys_to_boot_phys(phys_addr_t phys)
6360
{
6461
return phys_to_idmap(phys);

arch/arm/include/asm/memory.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -150,21 +150,6 @@ extern unsigned long vectors_base;
150150
*/
151151
#define PLAT_PHYS_OFFSET UL(CONFIG_PHYS_OFFSET)
152152

153-
#ifdef CONFIG_XIP_KERNEL
154-
/*
155-
* When referencing data in RAM from the XIP region in a relative manner
156-
* with the MMU off, we need the relative offset between the two physical
157-
* addresses. The macro below achieves this, which is:
158-
* __pa(v_data) - __xip_pa(v_text)
159-
*/
160-
#define PHYS_RELATIVE(v_data, v_text) \
161-
(((v_data) - PAGE_OFFSET + PLAT_PHYS_OFFSET) - \
162-
((v_text) - XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) + \
163-
CONFIG_XIP_PHYS_ADDR))
164-
#else
165-
#define PHYS_RELATIVE(v_data, v_text) ((v_data) - (v_text))
166-
#endif
167-
168153
#ifndef __ASSEMBLY__
169154

170155
/*

arch/arm/include/asm/set_memory.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,4 @@ static inline int set_memory_x(unsigned long addr, int numpages) { return 0; }
1818
static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; }
1919
#endif
2020

21-
#ifdef CONFIG_STRICT_KERNEL_RWX
22-
void set_kernel_text_rw(void);
23-
void set_kernel_text_ro(void);
24-
#else
25-
static inline void set_kernel_text_rw(void) { }
26-
static inline void set_kernel_text_ro(void) { }
27-
#endif
28-
2921
#endif

arch/arm/include/uapi/asm/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3-
generated-y += unistd-common.h
43
generated-y += unistd-oabi.h
54
generated-y += unistd-eabi.h
65
generic-y += kvm_para.h

arch/arm/include/uapi/asm/unistd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <asm/unistd-oabi.h>
2525
#endif
2626

27-
#include <asm/unistd-common.h>
2827
#define __NR_sync_file_range2 __NR_arm_sync_file_range
2928

3029
/*

arch/arm/kernel/asm-offsets.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <asm/vdso_datapage.h>
2525
#include <asm/hardware/cache-l2x0.h>
2626
#include <linux/kbuild.h>
27+
#include <linux/arm-smccc.h>
2728
#include "signal.h"
2829

2930
/*
@@ -148,6 +149,8 @@ int main(void)
148149
DEFINE(SLEEP_SAVE_SP_PHYS, offsetof(struct sleep_save_sp, save_ptr_stash_phys));
149150
DEFINE(SLEEP_SAVE_SP_VIRT, offsetof(struct sleep_save_sp, save_ptr_stash));
150151
#endif
152+
DEFINE(ARM_SMCCC_QUIRK_ID_OFFS, offsetof(struct arm_smccc_quirk, id));
153+
DEFINE(ARM_SMCCC_QUIRK_STATE_OFFS, offsetof(struct arm_smccc_quirk, state));
151154
BLANK();
152155
DEFINE(DMA_BIDIRECTIONAL, DMA_BIDIRECTIONAL);
153156
DEFINE(DMA_TO_DEVICE, DMA_TO_DEVICE);

arch/arm/kernel/entry-common.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,20 +344,19 @@ ENTRY(\sym)
344344
.size \sym, . - \sym
345345
.endm
346346

347-
#define NATIVE(nr, func) syscall nr, func
347+
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native)
348+
#define __SYSCALL(nr, func) syscall nr, func
348349

349350
/*
350351
* This is the syscall table declaration for native ABI syscalls.
351352
* With EABI a couple syscalls are obsolete and defined as sys_ni_syscall.
352353
*/
353354
syscall_table_start sys_call_table
354-
#define COMPAT(nr, native, compat) syscall nr, native
355355
#ifdef CONFIG_AEABI
356356
#include <calls-eabi.S>
357357
#else
358358
#include <calls-oabi.S>
359359
#endif
360-
#undef COMPAT
361360
syscall_table_end sys_call_table
362361

363362
/*============================================================================
@@ -455,7 +454,8 @@ ENDPROC(sys_oabi_readahead)
455454
* using the compatibility syscall entries.
456455
*/
457456
syscall_table_start sys_oabi_call_table
458-
#define COMPAT(nr, native, compat) syscall nr, compat
457+
#undef __SYSCALL_WITH_COMPAT
458+
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, compat)
459459
#include <calls-oabi.S>
460460
syscall_table_end sys_oabi_call_table
461461

arch/arm/kernel/hw_breakpoint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs)
886886
info->trigger = addr;
887887
pr_debug("breakpoint fired: address = 0x%x\n", addr);
888888
perf_bp_event(bp, regs);
889-
if (!bp->overflow_handler)
889+
if (is_default_overflow_handler(bp))
890890
enable_single_step(bp, addr);
891891
goto unlock;
892892
}

arch/arm/kernel/machine_kexec.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,6 @@ void machine_crash_shutdown(struct pt_regs *regs)
147147
pr_info("Loading crashdump kernel...\n");
148148
}
149149

150-
/*
151-
* Function pointer to optional machine-specific reinitialization
152-
*/
153-
void (*kexec_reinit)(void);
154-
155150
void machine_kexec(struct kimage *image)
156151
{
157152
unsigned long page_list, reboot_entry_phys;
@@ -187,9 +182,6 @@ void machine_kexec(struct kimage *image)
187182

188183
pr_info("Bye!\n");
189184

190-
if (kexec_reinit)
191-
kexec_reinit();
192-
193185
soft_restart(reboot_entry_phys);
194186
}
195187

arch/arm/kernel/smccc-call.S

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
* Copyright (c) 2015, Linaro Limited
44
*/
55
#include <linux/linkage.h>
6+
#include <linux/arm-smccc.h>
67

8+
#include <asm/asm-offsets.h>
79
#include <asm/opcodes-sec.h>
810
#include <asm/opcodes-virt.h>
911
#include <asm/unwind.h>
@@ -27,7 +29,14 @@ UNWIND( .fnstart)
2729
UNWIND( .save {r4-r7})
2830
ldm r12, {r4-r7}
2931
\instr
30-
pop {r4-r7}
32+
ldr r4, [sp, #36]
33+
cmp r4, #0
34+
beq 1f // No quirk structure
35+
ldr r5, [r4, #ARM_SMCCC_QUIRK_ID_OFFS]
36+
cmp r5, #ARM_SMCCC_QUIRK_QCOM_A6
37+
bne 1f // No quirk present
38+
str r6, [r4, #ARM_SMCCC_QUIRK_STATE_OFFS]
39+
1: pop {r4-r7}
3140
ldr r12, [sp, #(4 * 4)]
3241
stm r12, {r0-r3}
3342
bx lr

arch/arm/kernel/suspend.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// SPDX-License-Identifier: GPL-2.0
2+
#include <linux/ftrace.h>
23
#include <linux/init.h>
34
#include <linux/slab.h>
45
#include <linux/mm_types.h>
@@ -25,13 +26,23 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
2526
if (!idmap_pgd)
2627
return -EINVAL;
2728

29+
/*
30+
* Function graph tracer state gets incosistent when the kernel
31+
* calls functions that never return (aka suspend finishers) hence
32+
* disable graph tracing during their execution.
33+
*/
34+
pause_graph_tracing();
35+
2836
/*
2937
* Provide a temporary page table with an identity mapping for
3038
* the MMU-enable code, required for resuming. On successful
3139
* resume (indicated by a zero return code), we need to switch
3240
* back to the correct page tables.
3341
*/
3442
ret = __cpu_suspend(arg, fn, __mpidr);
43+
44+
unpause_graph_tracing();
45+
3546
if (ret == 0) {
3647
cpu_switch_mm(mm->pgd, mm);
3748
local_flush_bp_all();
@@ -45,7 +56,13 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
4556
int cpu_suspend(unsigned long arg, int (*fn)(unsigned long))
4657
{
4758
u32 __mpidr = cpu_logical_map(smp_processor_id());
48-
return __cpu_suspend(arg, fn, __mpidr);
59+
int ret;
60+
61+
pause_graph_tracing();
62+
ret = __cpu_suspend(arg, fn, __mpidr);
63+
unpause_graph_tracing();
64+
65+
return ret;
4966
}
5067
#define idmap_pgd NULL
5168
#endif

arch/arm/mach-footbridge/Kconfig

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,6 @@ config ARCH_CATS
1616

1717
Saying N will reduce the size of the Footbridge kernel.
1818

19-
config ARCH_PERSONAL_SERVER
20-
bool "Compaq Personal Server"
21-
select FOOTBRIDGE_HOST
22-
select ISA
23-
select ISA_DMA
24-
select FORCE_PCI
25-
help
26-
Say Y here if you intend to run this kernel on the Compaq
27-
Personal Server.
28-
29-
Saying N will reduce the size of the Footbridge kernel.
30-
31-
The Compaq Personal Server is not available for purchase.
32-
There are no product plans beyond the current research
33-
prototypes at this time. Information is available at:
34-
35-
<http://www.crl.hpl.hp.com/projects/personalserver/>
36-
37-
If you have any questions or comments about the Compaq Personal
38-
Server, send e-mail to <skiff@crl.dec.com>.
39-
4019
config ARCH_EBSA285_ADDIN
4120
bool "EBSA285 (addin mode)"
4221
select ARCH_EBSA285

arch/arm/mach-footbridge/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ pci-y += dc21285.o
1111
pci-$(CONFIG_ARCH_CATS) += cats-pci.o
1212
pci-$(CONFIG_ARCH_EBSA285_HOST) += ebsa285-pci.o
1313
pci-$(CONFIG_ARCH_NETWINDER) += netwinder-pci.o
14-
pci-$(CONFIG_ARCH_PERSONAL_SERVER) += personal-pci.o
1514

1615
obj-$(CONFIG_ARCH_CATS) += cats-hw.o isa-timer.o
1716
obj-$(CONFIG_ARCH_EBSA285) += ebsa285.o dc21285-timer.o
1817
obj-$(CONFIG_ARCH_NETWINDER) += netwinder-hw.o isa-timer.o
19-
obj-$(CONFIG_ARCH_PERSONAL_SERVER) += personal.o dc21285-timer.o
2018

2119
obj-$(CONFIG_PCI) +=$(pci-y)
2220

arch/arm/mach-footbridge/personal-pci.c

Lines changed: 0 additions & 57 deletions
This file was deleted.

arch/arm/mach-footbridge/personal.c

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)