Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 26 Oct 2011 14:17:32 +0000 (16:17 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 26 Oct 2011 14:17:32 +0000 (16:17 +0200)
* '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").

15 files changed:
1  2 
arch/arm/common/gic.c
arch/arm/kernel/smp.c
arch/arm/kernel/traps.c
arch/arm/mach-footbridge/netwinder-hw.c
arch/arm/mach-integrator/core.c
arch/arm/mach-integrator/pci_v3.c
arch/arm/mach-ixp4xx/common-pci.c
arch/arm/mm/cache-l2x0.c
drivers/acpi/processor_idle.c
drivers/iommu/dmar.c
drivers/iommu/intel-iommu.c
drivers/iommu/intr_remapping.c
include/linux/intel-iommu.h
include/linux/sched.h
kernel/posix-cpu-timers.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;
  }
Simple merge
@@@ -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)
  {
Simple merge
Simple merge
Simple merge
@@@ -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;
Simple merge
Simple merge
Simple merge
@@@ -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;
Simple merge
Simple merge
@@@ -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);
  }
  
  /*