16 #include <linux/linkage.h>
22 #include <linux/irqnr.h>
23 #include <linux/errno.h>
25 #include <linux/wait.h>
28 #include <asm/ptrace.h>
29 #include <asm/irq_regs.h>
102 #define IRQF_MODIFY_MASK \
103 (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \
104 IRQ_NOAUTOEN | IRQ_MOVE_PCNTXT | IRQ_LEVEL | IRQ_NO_BALANCING | \
105 IRQ_PER_CPU | IRQ_NESTED_THREAD | IRQ_NOTHREAD | IRQ_PER_CPU_DEVID)
107 #define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING)
187 static inline bool irqd_is_setaffinity_pending(
struct irq_data *
d)
192 static inline bool irqd_is_per_cpu(
struct irq_data *
d)
197 static inline bool irqd_can_balance(
struct irq_data *
d)
202 static inline bool irqd_affinity_was_set(
struct irq_data *
d)
207 static inline void irqd_mark_affinity_was_set(
struct irq_data *
d)
212 static inline u32 irqd_get_trigger_type(
struct irq_data *
d)
226 static inline bool irqd_is_level_type(
struct irq_data *
d)
231 static inline bool irqd_is_wakeup_set(
struct irq_data *
d)
236 static inline bool irqd_can_move_in_process_context(
struct irq_data *
d)
241 static inline bool irqd_irq_disabled(
struct irq_data *
d)
246 static inline bool irqd_irq_masked(
struct irq_data *
d)
251 static inline bool irqd_irq_inprogress(
struct irq_data *
d)
261 static inline void irqd_set_chained_irq_inprogress(
struct irq_data *
d)
266 static inline void irqd_clr_chained_irq_inprogress(
struct irq_data *
d)
361 #include <asm/hw_irq.h>
363 #ifndef NR_IRQS_LEGACY
364 # define NR_IRQS_LEGACY 0
367 #ifndef ARCH_IRQ_INIT_FLAGS
368 # define ARCH_IRQ_INIT_FLAGS 0
371 #define IRQ_DEFAULT_INIT_FLAGS ARCH_IRQ_INIT_FLAGS
383 #ifdef CONFIG_GENERIC_HARDIRQS
385 #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ)
393 extern int no_irq_affinity;
402 extern void handle_edge_eoi_irq(
unsigned int irq,
struct irq_desc *
desc);
428 static inline void irq_set_chip_and_handler(
unsigned int irq,
struct irq_chip *
chip,
459 static inline void irq_set_status_flags(
unsigned int irq,
unsigned long set)
464 static inline void irq_clear_status_flags(
unsigned int irq,
unsigned long clr)
469 static inline void irq_set_noprobe(
unsigned int irq)
474 static inline void irq_set_probe(
unsigned int irq)
479 static inline void irq_set_nothread(
unsigned int irq)
484 static inline void irq_set_thread(
unsigned int irq)
489 static inline void irq_set_nested_thread(
unsigned int irq,
bool nest)
497 static inline void irq_set_percpu_devid_flags(
unsigned int irq)
499 irq_set_status_flags(irq,
514 static inline void dynamic_irq_init(
unsigned int irq)
527 static inline struct irq_chip *irq_get_chip(
unsigned int irq)
538 static inline void *irq_get_chip_data(
unsigned int irq)
544 static inline void *irq_data_get_irq_chip_data(
struct irq_data *
d)
549 static inline void *irq_get_handler_data(
unsigned int irq)
555 static inline void *irq_data_get_irq_handler_data(
struct irq_data *
d)
560 static inline struct msi_desc *irq_get_msi_desc(
unsigned int irq)
575 #define irq_alloc_descs(irq, from, cnt, node) \
576 __irq_alloc_descs(irq, from, cnt, node, THIS_MODULE)
578 #define irq_alloc_desc(node) \
579 irq_alloc_descs(-1, 0, 1, node)
581 #define irq_alloc_desc_at(at, node) \
582 irq_alloc_descs(at, at, 1, node)
584 #define irq_alloc_desc_from(from, node) \
585 irq_alloc_descs(-1, from, 1, node)
590 static inline void irq_free_desc(
unsigned int irq)
595 static inline int irq_reserve_irq(
unsigned int irq)
600 #ifndef irq_reg_writel
601 # define irq_reg_writel(val, addr) writel(val, addr)
603 #ifndef irq_reg_readl
604 # define irq_reg_readl(addr) readl(addr)
617 struct irq_chip_regs {
638 struct irq_chip_type {
640 struct irq_chip_regs
regs;
667 struct irq_chip_generic {
670 unsigned int irq_base;
671 unsigned int irq_cnt;
691 IRQ_GC_INIT_MASK_CACHE = 1 << 0,
692 IRQ_GC_INIT_NESTED_LOCK = 1 << 1,
708 struct irq_chip_generic *
712 enum irq_gc_flags
flags,
unsigned int clr,
716 unsigned int clr,
unsigned int set);
718 static inline struct irq_chip_type *irq_data_get_chip_type(
struct irq_data *
d)
723 #define IRQ_MSK(n) (u32)((n) < 32 ? ((1 << (n)) - 1) : UINT_MAX)
726 static inline void irq_gc_lock(
struct irq_chip_generic *
gc)
731 static inline void irq_gc_unlock(
struct irq_chip_generic *
gc)
736 static inline void irq_gc_lock(
struct irq_chip_generic *
gc) { }
737 static inline void irq_gc_unlock(
struct irq_chip_generic *
gc) { }