Skip to content

Commit 9d88f22

Browse files
committed
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Thomas Gleixner: "Two patches from the irq departement: - a simple fix to make dummy_irq_chip usable for wakeup scenarios - removal of the gic arch_extn hackery. Now that all users are converted we really want to get rid of the interface so people wont come up with new use cases" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip: gic: Drop support for gic_arch_extn genirq: Set IRQCHIP_SKIP_SET_WAKE flag for dummy_irq_chip
2 parents 95f3b1f + 1dcc73d commit 9d88f22

File tree

3 files changed

+2
-72
lines changed

3 files changed

+2
-72
lines changed

drivers/irqchip/irq-gic.c

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

85-
/*
86-
* Supported arch specific GIC irq extension.
87-
* Default make them NULL.
88-
*/
89-
struct irq_chip gic_arch_extn = {
90-
.irq_eoi = NULL,
91-
.irq_mask = NULL,
92-
.irq_unmask = NULL,
93-
.irq_retrigger = NULL,
94-
.irq_set_type = NULL,
95-
.irq_set_wake = NULL,
96-
};
97-
9885
#ifndef MAX_GIC_NR
9986
#define MAX_GIC_NR 1
10087
#endif
@@ -167,34 +154,16 @@ static int gic_peek_irq(struct irq_data *d, u32 offset)
167154

168155
static void gic_mask_irq(struct irq_data *d)
169156
{
170-
unsigned long flags;
171-
172-
raw_spin_lock_irqsave(&irq_controller_lock, flags);
173157
gic_poke_irq(d, GIC_DIST_ENABLE_CLEAR);
174-
if (gic_arch_extn.irq_mask)
175-
gic_arch_extn.irq_mask(d);
176-
raw_spin_unlock_irqrestore(&irq_controller_lock, flags);
177158
}
178159

179160
static void gic_unmask_irq(struct irq_data *d)
180161
{
181-
unsigned long flags;
182-
183-
raw_spin_lock_irqsave(&irq_controller_lock, flags);
184-
if (gic_arch_extn.irq_unmask)
185-
gic_arch_extn.irq_unmask(d);
186162
gic_poke_irq(d, GIC_DIST_ENABLE_SET);
187-
raw_spin_unlock_irqrestore(&irq_controller_lock, flags);
188163
}
189164

190165
static void gic_eoi_irq(struct irq_data *d)
191166
{
192-
if (gic_arch_extn.irq_eoi) {
193-
raw_spin_lock(&irq_controller_lock);
194-
gic_arch_extn.irq_eoi(d);
195-
raw_spin_unlock(&irq_controller_lock);
196-
}
197-
198167
writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
199168
}
200169

@@ -251,8 +220,6 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
251220
{
252221
void __iomem *base = gic_dist_base(d);
253222
unsigned int gicirq = gic_irq(d);
254-
unsigned long flags;
255-
int ret;
256223

257224
/* Interrupt configuration for SGIs can't be changed */
258225
if (gicirq < 16)
@@ -263,25 +230,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type)
263230
type != IRQ_TYPE_EDGE_RISING)
264231
return -EINVAL;
265232

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

287236
#ifdef CONFIG_SMP
@@ -312,21 +261,6 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
312261
}
313262
#endif
314263

315-
#ifdef CONFIG_PM
316-
static int gic_set_wake(struct irq_data *d, unsigned int on)
317-
{
318-
int ret = -ENXIO;
319-
320-
if (gic_arch_extn.irq_set_wake)
321-
ret = gic_arch_extn.irq_set_wake(d, on);
322-
323-
return ret;
324-
}
325-
326-
#else
327-
#define gic_set_wake NULL
328-
#endif
329-
330264
static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
331265
{
332266
u32 irqstat, irqnr;
@@ -385,11 +319,9 @@ static struct irq_chip gic_chip = {
385319
.irq_unmask = gic_unmask_irq,
386320
.irq_eoi = gic_eoi_irq,
387321
.irq_set_type = gic_set_type,
388-
.irq_retrigger = gic_retrigger,
389322
#ifdef CONFIG_SMP
390323
.irq_set_affinity = gic_set_affinity,
391324
#endif
392-
.irq_set_wake = gic_set_wake,
393325
.irq_get_irqchip_state = gic_irq_get_irqchip_state,
394326
.irq_set_irqchip_state = gic_irq_set_irqchip_state,
395327
};
@@ -1055,7 +987,6 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
1055987
set_handle_irq(gic_handle_irq);
1056988
}
1057989

1058-
gic_chip.flags |= gic_arch_extn.flags;
1059990
gic_dist_init(gic);
1060991
gic_cpu_init(gic);
1061992
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 *);

kernel/irq/dummychip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,6 @@ struct irq_chip dummy_irq_chip = {
5757
.irq_ack = noop,
5858
.irq_mask = noop,
5959
.irq_unmask = noop,
60+
.flags = IRQCHIP_SKIP_SET_WAKE,
6061
};
6162
EXPORT_SYMBOL_GPL(dummy_irq_chip);

0 commit comments

Comments
 (0)