Skip to content

Commit 1dcc73d

Browse files
Marc ZyngierKAGA-KOKO
authored andcommitted
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>
1 parent 10a50f1 commit 1dcc73d

File tree

2 files changed

+1
-72
lines changed

2 files changed

+1
-72
lines changed

drivers/irqchip/irq-gic.c

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,6 @@ static DEFINE_RAW_SPINLOCK(irq_controller_lock);
8080
#define NR_GIC_CPU_IF 8
8181
static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly;
8282

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-
9683
#ifndef MAX_GIC_NR
9784
#define MAX_GIC_NR 1
9885
#endif
@@ -165,34 +152,16 @@ static int gic_peek_irq(struct irq_data *d, u32 offset)
165152

166153
static void gic_mask_irq(struct irq_data *d)
167154
{
168-
unsigned long flags;
169-
170-
raw_spin_lock_irqsave(&irq_controller_lock, flags);
171155
gic_poke_irq(d, GIC_DIST_ENABLE_CLEAR);
172-
if (gic_arch_extn.irq_mask)
173-
gic_arch_extn.irq_mask(d);
174-
raw_spin_unlock_irqrestore(&irq_controller_lock, flags);
175156
}
176157

177158
static void gic_unmask_irq(struct irq_data *d)
178159
{
179-
unsigned long flags;
180-
181-
raw_spin_lock_irqsave(&irq_controller_lock, flags);
182-
if (gic_arch_extn.irq_unmask)
183-
gic_arch_extn.irq_unmask(d);
184160
gic_poke_irq(d, GIC_DIST_ENABLE_SET);
185-
raw_spin_unlock_irqrestore(&irq_controller_lock, flags);
186161
}
187162

188163
static void gic_eoi_irq(struct irq_data *d)
189164
{
190-
if (gic_arch_extn.irq_eoi) {
191-
raw_spin_lock(&irq_controller_lock);
192-
gic_arch_extn.irq_eoi(d);
193-
raw_spin_unlock(&irq_controller_lock);
194-
}
195-
196165
writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
197166
}
198167

@@ -249,8 +218,6 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
249218
{
250219
void __iomem *base = gic_dist_base(d);
251220
unsigned int gicirq = gic_irq(d);
252-
unsigned long flags;
253-
int ret;
254221

255222
/* Interrupt configuration for SGIs can't be changed */
256223
if (gicirq < 16)
@@ -261,25 +228,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
261228
type != IRQ_TYPE_EDGE_RISING)
262229
return -EINVAL;
263230

264-
raw_spin_lock_irqsave(&irq_controller_lock, flags);
265-
266-
if (gic_arch_extn.irq_set_type)
267-
gic_arch_extn.irq_set_type(d, type);
268-
269-
ret = gic_configure_irq(gicirq, type, base, NULL);
270-
271-
raw_spin_unlock_irqrestore(&irq_controller_lock, flags);
272-
273-
return ret;
274-
}
275-
276-
static int gic_retrigger(struct irq_data *d)
277-
{
278-
if (gic_arch_extn.irq_retrigger)
279-
return gic_arch_extn.irq_retrigger(d);
280-
281-
/* the genirq layer expects 0 if we can't retrigger in hardware */
282-
return 0;
231+
return gic_configure_irq(gicirq, type, base, NULL);
283232
}
284233

285234
#ifdef CONFIG_SMP
@@ -310,21 +259,6 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
310259
}
311260
#endif
312261

313-
#ifdef CONFIG_PM
314-
static int gic_set_wake(struct irq_data *d, unsigned int on)
315-
{
316-
int ret = -ENXIO;
317-
318-
if (gic_arch_extn.irq_set_wake)
319-
ret = gic_arch_extn.irq_set_wake(d, on);
320-
321-
return ret;
322-
}
323-
324-
#else
325-
#define gic_set_wake NULL
326-
#endif
327-
328262
static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
329263
{
330264
u32 irqstat, irqnr;
@@ -383,11 +317,9 @@ static struct irq_chip gic_chip = {
383317
.irq_unmask = gic_unmask_irq,
384318
.irq_eoi = gic_eoi_irq,
385319
.irq_set_type = gic_set_type,
386-
.irq_retrigger = gic_retrigger,
387320
#ifdef CONFIG_SMP
388321
.irq_set_affinity = gic_set_affinity,
389322
#endif
390-
.irq_set_wake = gic_set_wake,
391323
.irq_get_irqchip_state = gic_irq_get_irqchip_state,
392324
.irq_set_irqchip_state = gic_irq_set_irqchip_state,
393325
};
@@ -1053,7 +985,6 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
1053985
set_handle_irq(gic_handle_irq);
1054986
}
1055987

1056-
gic_chip.flags |= gic_arch_extn.flags;
1057988
gic_dist_init(gic);
1058989
gic_cpu_init(gic);
1059990
gic_pm_init(gic);

include/linux/irqchip/arm-gic.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@
9595

9696
struct device_node;
9797

98-
extern struct irq_chip gic_arch_extn;
99-
10098
void gic_set_irqchip_flags(unsigned long flags);
10199
void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *,
102100
u32 offset, struct device_node *);

0 commit comments

Comments
 (0)