From: Linus Torvalds Date: Wed, 26 Oct 2011 14:17:32 +0000 (+0200) Subject: Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel... X-Git-Tag: MMI-PSA29.97-13-9~18231 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3cfef9524677a4ecb392d6fbffe6ebce6302f1d4;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Merge branch 'core-locking-for-linus' of git://git./linux/kernel/git/tip/tip * 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits) rtmutex: Add missing rcu_read_unlock() in debug_rt_mutex_print_deadlock() lockdep: Comment all warnings lib: atomic64: Change the type of local lock to raw_spinlock_t locking, lib/atomic64: Annotate atomic64_lock::lock as raw locking, x86, iommu: Annotate qi->q_lock as raw locking, x86, iommu: Annotate irq_2_ir_lock as raw locking, x86, iommu: Annotate iommu->register_lock as raw locking, dma, ipu: Annotate bank_lock as raw locking, ARM: Annotate low level hw locks as raw locking, drivers/dca: Annotate dca_lock as raw locking, powerpc: Annotate uic->lock as raw locking, x86: mce: Annotate cmci_discover_lock as raw locking, ACPI: Annotate c3_lock as raw locking, oprofile: Annotate oprofilefs lock as raw locking, video: Annotate vga console lock as raw locking, latencytop: Annotate latency_lock as raw locking, timer_stats: Annotate table_lock as raw locking, rwsem: Annotate inner lock as raw locking, semaphores: Annotate inner lock as raw locking, sched: Annotate thread_group_cputimer as raw ... Fix up conflicts in kernel/posix-cpu-timers.c manually: making cputimer->cputime a raw lock conflicted with the ABBA fix in commit bcd5cff7216f ("cputimer: Cure lock inversion"). --- 3cfef9524677a4ecb392d6fbffe6ebce6302f1d4 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 7f5b99eb2c50,81cc05a0274c..99a572702509 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@@ -269,11 -267,9 +269,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)) @@@ -305,26 -301,8 +305,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) { diff --cc arch/arm/mm/cache-l2x0.c index 3f9b9980478e,3255c51e3e35..8ac9e9f84790 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@@ -285,10 -274,10 +285,10 @@@ static void l2x0_disable(void __l2x0_flush_all(); writel_relaxed(0, l2x0_base + L2X0_CTRL); dsb(); - spin_unlock_irqrestore(&l2x0_lock, flags); + raw_spin_unlock_irqrestore(&l2x0_lock, flags); } -static void __init l2x0_unlock(__u32 cache_id) +static void l2x0_unlock(__u32 cache_id) { int lockregs; int i; diff --cc drivers/iommu/intr_remapping.c index cfb0dd4bf0b6,73a903491f2c..07c9f189f314 --- a/drivers/iommu/intr_remapping.c +++ b/drivers/iommu/intr_remapping.c @@@ -507,18 -498,9 +507,18 @@@ static void iommu_disable_intr_remappin readl, !(sts & DMA_GSTS_IRES), sts); end: - spin_unlock_irqrestore(&iommu->register_lock, flags); + raw_spin_unlock_irqrestore(&iommu->register_lock, flags); } +static int __init dmar_x2apic_optout(void) +{ + struct acpi_table_dmar *dmar; + dmar = (struct acpi_table_dmar *)dmar_tbl; + if (!dmar || no_x2apic_optout) + return 0; + return dmar->flags & DMAR_X2APIC_OPT_OUT; +} + int __init intr_remapping_supported(void) { struct dmar_drhd_unit *drhd; diff --cc kernel/posix-cpu-timers.c index 640ded8f5c48,41440cca55a2..e7cb76dc18f5 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c @@@ -282,13 -284,10 +282,13 @@@ void thread_group_cputimer(struct task_ * it. */ thread_group_cputime(tsk, &sum); - spin_lock_irqsave(&cputimer->lock, flags); ++ raw_spin_lock_irqsave(&cputimer->lock, flags); + cputimer->running = 1; update_gt_cputime(&cputimer->cputime, &sum); - } + } else - spin_lock_irqsave(&cputimer->lock, flags); ++ raw_spin_lock_irqsave(&cputimer->lock, flags); *times = cputimer->cputime; - spin_unlock_irqrestore(&cputimer->lock, flags); + raw_spin_unlock_irqrestore(&cputimer->lock, flags); } /*