Skip to content

Commit 702cb0a

Browse files
committed
genirq/irqdomain: Rename early argument of irq_domain_activate_irq()
The 'early' argument of irq_domain_activate_irq() is actually used to denote reservation mode. To avoid confusion, rename it before abuse happens. No functional change. Fixes: 7249164 ("genirq/irqdomain: Update irq_domain_ops.activate() signature") Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Alexandru Chirvasitu <achirvasub@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Dou Liyang <douly.fnst@cn.fujitsu.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Mikael Pettersson <mikpelinux@gmail.com> Cc: Josh Poulson <jopoulso@microsoft.com> Cc: Mihai Costache <v-micos@microsoft.com> Cc: Stephen Hemminger <sthemmin@microsoft.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: linux-pci@vger.kernel.org Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Dexuan Cui <decui@microsoft.com> Cc: Simon Xiao <sixiao@microsoft.com> Cc: Saeed Mahameed <saeedm@mellanox.com> Cc: Jork Loeser <Jork.Loeser@microsoft.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: devel@linuxdriverproject.org Cc: KY Srinivasan <kys@microsoft.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Sakari Ailus <sakari.ailus@intel.com>, Cc: linux-media@vger.kernel.org
1 parent 945f50a commit 702cb0a

File tree

13 files changed

+29
-28
lines changed

13 files changed

+29
-28
lines changed

arch/x86/include/asm/irqdomain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ extern int mp_irqdomain_alloc(struct irq_domain *domain, unsigned int virq,
4444
extern void mp_irqdomain_free(struct irq_domain *domain, unsigned int virq,
4545
unsigned int nr_irqs);
4646
extern int mp_irqdomain_activate(struct irq_domain *domain,
47-
struct irq_data *irq_data, bool early);
47+
struct irq_data *irq_data, bool reserve);
4848
extern void mp_irqdomain_deactivate(struct irq_domain *domain,
4949
struct irq_data *irq_data);
5050
extern int mp_irqdomain_ioapic_idx(struct irq_domain *domain);

arch/x86/include/asm/trace/irq_vectors.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,34 +283,34 @@ TRACE_EVENT(vector_alloc_managed,
283283
DECLARE_EVENT_CLASS(vector_activate,
284284

285285
TP_PROTO(unsigned int irq, bool is_managed, bool can_reserve,
286-
bool early),
286+
bool reserve),
287287

288-
TP_ARGS(irq, is_managed, can_reserve, early),
288+
TP_ARGS(irq, is_managed, can_reserve, reserve),
289289

290290
TP_STRUCT__entry(
291291
__field( unsigned int, irq )
292292
__field( bool, is_managed )
293293
__field( bool, can_reserve )
294-
__field( bool, early )
294+
__field( bool, reserve )
295295
),
296296

297297
TP_fast_assign(
298298
__entry->irq = irq;
299299
__entry->is_managed = is_managed;
300300
__entry->can_reserve = can_reserve;
301-
__entry->early = early;
301+
__entry->reserve = reserve;
302302
),
303303

304-
TP_printk("irq=%u is_managed=%d can_reserve=%d early=%d",
304+
TP_printk("irq=%u is_managed=%d can_reserve=%d reserve=%d",
305305
__entry->irq, __entry->is_managed, __entry->can_reserve,
306-
__entry->early)
306+
__entry->reserve)
307307
);
308308

309309
#define DEFINE_IRQ_VECTOR_ACTIVATE_EVENT(name) \
310310
DEFINE_EVENT_FN(vector_activate, name, \
311311
TP_PROTO(unsigned int irq, bool is_managed, \
312-
bool can_reserve, bool early), \
313-
TP_ARGS(irq, is_managed, can_reserve, early), NULL, NULL); \
312+
bool can_reserve, bool reserve), \
313+
TP_ARGS(irq, is_managed, can_reserve, reserve), NULL, NULL); \
314314

315315
DEFINE_IRQ_VECTOR_ACTIVATE_EVENT(vector_activate);
316316
DEFINE_IRQ_VECTOR_ACTIVATE_EVENT(vector_deactivate);

arch/x86/kernel/apic/io_apic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2988,7 +2988,7 @@ void mp_irqdomain_free(struct irq_domain *domain, unsigned int virq,
29882988
}
29892989

29902990
int mp_irqdomain_activate(struct irq_domain *domain,
2991-
struct irq_data *irq_data, bool early)
2991+
struct irq_data *irq_data, bool reserve)
29922992
{
29932993
unsigned long flags;
29942994

arch/x86/kernel/apic/vector.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,21 +399,21 @@ static int activate_managed(struct irq_data *irqd)
399399
}
400400

401401
static int x86_vector_activate(struct irq_domain *dom, struct irq_data *irqd,
402-
bool early)
402+
bool reserve)
403403
{
404404
struct apic_chip_data *apicd = apic_chip_data(irqd);
405405
unsigned long flags;
406406
int ret = 0;
407407

408408
trace_vector_activate(irqd->irq, apicd->is_managed,
409-
apicd->can_reserve, early);
409+
apicd->can_reserve, reserve);
410410

411411
/* Nothing to do for fixed assigned vectors */
412412
if (!apicd->can_reserve && !apicd->is_managed)
413413
return 0;
414414

415415
raw_spin_lock_irqsave(&vector_lock, flags);
416-
if (early || irqd_is_managed_and_shutdown(irqd))
416+
if (reserve || irqd_is_managed_and_shutdown(irqd))
417417
vector_assign_managed_shutdown(irqd);
418418
else if (apicd->is_managed)
419419
ret = activate_managed(irqd);

arch/x86/platform/uv/uv_irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static void uv_domain_free(struct irq_domain *domain, unsigned int virq,
128128
* on the specified blade to allow the sending of MSIs to the specified CPU.
129129
*/
130130
static int uv_domain_activate(struct irq_domain *domain,
131-
struct irq_data *irq_data, bool early)
131+
struct irq_data *irq_data, bool reserve)
132132
{
133133
uv_program_mmr(irqd_cfg(irq_data), irq_data->chip_data);
134134
return 0;

drivers/gpio/gpio-xgene-sb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static int xgene_gpio_sb_to_irq(struct gpio_chip *gc, u32 gpio)
139139

140140
static int xgene_gpio_sb_domain_activate(struct irq_domain *d,
141141
struct irq_data *irq_data,
142-
bool early)
142+
bool reserve)
143143
{
144144
struct xgene_gpio_sb *priv = d->host_data;
145145
u32 gpio = HWIRQ_TO_GPIO(priv, irq_data->hwirq);

drivers/iommu/amd_iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4184,7 +4184,7 @@ static void amd_ir_update_irte(struct irq_data *irqd, struct amd_iommu *iommu,
41844184
struct irq_cfg *cfg);
41854185

41864186
static int irq_remapping_activate(struct irq_domain *domain,
4187-
struct irq_data *irq_data, bool early)
4187+
struct irq_data *irq_data, bool reserve)
41884188
{
41894189
struct amd_ir_data *data = irq_data->chip_data;
41904190
struct irq_2_irte *irte_info = &data->irq_2_irte;

drivers/iommu/intel_irq_remapping.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,7 @@ static void intel_irq_remapping_free(struct irq_domain *domain,
13971397
}
13981398

13991399
static int intel_irq_remapping_activate(struct irq_domain *domain,
1400-
struct irq_data *irq_data, bool early)
1400+
struct irq_data *irq_data, bool reserve)
14011401
{
14021402
intel_ir_reconfigure_irte(irq_data, true);
14031403
return 0;

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,7 +2303,7 @@ static int its_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
23032303
}
23042304

23052305
static int its_irq_domain_activate(struct irq_domain *domain,
2306-
struct irq_data *d, bool early)
2306+
struct irq_data *d, bool reserve)
23072307
{
23082308
struct its_device *its_dev = irq_data_get_irq_chip_data(d);
23092309
u32 event = its_get_event_id(d);
@@ -2818,7 +2818,7 @@ static int its_vpe_irq_domain_alloc(struct irq_domain *domain, unsigned int virq
28182818
}
28192819

28202820
static int its_vpe_irq_domain_activate(struct irq_domain *domain,
2821-
struct irq_data *d, bool early)
2821+
struct irq_data *d, bool reserve)
28222822
{
28232823
struct its_vpe *vpe = irq_data_get_irq_chip_data(d);
28242824
struct its_node *its;

drivers/pinctrl/stm32/pinctrl-stm32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static int stm32_gpio_domain_translate(struct irq_domain *d,
290290
}
291291

292292
static int stm32_gpio_domain_activate(struct irq_domain *d,
293-
struct irq_data *irq_data, bool early)
293+
struct irq_data *irq_data, bool reserve)
294294
{
295295
struct stm32_gpio_bank *bank = d->host_data;
296296
struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent);

include/linux/irqdomain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ struct irq_domain_ops {
113113
unsigned int nr_irqs, void *arg);
114114
void (*free)(struct irq_domain *d, unsigned int virq,
115115
unsigned int nr_irqs);
116-
int (*activate)(struct irq_domain *d, struct irq_data *irqd, bool early);
116+
int (*activate)(struct irq_domain *d, struct irq_data *irqd, bool reserve);
117117
void (*deactivate)(struct irq_domain *d, struct irq_data *irq_data);
118118
int (*translate)(struct irq_domain *d, struct irq_fwspec *fwspec,
119119
unsigned long *out_hwirq, unsigned int *out_type);

kernel/irq/internals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static inline bool irq_fixup_move_pending(struct irq_desc *desc, bool fclear)
440440
#endif /* !CONFIG_GENERIC_PENDING_IRQ */
441441

442442
#if !defined(CONFIG_IRQ_DOMAIN) || !defined(CONFIG_IRQ_DOMAIN_HIERARCHY)
443-
static inline int irq_domain_activate_irq(struct irq_data *data, bool early)
443+
static inline int irq_domain_activate_irq(struct irq_data *data, bool reserve)
444444
{
445445
irqd_set_activated(data);
446446
return 0;

kernel/irq/irqdomain.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ static void __irq_domain_deactivate_irq(struct irq_data *irq_data)
16931693
}
16941694
}
16951695

1696-
static int __irq_domain_activate_irq(struct irq_data *irqd, bool early)
1696+
static int __irq_domain_activate_irq(struct irq_data *irqd, bool reserve)
16971697
{
16981698
int ret = 0;
16991699

@@ -1702,9 +1702,9 @@ static int __irq_domain_activate_irq(struct irq_data *irqd, bool early)
17021702

17031703
if (irqd->parent_data)
17041704
ret = __irq_domain_activate_irq(irqd->parent_data,
1705-
early);
1705+
reserve);
17061706
if (!ret && domain->ops->activate) {
1707-
ret = domain->ops->activate(domain, irqd, early);
1707+
ret = domain->ops->activate(domain, irqd, reserve);
17081708
/* Rollback in case of error */
17091709
if (ret && irqd->parent_data)
17101710
__irq_domain_deactivate_irq(irqd->parent_data);
@@ -1716,17 +1716,18 @@ static int __irq_domain_activate_irq(struct irq_data *irqd, bool early)
17161716
/**
17171717
* irq_domain_activate_irq - Call domain_ops->activate recursively to activate
17181718
* interrupt
1719-
* @irq_data: outermost irq_data associated with interrupt
1719+
* @irq_data: Outermost irq_data associated with interrupt
1720+
* @reserve: If set only reserve an interrupt vector instead of assigning one
17201721
*
17211722
* This is the second step to call domain_ops->activate to program interrupt
17221723
* controllers, so the interrupt could actually get delivered.
17231724
*/
1724-
int irq_domain_activate_irq(struct irq_data *irq_data, bool early)
1725+
int irq_domain_activate_irq(struct irq_data *irq_data, bool reserve)
17251726
{
17261727
int ret = 0;
17271728

17281729
if (!irqd_is_activated(irq_data))
1729-
ret = __irq_domain_activate_irq(irq_data, early);
1730+
ret = __irq_domain_activate_irq(irq_data, reserve);
17301731
if (!ret)
17311732
irqd_set_activated(irq_data);
17321733
return ret;

0 commit comments

Comments
 (0)