From: Stephen Rothwell Date: Wed, 21 Sep 2011 03:37:28 +0000 (+1000) Subject: Merge remote-tracking branch 'tip/auto-latest' X-Git-Tag: next-20110921~20 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=66843080f93d8b69417bbbaff963be261568fda3;p=karo-tx-linux.git Merge remote-tracking branch 'tip/auto-latest' --- 66843080f93d8b69417bbbaff963be261568fda3 diff --cc arch/arm/common/gic.c index 666b278e56d7,6fba8bd5689e..bdbb3f74f0fe --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c @@@ -180,12 -180,12 +180,12 @@@ static int gic_set_affinity(struct irq_ return -EINVAL; mask = 0xff << shift; - bit = 1 << (cpu + shift); + bit = 1 << (cpu_logical_map(cpu) + shift); - spin_lock(&irq_controller_lock); + raw_spin_lock(&irq_controller_lock); val = readl_relaxed(reg) & ~mask; writel_relaxed(val | bit, reg); - spin_unlock(&irq_controller_lock); + raw_spin_unlock(&irq_controller_lock); return IRQ_SET_MASK_OK; } diff --cc arch/arm/kernel/traps.c index 74969248c375,81cc05a0274c..c32ba00e8437 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@@ -268,11 -267,9 +268,11 @@@ void die(const char *str, struct pt_reg oops_enter(); - spin_lock_irq(&die_lock); + raw_spin_lock_irq(&die_lock); console_verbose(); bust_spinlocks(1); + if (!user_mode(regs)) + report_bug(regs->ARM_pc, regs); ret = __die(str, err, thread, regs); if (regs && kexec_should_crash(thread->task)) @@@ -304,26 -301,8 +304,26 @@@ void arm_notify_die(const char *str, st } } +#ifdef CONFIG_GENERIC_BUG + +int is_valid_bugaddr(unsigned long pc) +{ +#ifdef CONFIG_THUMB2_KERNEL + unsigned short bkpt; +#else + unsigned long bkpt; +#endif + + if (probe_kernel_address((unsigned *)pc, bkpt)) + return 0; + + return bkpt == BUG_INSTR_VALUE; +} + +#endif + static LIST_HEAD(undef_hook); - static DEFINE_SPINLOCK(undef_lock); + static DEFINE_RAW_SPINLOCK(undef_lock); void register_undef_hook(struct undef_hook *hook) {