Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/common/gic.c |
| 3 | * |
| 4 | * Copyright (C) 2002 ARM Limited, All Rights Reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | * |
| 10 | * Interrupt architecture for the GIC: |
| 11 | * |
| 12 | * o There is one Interrupt Distributor, which receives interrupts |
| 13 | * from system devices and sends them to the Interrupt Controllers. |
| 14 | * |
| 15 | * o There is one CPU Interface per CPU, which sends interrupts sent |
| 16 | * by the Distributor, and interrupts generated locally, to the |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 17 | * associated CPU. The base address of the CPU interface is usually |
| 18 | * aliased so that the same address points to different chips depending |
| 19 | * on the CPU it is accessed from. |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 20 | * |
| 21 | * Note that IRQs 0-31 are special - they are local to each CPU. |
| 22 | * As such, the enable set/clear, pending set/clear and active bit |
| 23 | * registers are banked per-cpu for these sources. |
| 24 | */ |
| 25 | #include <linux/init.h> |
| 26 | #include <linux/kernel.h> |
| 27 | #include <linux/list.h> |
| 28 | #include <linux/smp.h> |
Catalin Marinas | dcb86e8 | 2005-08-31 21:45:14 +0100 | [diff] [blame] | 29 | #include <linux/cpumask.h> |
Russell King | fced80c | 2008-09-06 12:10:45 +0100 | [diff] [blame] | 30 | #include <linux/io.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 31 | #include <linux/syscore_ops.h> |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 32 | |
| 33 | #include <asm/irq.h> |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 34 | #include <asm/mach/irq.h> |
| 35 | #include <asm/hardware/gic.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 36 | #include <asm/system.h> |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 37 | |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 38 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 39 | |
Russell King | ff2e27a | 2010-12-04 16:13:29 +0000 | [diff] [blame] | 40 | /* Address of GIC 0 CPU interface */ |
Russell King | bef8f9e | 2010-12-04 16:50:58 +0000 | [diff] [blame] | 41 | void __iomem *gic_cpu_base_addr __read_mostly; |
Russell King | ff2e27a | 2010-12-04 16:13:29 +0000 | [diff] [blame] | 42 | |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 43 | /* |
| 44 | * Supported arch specific GIC irq extension. |
| 45 | * Default make them NULL. |
| 46 | */ |
| 47 | struct irq_chip gic_arch_extn = { |
Will Deacon | 1a01753 | 2011-02-09 12:01:12 +0000 | [diff] [blame] | 48 | .irq_eoi = NULL, |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 49 | .irq_mask = NULL, |
| 50 | .irq_unmask = NULL, |
| 51 | .irq_retrigger = NULL, |
| 52 | .irq_set_type = NULL, |
| 53 | .irq_set_wake = NULL, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 54 | .irq_disable = NULL, |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 55 | }; |
| 56 | |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 57 | #ifndef MAX_GIC_NR |
| 58 | #define MAX_GIC_NR 1 |
| 59 | #endif |
| 60 | |
Russell King | bef8f9e | 2010-12-04 16:50:58 +0000 | [diff] [blame] | 61 | static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly; |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 62 | |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 63 | static inline void __iomem *gic_dist_base(struct irq_data *d) |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 64 | { |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 65 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 66 | return gic_data->dist_base; |
| 67 | } |
| 68 | |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 69 | static inline void __iomem *gic_cpu_base(struct irq_data *d) |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 70 | { |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 71 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 72 | return gic_data->cpu_base; |
| 73 | } |
| 74 | |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 75 | static inline unsigned int gic_irq(struct irq_data *d) |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 76 | { |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 77 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
| 78 | return d->irq - gic_data->irq_offset; |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 79 | } |
| 80 | |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 81 | /* |
| 82 | * Routines to acknowledge, disable and enable interrupts |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 83 | */ |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 84 | static void gic_mask_irq(struct irq_data *d) |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 85 | { |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 86 | u32 mask = 1 << (d->irq % 32); |
Thomas Gleixner | c4bfa28 | 2006-07-01 22:32:14 +0100 | [diff] [blame] | 87 | |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 88 | raw_spin_lock(&irq_controller_lock); |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 89 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4); |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 90 | if (gic_arch_extn.irq_mask) |
| 91 | gic_arch_extn.irq_mask(d); |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 92 | raw_spin_unlock(&irq_controller_lock); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 93 | } |
| 94 | |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 95 | static void gic_unmask_irq(struct irq_data *d) |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 96 | { |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 97 | u32 mask = 1 << (d->irq % 32); |
Thomas Gleixner | c4bfa28 | 2006-07-01 22:32:14 +0100 | [diff] [blame] | 98 | |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 99 | raw_spin_lock(&irq_controller_lock); |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 100 | if (gic_arch_extn.irq_unmask) |
| 101 | gic_arch_extn.irq_unmask(d); |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 102 | writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4); |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 103 | raw_spin_unlock(&irq_controller_lock); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 104 | } |
| 105 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 106 | static void gic_disable_irq(struct irq_data *d) |
| 107 | { |
| 108 | if (gic_arch_extn.irq_disable) |
| 109 | gic_arch_extn.irq_disable(d); |
| 110 | } |
| 111 | |
| 112 | #ifdef CONFIG_PM |
| 113 | static int gic_suspend_one(struct gic_chip_data *gic) |
| 114 | { |
| 115 | unsigned int i; |
| 116 | void __iomem *base = gic->dist_base; |
| 117 | |
| 118 | for (i = 0; i * 32 < gic->max_irq; i++) { |
| 119 | gic->enabled_irqs[i] |
| 120 | = readl_relaxed(base + GIC_DIST_ENABLE_SET + i * 4); |
| 121 | /* disable all of them */ |
| 122 | writel_relaxed(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4); |
| 123 | /* enable the wakeup set */ |
| 124 | writel_relaxed(gic->wakeup_irqs[i], |
| 125 | base + GIC_DIST_ENABLE_SET + i * 4); |
| 126 | } |
| 127 | mb(); |
| 128 | return 0; |
| 129 | } |
| 130 | |
| 131 | static int gic_suspend(void) |
| 132 | { |
| 133 | int i; |
| 134 | for (i = 0; i < MAX_GIC_NR; i++) |
| 135 | gic_suspend_one(&gic_data[i]); |
| 136 | return 0; |
| 137 | } |
| 138 | |
| 139 | extern int msm_show_resume_irq_mask; |
| 140 | |
| 141 | static void gic_show_resume_irq(struct gic_chip_data *gic) |
| 142 | { |
| 143 | unsigned int i; |
| 144 | u32 enabled; |
| 145 | unsigned long pending[32]; |
| 146 | void __iomem *base = gic->dist_base; |
| 147 | |
| 148 | if (!msm_show_resume_irq_mask) |
| 149 | return; |
| 150 | |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 151 | raw_spin_lock(&irq_controller_lock); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 152 | for (i = 0; i * 32 < gic->max_irq; i++) { |
| 153 | enabled = readl_relaxed(base + GIC_DIST_ENABLE_CLEAR + i * 4); |
| 154 | pending[i] = readl_relaxed(base + GIC_DIST_PENDING_SET + i * 4); |
| 155 | pending[i] &= enabled; |
| 156 | } |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 157 | raw_spin_unlock(&irq_controller_lock); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 158 | |
| 159 | for (i = find_first_bit(pending, gic->max_irq); |
| 160 | i < gic->max_irq; |
| 161 | i = find_next_bit(pending, gic->max_irq, i+1)) { |
| 162 | pr_warning("%s: %d triggered", __func__, |
| 163 | i + gic->irq_offset); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | static void gic_resume_one(struct gic_chip_data *gic) |
| 168 | { |
| 169 | unsigned int i; |
| 170 | void __iomem *base = gic->dist_base; |
| 171 | |
| 172 | gic_show_resume_irq(gic); |
| 173 | for (i = 0; i * 32 < gic->max_irq; i++) { |
| 174 | /* disable all of them */ |
| 175 | writel_relaxed(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4); |
| 176 | /* enable the enabled set */ |
| 177 | writel_relaxed(gic->enabled_irqs[i], |
| 178 | base + GIC_DIST_ENABLE_SET + i * 4); |
| 179 | } |
| 180 | mb(); |
| 181 | } |
| 182 | |
| 183 | static void gic_resume(void) |
| 184 | { |
| 185 | int i; |
| 186 | for (i = 0; i < MAX_GIC_NR; i++) |
| 187 | gic_resume_one(&gic_data[i]); |
| 188 | } |
| 189 | |
| 190 | static struct syscore_ops gic_syscore_ops = { |
| 191 | .suspend = gic_suspend, |
| 192 | .resume = gic_resume, |
| 193 | }; |
| 194 | |
| 195 | static int __init gic_init_sys(void) |
| 196 | { |
| 197 | register_syscore_ops(&gic_syscore_ops); |
| 198 | return 0; |
| 199 | } |
| 200 | arch_initcall(gic_init_sys); |
| 201 | |
| 202 | #endif |
| 203 | |
Will Deacon | 1a01753 | 2011-02-09 12:01:12 +0000 | [diff] [blame] | 204 | static void gic_eoi_irq(struct irq_data *d) |
| 205 | { |
| 206 | if (gic_arch_extn.irq_eoi) { |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 207 | raw_spin_lock(&irq_controller_lock); |
Will Deacon | 1a01753 | 2011-02-09 12:01:12 +0000 | [diff] [blame] | 208 | gic_arch_extn.irq_eoi(d); |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 209 | raw_spin_unlock(&irq_controller_lock); |
Will Deacon | 1a01753 | 2011-02-09 12:01:12 +0000 | [diff] [blame] | 210 | } |
| 211 | |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 212 | writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI); |
Will Deacon | 1a01753 | 2011-02-09 12:01:12 +0000 | [diff] [blame] | 213 | } |
| 214 | |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 215 | static int gic_set_type(struct irq_data *d, unsigned int type) |
Rabin Vincent | 5c0c1f0 | 2010-05-28 04:37:38 +0100 | [diff] [blame] | 216 | { |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 217 | void __iomem *base = gic_dist_base(d); |
| 218 | unsigned int gicirq = gic_irq(d); |
Rabin Vincent | 5c0c1f0 | 2010-05-28 04:37:38 +0100 | [diff] [blame] | 219 | u32 enablemask = 1 << (gicirq % 32); |
| 220 | u32 enableoff = (gicirq / 32) * 4; |
| 221 | u32 confmask = 0x2 << ((gicirq % 16) * 2); |
| 222 | u32 confoff = (gicirq / 16) * 4; |
| 223 | bool enabled = false; |
| 224 | u32 val; |
| 225 | |
| 226 | /* Interrupt configuration for SGIs can't be changed */ |
| 227 | if (gicirq < 16) |
| 228 | return -EINVAL; |
| 229 | |
| 230 | if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING) |
| 231 | return -EINVAL; |
| 232 | |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 233 | raw_spin_lock(&irq_controller_lock); |
Rabin Vincent | 5c0c1f0 | 2010-05-28 04:37:38 +0100 | [diff] [blame] | 234 | |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 235 | if (gic_arch_extn.irq_set_type) |
| 236 | gic_arch_extn.irq_set_type(d, type); |
| 237 | |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 238 | val = readl_relaxed(base + GIC_DIST_CONFIG + confoff); |
Rabin Vincent | 5c0c1f0 | 2010-05-28 04:37:38 +0100 | [diff] [blame] | 239 | if (type == IRQ_TYPE_LEVEL_HIGH) |
| 240 | val &= ~confmask; |
| 241 | else if (type == IRQ_TYPE_EDGE_RISING) |
| 242 | val |= confmask; |
| 243 | |
| 244 | /* |
| 245 | * As recommended by the spec, disable the interrupt before changing |
| 246 | * the configuration |
| 247 | */ |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 248 | if (readl_relaxed(base + GIC_DIST_ENABLE_SET + enableoff) & enablemask) { |
| 249 | writel_relaxed(enablemask, base + GIC_DIST_ENABLE_CLEAR + enableoff); |
Rabin Vincent | 5c0c1f0 | 2010-05-28 04:37:38 +0100 | [diff] [blame] | 250 | enabled = true; |
| 251 | } |
| 252 | |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 253 | writel_relaxed(val, base + GIC_DIST_CONFIG + confoff); |
Rabin Vincent | 5c0c1f0 | 2010-05-28 04:37:38 +0100 | [diff] [blame] | 254 | |
| 255 | if (enabled) |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 256 | writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff); |
Rabin Vincent | 5c0c1f0 | 2010-05-28 04:37:38 +0100 | [diff] [blame] | 257 | |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 258 | raw_spin_unlock(&irq_controller_lock); |
Rabin Vincent | 5c0c1f0 | 2010-05-28 04:37:38 +0100 | [diff] [blame] | 259 | |
| 260 | return 0; |
| 261 | } |
| 262 | |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 263 | static int gic_retrigger(struct irq_data *d) |
| 264 | { |
| 265 | if (gic_arch_extn.irq_retrigger) |
| 266 | return gic_arch_extn.irq_retrigger(d); |
| 267 | |
Abhijeet Dharmapurikar | 9d44ea0 | 2011-10-30 16:47:19 -0700 | [diff] [blame] | 268 | /* the retrigger expects 0 for failure */ |
| 269 | return 0; |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 270 | } |
| 271 | |
Catalin Marinas | a06f546 | 2005-09-30 16:07:05 +0100 | [diff] [blame] | 272 | #ifdef CONFIG_SMP |
Russell King | c191789 | 2011-01-23 12:12:01 +0000 | [diff] [blame] | 273 | static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, |
| 274 | bool force) |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 275 | { |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 276 | void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3); |
| 277 | unsigned int shift = (d->irq % 4) * 8; |
Russell King | f3c52e2 | 2011-07-21 15:00:57 +0100 | [diff] [blame] | 278 | unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask); |
Russell King | c191789 | 2011-01-23 12:12:01 +0000 | [diff] [blame] | 279 | u32 val, mask, bit; |
| 280 | |
Russell King | f3c52e2 | 2011-07-21 15:00:57 +0100 | [diff] [blame] | 281 | if (cpu >= 8 || cpu >= nr_cpu_ids) |
Russell King | c191789 | 2011-01-23 12:12:01 +0000 | [diff] [blame] | 282 | return -EINVAL; |
| 283 | |
| 284 | mask = 0xff << shift; |
| 285 | bit = 1 << (cpu + shift); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 286 | |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 287 | raw_spin_lock(&irq_controller_lock); |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 288 | val = readl_relaxed(reg) & ~mask; |
| 289 | writel_relaxed(val | bit, reg); |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 290 | raw_spin_unlock(&irq_controller_lock); |
Yinghai Lu | d5dedd4 | 2009-04-27 17:59:21 -0700 | [diff] [blame] | 291 | |
Russell King | f3c52e2 | 2011-07-21 15:00:57 +0100 | [diff] [blame] | 292 | return IRQ_SET_MASK_OK; |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 293 | } |
Catalin Marinas | a06f546 | 2005-09-30 16:07:05 +0100 | [diff] [blame] | 294 | #endif |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 295 | |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 296 | #ifdef CONFIG_PM |
| 297 | static int gic_set_wake(struct irq_data *d, unsigned int on) |
| 298 | { |
| 299 | int ret = -ENXIO; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 300 | unsigned int reg_offset, bit_offset; |
| 301 | unsigned int gicirq = gic_irq(d); |
| 302 | struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d); |
| 303 | |
| 304 | /* per-cpu interrupts cannot be wakeup interrupts */ |
| 305 | WARN_ON(gicirq < 32); |
| 306 | |
| 307 | reg_offset = gicirq / 32; |
| 308 | bit_offset = gicirq % 32; |
| 309 | |
| 310 | if (on) |
| 311 | gic_data->wakeup_irqs[reg_offset] |= 1 << bit_offset; |
| 312 | else |
| 313 | gic_data->wakeup_irqs[reg_offset] &= ~(1 << bit_offset); |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 314 | |
| 315 | if (gic_arch_extn.irq_set_wake) |
| 316 | ret = gic_arch_extn.irq_set_wake(d, on); |
| 317 | |
| 318 | return ret; |
| 319 | } |
| 320 | |
| 321 | #else |
Rohit Vaswani | 550aa1a | 2011-10-06 21:15:37 -0700 | [diff] [blame] | 322 | static int gic_set_wake(struct irq_data *d, unsigned int on) |
| 323 | { |
| 324 | return 0; |
| 325 | } |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 326 | #endif |
| 327 | |
Russell King | 0f347bb | 2007-05-17 10:11:34 +0100 | [diff] [blame] | 328 | static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 329 | { |
Thomas Gleixner | 6845664a | 2011-03-24 13:25:22 +0100 | [diff] [blame] | 330 | struct gic_chip_data *chip_data = irq_get_handler_data(irq); |
| 331 | struct irq_chip *chip = irq_get_chip(irq); |
Russell King | 0f347bb | 2007-05-17 10:11:34 +0100 | [diff] [blame] | 332 | unsigned int cascade_irq, gic_irq; |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 333 | unsigned long status; |
| 334 | |
Will Deacon | 1a01753 | 2011-02-09 12:01:12 +0000 | [diff] [blame] | 335 | chained_irq_enter(chip, desc); |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 336 | |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 337 | raw_spin_lock(&irq_controller_lock); |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 338 | status = readl_relaxed(chip_data->cpu_base + GIC_CPU_INTACK); |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 339 | raw_spin_unlock(&irq_controller_lock); |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 340 | |
Russell King | 0f347bb | 2007-05-17 10:11:34 +0100 | [diff] [blame] | 341 | gic_irq = (status & 0x3ff); |
| 342 | if (gic_irq == 1023) |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 343 | goto out; |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 344 | |
Russell King | 0f347bb | 2007-05-17 10:11:34 +0100 | [diff] [blame] | 345 | cascade_irq = gic_irq + chip_data->irq_offset; |
| 346 | if (unlikely(gic_irq < 32 || gic_irq > 1020 || cascade_irq >= NR_IRQS)) |
| 347 | do_bad_IRQ(cascade_irq, desc); |
| 348 | else |
| 349 | generic_handle_irq(cascade_irq); |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 350 | |
| 351 | out: |
Will Deacon | 1a01753 | 2011-02-09 12:01:12 +0000 | [diff] [blame] | 352 | chained_irq_exit(chip, desc); |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 353 | } |
| 354 | |
David Brownell | 38c677c | 2006-08-01 22:26:25 +0100 | [diff] [blame] | 355 | static struct irq_chip gic_chip = { |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 356 | .name = "GIC", |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 357 | .irq_mask = gic_mask_irq, |
| 358 | .irq_unmask = gic_unmask_irq, |
Will Deacon | 1a01753 | 2011-02-09 12:01:12 +0000 | [diff] [blame] | 359 | .irq_eoi = gic_eoi_irq, |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 360 | .irq_set_type = gic_set_type, |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 361 | .irq_retrigger = gic_retrigger, |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 362 | #ifdef CONFIG_SMP |
Russell King | c191789 | 2011-01-23 12:12:01 +0000 | [diff] [blame] | 363 | .irq_set_affinity = gic_set_affinity, |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 364 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 365 | .irq_disable = gic_disable_irq, |
Santosh Shilimkar | d7ed36a | 2011-03-02 08:03:22 +0100 | [diff] [blame] | 366 | .irq_set_wake = gic_set_wake, |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 367 | }; |
| 368 | |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 369 | void __init gic_cascade_irq(unsigned int gic_nr, unsigned int irq) |
| 370 | { |
| 371 | if (gic_nr >= MAX_GIC_NR) |
| 372 | BUG(); |
Thomas Gleixner | 6845664a | 2011-03-24 13:25:22 +0100 | [diff] [blame] | 373 | if (irq_set_handler_data(irq, &gic_data[gic_nr]) != 0) |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 374 | BUG(); |
Thomas Gleixner | 6845664a | 2011-03-24 13:25:22 +0100 | [diff] [blame] | 375 | irq_set_chained_handler(irq, gic_handle_cascade_irq); |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 376 | } |
| 377 | |
Russell King | bef8f9e | 2010-12-04 16:50:58 +0000 | [diff] [blame] | 378 | static void __init gic_dist_init(struct gic_chip_data *gic, |
Russell King | b580b89 | 2010-12-04 15:55:14 +0000 | [diff] [blame] | 379 | unsigned int irq_start) |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 380 | { |
Pawel Moll | e6afec9 | 2010-11-26 13:45:43 +0100 | [diff] [blame] | 381 | unsigned int gic_irqs, irq_limit, i; |
Russell King | bef8f9e | 2010-12-04 16:50:58 +0000 | [diff] [blame] | 382 | void __iomem *base = gic->dist_base; |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 383 | u32 cpumask = 1 << smp_processor_id(); |
| 384 | |
| 385 | cpumask |= cpumask << 8; |
| 386 | cpumask |= cpumask << 16; |
| 387 | |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 388 | writel_relaxed(0, base + GIC_DIST_CTRL); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 389 | |
| 390 | /* |
| 391 | * Find out how many interrupts are supported. |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 392 | * The GIC only supports up to 1020 interrupt sources. |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 393 | */ |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 394 | gic_irqs = readl_relaxed(base + GIC_DIST_CTR) & 0x1f; |
Pawel Moll | e6afec9 | 2010-11-26 13:45:43 +0100 | [diff] [blame] | 395 | gic_irqs = (gic_irqs + 1) * 32; |
| 396 | if (gic_irqs > 1020) |
| 397 | gic_irqs = 1020; |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 398 | |
| 399 | /* |
| 400 | * Set all global interrupts to be level triggered, active low. |
| 401 | */ |
Pawel Moll | e6afec9 | 2010-11-26 13:45:43 +0100 | [diff] [blame] | 402 | for (i = 32; i < gic_irqs; i += 16) |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 403 | writel_relaxed(0, base + GIC_DIST_CONFIG + i * 4 / 16); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 404 | |
| 405 | /* |
| 406 | * Set all global interrupts to this CPU only. |
| 407 | */ |
Pawel Moll | e6afec9 | 2010-11-26 13:45:43 +0100 | [diff] [blame] | 408 | for (i = 32; i < gic_irqs; i += 4) |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 409 | writel_relaxed(cpumask, base + GIC_DIST_TARGET + i * 4 / 4); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 410 | |
| 411 | /* |
Russell King | 9395f6e | 2010-11-11 23:10:30 +0000 | [diff] [blame] | 412 | * Set priority on all global interrupts. |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 413 | */ |
Pawel Moll | e6afec9 | 2010-11-26 13:45:43 +0100 | [diff] [blame] | 414 | for (i = 32; i < gic_irqs; i += 4) |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 415 | writel_relaxed(0xa0a0a0a0, base + GIC_DIST_PRI + i * 4 / 4); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 416 | |
| 417 | /* |
Russell King | 9395f6e | 2010-11-11 23:10:30 +0000 | [diff] [blame] | 418 | * Disable all interrupts. Leave the PPI and SGIs alone |
| 419 | * as these enables are banked registers. |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 420 | */ |
Pawel Moll | e6afec9 | 2010-11-26 13:45:43 +0100 | [diff] [blame] | 421 | for (i = 32; i < gic_irqs; i += 32) |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 422 | writel_relaxed(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4 / 32); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 423 | |
| 424 | /* |
Pawel Moll | e6afec9 | 2010-11-26 13:45:43 +0100 | [diff] [blame] | 425 | * Limit number of interrupts registered to the platform maximum |
| 426 | */ |
Russell King | bef8f9e | 2010-12-04 16:50:58 +0000 | [diff] [blame] | 427 | irq_limit = gic->irq_offset + gic_irqs; |
Pawel Moll | e6afec9 | 2010-11-26 13:45:43 +0100 | [diff] [blame] | 428 | if (WARN_ON(irq_limit > NR_IRQS)) |
| 429 | irq_limit = NR_IRQS; |
| 430 | |
| 431 | /* |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 432 | * Setup the Linux IRQ subsystem. |
| 433 | */ |
Pawel Moll | e6afec9 | 2010-11-26 13:45:43 +0100 | [diff] [blame] | 434 | for (i = irq_start; i < irq_limit; i++) { |
Will Deacon | 1a01753 | 2011-02-09 12:01:12 +0000 | [diff] [blame] | 435 | irq_set_chip_and_handler(i, &gic_chip, handle_fasteoi_irq); |
Thomas Gleixner | 9323f261 | 2011-03-24 13:29:39 +0100 | [diff] [blame] | 436 | irq_set_chip_data(i, gic); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 437 | set_irq_flags(i, IRQF_VALID | IRQF_PROBE); |
| 438 | } |
| 439 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 440 | gic->max_irq = gic_irqs; |
| 441 | |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 442 | writel_relaxed(1, base + GIC_DIST_CTRL); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 443 | mb(); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 444 | } |
| 445 | |
Russell King | bef8f9e | 2010-12-04 16:50:58 +0000 | [diff] [blame] | 446 | static void __cpuinit gic_cpu_init(struct gic_chip_data *gic) |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 447 | { |
Russell King | bef8f9e | 2010-12-04 16:50:58 +0000 | [diff] [blame] | 448 | void __iomem *dist_base = gic->dist_base; |
| 449 | void __iomem *base = gic->cpu_base; |
Russell King | 9395f6e | 2010-11-11 23:10:30 +0000 | [diff] [blame] | 450 | int i; |
| 451 | |
Russell King | 9395f6e | 2010-11-11 23:10:30 +0000 | [diff] [blame] | 452 | /* |
| 453 | * Deal with the banked PPI and SGI interrupts - disable all |
| 454 | * PPI interrupts, ensure all SGI interrupts are enabled. |
| 455 | */ |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 456 | writel_relaxed(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR); |
| 457 | writel_relaxed(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET); |
Russell King | 9395f6e | 2010-11-11 23:10:30 +0000 | [diff] [blame] | 458 | |
| 459 | /* |
| 460 | * Set priority on PPI and SGI interrupts |
| 461 | */ |
| 462 | for (i = 0; i < 32; i += 4) |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 463 | writel_relaxed(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4); |
Russell King | 9395f6e | 2010-11-11 23:10:30 +0000 | [diff] [blame] | 464 | |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 465 | writel_relaxed(0xf0, base + GIC_CPU_PRIMASK); |
| 466 | writel_relaxed(1, base + GIC_CPU_CTRL); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 467 | mb(); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 468 | } |
| 469 | |
Russell King | b580b89 | 2010-12-04 15:55:14 +0000 | [diff] [blame] | 470 | void __init gic_init(unsigned int gic_nr, unsigned int irq_start, |
| 471 | void __iomem *dist_base, void __iomem *cpu_base) |
| 472 | { |
Russell King | bef8f9e | 2010-12-04 16:50:58 +0000 | [diff] [blame] | 473 | struct gic_chip_data *gic; |
| 474 | |
| 475 | BUG_ON(gic_nr >= MAX_GIC_NR); |
| 476 | |
| 477 | gic = &gic_data[gic_nr]; |
| 478 | gic->dist_base = dist_base; |
| 479 | gic->cpu_base = cpu_base; |
| 480 | gic->irq_offset = (irq_start - 1) & ~31; |
| 481 | |
Russell King | ff2e27a | 2010-12-04 16:13:29 +0000 | [diff] [blame] | 482 | if (gic_nr == 0) |
| 483 | gic_cpu_base_addr = cpu_base; |
Russell King | bef8f9e | 2010-12-04 16:50:58 +0000 | [diff] [blame] | 484 | |
| 485 | gic_dist_init(gic, irq_start); |
| 486 | gic_cpu_init(gic); |
Russell King | b580b89 | 2010-12-04 15:55:14 +0000 | [diff] [blame] | 487 | } |
| 488 | |
Russell King | 3848953 | 2010-12-04 16:01:03 +0000 | [diff] [blame] | 489 | void __cpuinit gic_secondary_init(unsigned int gic_nr) |
| 490 | { |
Russell King | bef8f9e | 2010-12-04 16:50:58 +0000 | [diff] [blame] | 491 | BUG_ON(gic_nr >= MAX_GIC_NR); |
| 492 | |
| 493 | gic_cpu_init(&gic_data[gic_nr]); |
Russell King | 3848953 | 2010-12-04 16:01:03 +0000 | [diff] [blame] | 494 | } |
| 495 | |
Russell King | ac61d14 | 2010-12-06 10:38:14 +0000 | [diff] [blame] | 496 | void __cpuinit gic_enable_ppi(unsigned int irq) |
| 497 | { |
| 498 | unsigned long flags; |
| 499 | |
| 500 | local_irq_save(flags); |
Thomas Gleixner | fdea77b | 2011-03-24 12:48:54 +0100 | [diff] [blame] | 501 | irq_set_status_flags(irq, IRQ_NOPROBE); |
Lennert Buytenhek | 7d1f428 | 2010-11-29 10:18:20 +0100 | [diff] [blame] | 502 | gic_unmask_irq(irq_get_irq_data(irq)); |
Russell King | ac61d14 | 2010-12-06 10:38:14 +0000 | [diff] [blame] | 503 | local_irq_restore(flags); |
| 504 | } |
| 505 | |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 506 | #ifdef CONFIG_SMP |
Russell King | 8266810 | 2009-05-17 16:20:18 +0100 | [diff] [blame] | 507 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 508 | { |
Russell King | 8266810 | 2009-05-17 16:20:18 +0100 | [diff] [blame] | 509 | unsigned long map = *cpus_addr(*mask); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 510 | |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 511 | /* |
| 512 | * Ensure that stores to Normal memory are visible to the |
| 513 | * other CPUs before issuing the IPI. |
| 514 | */ |
| 515 | dsb(); |
| 516 | |
Catalin Marinas | b3a1bde | 2007-02-14 19:14:56 +0100 | [diff] [blame] | 517 | /* this always happens on GIC0 */ |
Santosh Shilimkar | 6ac77e4 | 2011-03-28 19:27:46 +0530 | [diff] [blame] | 518 | writel_relaxed(map << 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 519 | mb(); |
Russell King | f27ecac | 2005-08-18 21:31:00 +0100 | [diff] [blame] | 520 | } |
| 521 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 522 | |
| 523 | /* before calling this function the interrupts should be disabled |
| 524 | * and the irq must be disabled at gic to avoid spurious interrupts */ |
| 525 | bool gic_is_spi_pending(unsigned int irq) |
| 526 | { |
| 527 | struct irq_data *d = irq_get_irq_data(irq); |
| 528 | struct gic_chip_data *gic_data = &gic_data[0]; |
| 529 | u32 mask, val; |
| 530 | |
| 531 | WARN_ON(!irqs_disabled()); |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 532 | raw_spin_lock(&irq_controller_lock); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 533 | mask = 1 << (gic_irq(d) % 32); |
| 534 | val = readl(gic_dist_base(d) + |
| 535 | GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4); |
| 536 | /* warn if the interrupt is enabled */ |
| 537 | WARN_ON(val & mask); |
| 538 | val = readl(gic_dist_base(d) + |
| 539 | GIC_DIST_PENDING_SET + (gic_irq(d) / 32) * 4); |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 540 | raw_spin_unlock(&irq_controller_lock); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 541 | return (bool) (val & mask); |
| 542 | } |
| 543 | |
| 544 | /* before calling this function the interrupts should be disabled |
| 545 | * and the irq must be disabled at gic to avoid spurious interrupts */ |
| 546 | void gic_clear_spi_pending(unsigned int irq) |
| 547 | { |
| 548 | struct gic_chip_data *gic_data = &gic_data[0]; |
| 549 | struct irq_data *d = irq_get_irq_data(irq); |
| 550 | |
| 551 | u32 mask, val; |
| 552 | WARN_ON(!irqs_disabled()); |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 553 | raw_spin_lock(&irq_controller_lock); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 554 | mask = 1 << (gic_irq(d) % 32); |
| 555 | val = readl(gic_dist_base(d) + |
| 556 | GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4); |
| 557 | /* warn if the interrupt is enabled */ |
| 558 | WARN_ON(val & mask); |
| 559 | writel(mask, gic_dist_base(d) + |
| 560 | GIC_DIST_PENDING_CLEAR + (gic_irq(d) / 32) * 4); |
Thomas Gleixner | 450ea48 | 2009-07-03 08:44:46 -0500 | [diff] [blame^] | 561 | raw_spin_unlock(&irq_controller_lock); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 562 | } |