diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 10:17:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 10:17:32 -0400 |
commit | 3cfef9524677a4ecb392d6fbffe6ebce6302f1d4 (patch) | |
tree | 88647d9dc50d634dee9cfeb7f354d620977a2f33 /arch/arm/common | |
parent | 982653009b883ef1529089e3e6f1ae2fee41cbe2 (diff) | |
parent | 68cc3990a545dc0da221b4844dd8b9c06623a6c5 (diff) |
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/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").
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/gic.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 666b278e56d7..bdbb3f74f0fe 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <asm/mach/irq.h> | 33 | #include <asm/mach/irq.h> |
34 | #include <asm/hardware/gic.h> | 34 | #include <asm/hardware/gic.h> |
35 | 35 | ||
36 | static DEFINE_SPINLOCK(irq_controller_lock); | 36 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); |
37 | 37 | ||
38 | /* Address of GIC 0 CPU interface */ | 38 | /* Address of GIC 0 CPU interface */ |
39 | void __iomem *gic_cpu_base_addr __read_mostly; | 39 | void __iomem *gic_cpu_base_addr __read_mostly; |
@@ -82,30 +82,30 @@ static void gic_mask_irq(struct irq_data *d) | |||
82 | { | 82 | { |
83 | u32 mask = 1 << (d->irq % 32); | 83 | u32 mask = 1 << (d->irq % 32); |
84 | 84 | ||
85 | spin_lock(&irq_controller_lock); | 85 | raw_spin_lock(&irq_controller_lock); |
86 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4); | 86 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4); |
87 | if (gic_arch_extn.irq_mask) | 87 | if (gic_arch_extn.irq_mask) |
88 | gic_arch_extn.irq_mask(d); | 88 | gic_arch_extn.irq_mask(d); |
89 | spin_unlock(&irq_controller_lock); | 89 | raw_spin_unlock(&irq_controller_lock); |
90 | } | 90 | } |
91 | 91 | ||
92 | static void gic_unmask_irq(struct irq_data *d) | 92 | static void gic_unmask_irq(struct irq_data *d) |
93 | { | 93 | { |
94 | u32 mask = 1 << (d->irq % 32); | 94 | u32 mask = 1 << (d->irq % 32); |
95 | 95 | ||
96 | spin_lock(&irq_controller_lock); | 96 | raw_spin_lock(&irq_controller_lock); |
97 | if (gic_arch_extn.irq_unmask) | 97 | if (gic_arch_extn.irq_unmask) |
98 | gic_arch_extn.irq_unmask(d); | 98 | gic_arch_extn.irq_unmask(d); |
99 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4); | 99 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4); |
100 | spin_unlock(&irq_controller_lock); | 100 | raw_spin_unlock(&irq_controller_lock); |
101 | } | 101 | } |
102 | 102 | ||
103 | static void gic_eoi_irq(struct irq_data *d) | 103 | static void gic_eoi_irq(struct irq_data *d) |
104 | { | 104 | { |
105 | if (gic_arch_extn.irq_eoi) { | 105 | if (gic_arch_extn.irq_eoi) { |
106 | spin_lock(&irq_controller_lock); | 106 | raw_spin_lock(&irq_controller_lock); |
107 | gic_arch_extn.irq_eoi(d); | 107 | gic_arch_extn.irq_eoi(d); |
108 | spin_unlock(&irq_controller_lock); | 108 | raw_spin_unlock(&irq_controller_lock); |
109 | } | 109 | } |
110 | 110 | ||
111 | writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI); | 111 | writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI); |
@@ -129,7 +129,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type) | |||
129 | if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING) | 129 | if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING) |
130 | return -EINVAL; | 130 | return -EINVAL; |
131 | 131 | ||
132 | spin_lock(&irq_controller_lock); | 132 | raw_spin_lock(&irq_controller_lock); |
133 | 133 | ||
134 | if (gic_arch_extn.irq_set_type) | 134 | if (gic_arch_extn.irq_set_type) |
135 | gic_arch_extn.irq_set_type(d, type); | 135 | gic_arch_extn.irq_set_type(d, type); |
@@ -154,7 +154,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type) | |||
154 | if (enabled) | 154 | if (enabled) |
155 | writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff); | 155 | writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff); |
156 | 156 | ||
157 | spin_unlock(&irq_controller_lock); | 157 | raw_spin_unlock(&irq_controller_lock); |
158 | 158 | ||
159 | return 0; | 159 | return 0; |
160 | } | 160 | } |
@@ -182,10 +182,10 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, | |||
182 | mask = 0xff << shift; | 182 | mask = 0xff << shift; |
183 | bit = 1 << (cpu_logical_map(cpu) + shift); | 183 | bit = 1 << (cpu_logical_map(cpu) + shift); |
184 | 184 | ||
185 | spin_lock(&irq_controller_lock); | 185 | raw_spin_lock(&irq_controller_lock); |
186 | val = readl_relaxed(reg) & ~mask; | 186 | val = readl_relaxed(reg) & ~mask; |
187 | writel_relaxed(val | bit, reg); | 187 | writel_relaxed(val | bit, reg); |
188 | spin_unlock(&irq_controller_lock); | 188 | raw_spin_unlock(&irq_controller_lock); |
189 | 189 | ||
190 | return IRQ_SET_MASK_OK; | 190 | return IRQ_SET_MASK_OK; |
191 | } | 191 | } |
@@ -215,9 +215,9 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) | |||
215 | 215 | ||
216 | chained_irq_enter(chip, desc); | 216 | chained_irq_enter(chip, desc); |
217 | 217 | ||
218 | spin_lock(&irq_controller_lock); | 218 | raw_spin_lock(&irq_controller_lock); |
219 | status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK); | 219 | status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK); |
220 | spin_unlock(&irq_controller_lock); | 220 | raw_spin_unlock(&irq_controller_lock); |
221 | 221 | ||
222 | gic_irq = (status & 0x3ff); | 222 | gic_irq = (status & 0x3ff); |
223 | if (gic_irq == 1023) | 223 | if (gic_irq == 1023) |