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
This commit is contained in:
Linus Torvalds 2014-05-29 18:31:09 -07:00
commit fe45736f41
6 changed files with 20 additions and 8 deletions

View File

@ -433,8 +433,12 @@ static void bL_switcher_restore_cpus(void)
{ {
int i; int i;
for_each_cpu(i, &bL_switcher_removed_logical_cpus) for_each_cpu(i, &bL_switcher_removed_logical_cpus) {
cpu_up(i); struct device *cpu_dev = get_cpu_device(i);
int ret = device_online(cpu_dev);
if (ret)
dev_err(cpu_dev, "switcher: unable to restore CPU\n");
}
} }
static int bL_switcher_halve_cpus(void) static int bL_switcher_halve_cpus(void)
@ -521,7 +525,7 @@ static int bL_switcher_halve_cpus(void)
continue; continue;
} }
ret = cpu_down(i); ret = device_offline(get_cpu_device(i));
if (ret) { if (ret) {
bL_switcher_restore_cpus(); bL_switcher_restore_cpus();
return ret; return ret;

View File

@ -171,8 +171,9 @@ extern int __put_user_8(void *, unsigned long long);
#define __put_user_check(x,p) \ #define __put_user_check(x,p) \
({ \ ({ \
unsigned long __limit = current_thread_info()->addr_limit - 1; \ unsigned long __limit = current_thread_info()->addr_limit - 1; \
const typeof(*(p)) __user *__tmp_p = (p); \
register const typeof(*(p)) __r2 asm("r2") = (x); \ register const typeof(*(p)) __r2 asm("r2") = (x); \
register const typeof(*(p)) __user *__p asm("r0") = (p);\ register const typeof(*(p)) __user *__p asm("r0") = __tmp_p; \
register unsigned long __l asm("r1") = __limit; \ register unsigned long __l asm("r1") = __limit; \
register int __e asm("r0"); \ register int __e asm("r0"); \
switch (sizeof(*(__p))) { \ switch (sizeof(*(__p))) { \

View File

@ -132,6 +132,10 @@
orrne r5, V7M_xPSR_FRAMEPTRALIGN orrne r5, V7M_xPSR_FRAMEPTRALIGN
biceq r5, V7M_xPSR_FRAMEPTRALIGN biceq r5, V7M_xPSR_FRAMEPTRALIGN
@ ensure bit 0 is cleared in the PC, otherwise behaviour is
@ unpredictable
bic r4, #1
@ write basic exception frame @ write basic exception frame
stmdb r2!, {r1, r3-r5} stmdb r2!, {r1, r3-r5}
ldmia sp, {r1, r3-r5} ldmia sp, {r1, r3-r5}

View File

@ -285,7 +285,7 @@ static int unwind_exec_pop_r4_to_rN(struct unwind_ctrl_block *ctrl,
if (unwind_pop_register(ctrl, &vsp, reg)) if (unwind_pop_register(ctrl, &vsp, reg))
return -URC_FAILURE; return -URC_FAILURE;
if (insn & 0x80) if (insn & 0x8)
if (unwind_pop_register(ctrl, &vsp, 14)) if (unwind_pop_register(ctrl, &vsp, 14))
return -URC_FAILURE; return -URC_FAILURE;

View File

@ -123,6 +123,11 @@ __v7m_setup:
mov pc, lr mov pc, lr
ENDPROC(__v7m_setup) ENDPROC(__v7m_setup)
.align 2
__v7m_setup_stack:
.space 4 * 8 @ 8 registers
__v7m_setup_stack_top:
define_processor_functions v7m, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1 define_processor_functions v7m, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1
.section ".rodata" .section ".rodata"
@ -152,6 +157,3 @@ __v7m_proc_info:
.long nop_cache_fns @ proc_info_list.cache .long nop_cache_fns @ proc_info_list.cache
.size __v7m_proc_info, . - __v7m_proc_info .size __v7m_proc_info, . - __v7m_proc_info
__v7m_setup_stack:
.space 4 * 8 @ 8 registers
__v7m_setup_stack_top:

View File

@ -47,6 +47,7 @@ struct amba_driver {
enum amba_vendor { enum amba_vendor {
AMBA_VENDOR_ARM = 0x41, AMBA_VENDOR_ARM = 0x41,
AMBA_VENDOR_ST = 0x80, AMBA_VENDOR_ST = 0x80,
AMBA_VENDOR_QCOM = 0x51,
}; };
extern struct bus_type amba_bustype; extern struct bus_type amba_bustype;