Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

irqchip: gic: Drop support for gic_arch_extn

Now that the users of gic_arch_extn have been fixed, drop the
"feature" for good. This leads to the removal of some now useless
locking.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by

Marc Zyngier and committed by
Thomas Gleixner
1dcc73d7 10a50f1a

+1 -72
+1 -70
drivers/irqchip/irq-gic.c
··· 80 80 #define NR_GIC_CPU_IF 8 81 81 static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly; 82 82 83 - /* 84 - * Supported arch specific GIC irq extension. 85 - * Default make them NULL. 86 - */ 87 - struct irq_chip gic_arch_extn = { 88 - .irq_eoi = NULL, 89 - .irq_mask = NULL, 90 - .irq_unmask = NULL, 91 - .irq_retrigger = NULL, 92 - .irq_set_type = NULL, 93 - .irq_set_wake = NULL, 94 - }; 95 - 96 83 #ifndef MAX_GIC_NR 97 84 #define MAX_GIC_NR 1 98 85 #endif ··· 152 165 153 166 static void gic_mask_irq(struct irq_data *d) 154 167 { 155 - unsigned long flags; 156 - 157 - raw_spin_lock_irqsave(&irq_controller_lock, flags); 158 168 gic_poke_irq(d, GIC_DIST_ENABLE_CLEAR); 159 - if (gic_arch_extn.irq_mask) 160 - gic_arch_extn.irq_mask(d); 161 - raw_spin_unlock_irqrestore(&irq_controller_lock, flags); 162 169 } 163 170 164 171 static void gic_unmask_irq(struct irq_data *d) 165 172 { 166 - unsigned long flags; 167 - 168 - raw_spin_lock_irqsave(&irq_controller_lock, flags); 169 - if (gic_arch_extn.irq_unmask) 170 - gic_arch_extn.irq_unmask(d); 171 173 gic_poke_irq(d, GIC_DIST_ENABLE_SET); 172 - raw_spin_unlock_irqrestore(&irq_controller_lock, flags); 173 174 } 174 175 175 176 static void gic_eoi_irq(struct irq_data *d) 176 177 { 177 - if (gic_arch_extn.irq_eoi) { 178 - raw_spin_lock(&irq_controller_lock); 179 - gic_arch_extn.irq_eoi(d); 180 - raw_spin_unlock(&irq_controller_lock); 181 - } 182 - 183 178 writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI); 184 179 } 185 180 ··· 218 249 { 219 250 void __iomem *base = gic_dist_base(d); 220 251 unsigned int gicirq = gic_irq(d); 221 - unsigned long flags; 222 - int ret; 223 252 224 253 /* Interrupt configuration for SGIs can't be changed */ 225 254 if (gicirq < 16) ··· 228 261 type != IRQ_TYPE_EDGE_RISING) 229 262 return -EINVAL; 230 263 231 - raw_spin_lock_irqsave(&irq_controller_lock, flags); 232 - 233 - if (gic_arch_extn.irq_set_type) 234 - gic_arch_extn.irq_set_type(d, type); 235 - 236 - ret = gic_configure_irq(gicirq, type, base, NULL); 237 - 238 - raw_spin_unlock_irqrestore(&irq_controller_lock, flags); 239 - 240 - return ret; 241 - } 242 - 243 - static int gic_retrigger(struct irq_data *d) 244 - { 245 - if (gic_arch_extn.irq_retrigger) 246 - return gic_arch_extn.irq_retrigger(d); 247 - 248 - /* the genirq layer expects 0 if we can't retrigger in hardware */ 249 - return 0; 264 + return gic_configure_irq(gicirq, type, base, NULL); 250 265 } 251 266 252 267 #ifdef CONFIG_SMP ··· 257 308 258 309 return IRQ_SET_MASK_OK; 259 310 } 260 - #endif 261 - 262 - #ifdef CONFIG_PM 263 - static int gic_set_wake(struct irq_data *d, unsigned int on) 264 - { 265 - int ret = -ENXIO; 266 - 267 - if (gic_arch_extn.irq_set_wake) 268 - ret = gic_arch_extn.irq_set_wake(d, on); 269 - 270 - return ret; 271 - } 272 - 273 - #else 274 - #define gic_set_wake NULL 275 311 #endif 276 312 277 313 static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs) ··· 317 383 .irq_unmask = gic_unmask_irq, 318 384 .irq_eoi = gic_eoi_irq, 319 385 .irq_set_type = gic_set_type, 320 - .irq_retrigger = gic_retrigger, 321 386 #ifdef CONFIG_SMP 322 387 .irq_set_affinity = gic_set_affinity, 323 388 #endif 324 - .irq_set_wake = gic_set_wake, 325 389 .irq_get_irqchip_state = gic_irq_get_irqchip_state, 326 390 .irq_set_irqchip_state = gic_irq_set_irqchip_state, 327 391 }; ··· 985 1053 set_handle_irq(gic_handle_irq); 986 1054 } 987 1055 988 - gic_chip.flags |= gic_arch_extn.flags; 989 1056 gic_dist_init(gic); 990 1057 gic_cpu_init(gic); 991 1058 gic_pm_init(gic);
-2
include/linux/irqchip/arm-gic.h
··· 95 95 96 96 struct device_node; 97 97 98 - extern struct irq_chip gic_arch_extn; 99 - 100 98 void gic_set_irqchip_flags(unsigned long flags); 101 99 void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *, 102 100 u32 offset, struct device_node *);