summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-12-10 20:25:38 +0100
committerThomas Gleixner <tglx@linutronix.de>2020-12-15 16:19:30 +0100
commitfdd029630434b434b127efc7fba337da28f45658 (patch)
treec8a1c178eb8869422e6d5ee5517a9842dd5bd903 /include
parentgenirq: Move irq_has_action() into core code (diff)
downloadlinux-fdd029630434b434b127efc7fba337da28f45658.tar.xz
linux-fdd029630434b434b127efc7fba337da28f45658.zip
genirq: Move status flag checks to core
These checks are used by modules and prevent the removal of the export of irq_to_desc(). Move the accessor into the core. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20201210194042.703779349@linutronix.de
Diffstat (limited to 'include')
-rw-r--r--include/linux/irqdesc.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 385a4fafe631..308d7db8991f 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -223,28 +223,21 @@ irq_set_chip_handler_name_locked(struct irq_data *data, struct irq_chip *chip,
data->chip = chip;
}
+bool irq_check_status_bit(unsigned int irq, unsigned int bitmask);
+
static inline bool irq_balancing_disabled(unsigned int irq)
{
- struct irq_desc *desc;
-
- desc = irq_to_desc(irq);
- return desc->status_use_accessors & IRQ_NO_BALANCING_MASK;
+ return irq_check_status_bit(irq, IRQ_NO_BALANCING_MASK);
}
static inline bool irq_is_percpu(unsigned int irq)
{
- struct irq_desc *desc;
-
- desc = irq_to_desc(irq);
- return desc->status_use_accessors & IRQ_PER_CPU;
+ return irq_check_status_bit(irq, IRQ_PER_CPU);
}
static inline bool irq_is_percpu_devid(unsigned int irq)
{
- struct irq_desc *desc;
-
- desc = irq_to_desc(irq);
- return desc->status_use_accessors & IRQ_PER_CPU_DEVID;
+ return irq_check_status_bit(irq, IRQ_PER_CPU_DEVID);
}
static inline void