Skip to content

Commit fe45736

Browse files
committed
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: "The usual random collection of relatively small ARM fixes" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8063/1: bL_switcher: fix individual online status reporting of removed CPUs ARM: 8064/1: fix v7-M signal return ARM: 8057/1: amba: Add Qualcomm vendor ID. ARM: 8052/1: unwind: Fix handling of "Pop r4-r[4+nnn],r14" opcode ARM: 8051/1: put_user: fix possible data corruption in put_user ARM: 8048/1: fix v7-M setup stack location
2 parents a991639 + 3f8517e commit fe45736

6 files changed

Lines changed: 20 additions & 8 deletions

File tree

‎arch/arm/common/bL_switcher.c‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,12 @@ static void bL_switcher_restore_cpus(void)
433433
{
434434
int i;
435435

436-
for_each_cpu(i, &bL_switcher_removed_logical_cpus)
437-
cpu_up(i);
436+
for_each_cpu(i, &bL_switcher_removed_logical_cpus) {
437+
struct device *cpu_dev = get_cpu_device(i);
438+
int ret = device_online(cpu_dev);
439+
if (ret)
440+
dev_err(cpu_dev, "switcher: unable to restore CPU\n");
441+
}
438442
}
439443

440444
static int bL_switcher_halve_cpus(void)
@@ -521,7 +525,7 @@ static int bL_switcher_halve_cpus(void)
521525
continue;
522526
}
523527

524-
ret = cpu_down(i);
528+
ret = device_offline(get_cpu_device(i));
525529
if (ret) {
526530
bL_switcher_restore_cpus();
527531
return ret;

‎arch/arm/include/asm/uaccess.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ extern int __put_user_8(void *, unsigned long long);
171171
#define __put_user_check(x,p) \
172172
({ \
173173
unsigned long __limit = current_thread_info()->addr_limit - 1; \
174+
const typeof(*(p)) __user *__tmp_p = (p); \
174175
register const typeof(*(p)) __r2 asm("r2") = (x); \
175-
register const typeof(*(p)) __user *__p asm("r0") = (p);\
176+
register const typeof(*(p)) __user *__p asm("r0") = __tmp_p; \
176177
register unsigned long __l asm("r1") = __limit; \
177178
register int __e asm("r0"); \
178179
switch (sizeof(*(__p))) { \

‎arch/arm/kernel/entry-header.S‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@
132132
orrne r5, V7M_xPSR_FRAMEPTRALIGN
133133
biceq r5, V7M_xPSR_FRAMEPTRALIGN
134134

135+
@ ensure bit 0 is cleared in the PC, otherwise behaviour is
136+
@ unpredictable
137+
bic r4, #1
138+
135139
@ write basic exception frame
136140
stmdb r2!, {r1, r3-r5}
137141
ldmia sp, {r1, r3-r5}

‎arch/arm/kernel/unwind.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static int unwind_exec_pop_r4_to_rN(struct unwind_ctrl_block *ctrl,
285285
if (unwind_pop_register(ctrl, &vsp, reg))
286286
return -URC_FAILURE;
287287

288-
if (insn & 0x80)
288+
if (insn & 0x8)
289289
if (unwind_pop_register(ctrl, &vsp, 14))
290290
return -URC_FAILURE;
291291

‎arch/arm/mm/proc-v7m.S‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ __v7m_setup:
123123
mov pc, lr
124124
ENDPROC(__v7m_setup)
125125

126+
.align 2
127+
__v7m_setup_stack:
128+
.space 4 * 8 @ 8 registers
129+
__v7m_setup_stack_top:
130+
126131
define_processor_functions v7m, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1
127132

128133
.section ".rodata"
@@ -152,6 +157,3 @@ __v7m_proc_info:
152157
.long nop_cache_fns @ proc_info_list.cache
153158
.size __v7m_proc_info, . - __v7m_proc_info
154159

155-
__v7m_setup_stack:
156-
.space 4 * 8 @ 8 registers
157-
__v7m_setup_stack_top:

‎include/linux/amba/bus.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ struct amba_driver {
4747
enum amba_vendor {
4848
AMBA_VENDOR_ARM = 0x41,
4949
AMBA_VENDOR_ST = 0x80,
50+
AMBA_VENDOR_QCOM = 0x51,
5051
};
5152

5253
extern struct bus_type amba_bustype;

0 commit comments

Comments
 (0)