Skip to content

Commit 8d15a72

Browse files
author
Marc Zyngier
committed
genirq: Hide irq_cpu_{on,off}line() behind a deprecated option
irq_cpu_{on,off}line() are now only used by the Octeon platform. Make their use conditional on this plaform being enabled, and otherwise hidden away. Signed-off-by: Marc Zyngier <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Tested-by: Serge Semin <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent dd098a0 commit 8d15a72

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

include/linux/irq.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,10 @@ struct irq_chip {
524524
void (*irq_bus_lock)(struct irq_data *data);
525525
void (*irq_bus_sync_unlock)(struct irq_data *data);
526526

527+
#ifdef CONFIG_DEPRECATED_IRQ_CPU_ONOFFLINE
527528
void (*irq_cpu_online)(struct irq_data *data);
528529
void (*irq_cpu_offline)(struct irq_data *data);
529-
530+
#endif
530531
void (*irq_suspend)(struct irq_data *data);
531532
void (*irq_resume)(struct irq_data *data);
532533
void (*irq_pm_shutdown)(struct irq_data *data);
@@ -606,8 +607,10 @@ struct irqaction;
606607
extern int setup_percpu_irq(unsigned int irq, struct irqaction *new);
607608
extern void remove_percpu_irq(unsigned int irq, struct irqaction *act);
608609

610+
#ifdef CONFIG_DEPRECATED_IRQ_CPU_ONOFFLINE
609611
extern void irq_cpu_online(void);
610612
extern void irq_cpu_offline(void);
613+
#endif
611614
extern int irq_set_affinity_locked(struct irq_data *data,
612615
const struct cpumask *cpumask, bool force);
613616
extern int irq_set_vcpu_affinity(unsigned int irq, void *vcpu_info);

kernel/irq/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,10 @@ config GENERIC_IRQ_MULTI_HANDLER
144144
bool
145145
help
146146
Allow to specify the low level IRQ handler at run time.
147+
148+
# Cavium Octeon is the last system to use this deprecated option
149+
# Do not even think of enabling this on any new platform
150+
config DEPRECATED_IRQ_CPU_ONOFFLINE
151+
bool
152+
depends on CAVIUM_OCTEON_SOC
153+
default CAVIUM_OCTEON_SOC

kernel/irq/chip.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,7 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
11221122
}
11231123
EXPORT_SYMBOL_GPL(irq_modify_status);
11241124

1125+
#ifdef CONFIG_DEPRECATED_IRQ_CPU_ONOFFLINE
11251126
/**
11261127
* irq_cpu_online - Invoke all irq_cpu_online functions.
11271128
*
@@ -1181,6 +1182,7 @@ void irq_cpu_offline(void)
11811182
raw_spin_unlock_irqrestore(&desc->lock, flags);
11821183
}
11831184
}
1185+
#endif
11841186

11851187
#ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
11861188

0 commit comments

Comments
 (0)