···92 IRQ_NO_BALANCING = (1 << 13),93 IRQ_MOVE_PCNTXT = (1 << 14),94 IRQ_NESTED_THREAD = (1 << 15),95-96-#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT97- IRQ_INPROGRESS = (1 << 16),98- IRQ_REPLAY = (1 << 17),99- IRQ_WAITING = (1 << 18),100- IRQ_DISABLED = (1 << 19),101- IRQ_PENDING = (1 << 20),102- IRQ_MASKED = (1 << 21),103- IRQ_MOVE_PENDING = (1 << 22),104- IRQ_AFFINITY_SET = (1 << 23),105- IRQ_WAKEUP = (1 << 24),106-#endif107};108109#define IRQF_MODIFY_MASK \···309 */310struct irq_chip {311 const char *name;312-#ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED313- unsigned int (*startup)(unsigned int irq);314- void (*shutdown)(unsigned int irq);315- void (*enable)(unsigned int irq);316- void (*disable)(unsigned int irq);317-318- void (*ack)(unsigned int irq);319- void (*mask)(unsigned int irq);320- void (*mask_ack)(unsigned int irq);321- void (*unmask)(unsigned int irq);322- void (*eoi)(unsigned int irq);323-324- void (*end)(unsigned int irq);325- int (*set_affinity)(unsigned int irq,326- const struct cpumask *dest);327- int (*retrigger)(unsigned int irq);328- int (*set_type)(unsigned int irq, unsigned int flow_type);329- int (*set_wake)(unsigned int irq, unsigned int on);330-331- void (*bus_lock)(unsigned int irq);332- void (*bus_sync_unlock)(unsigned int irq);333-#endif334 unsigned int (*irq_startup)(struct irq_data *data);335 void (*irq_shutdown)(struct irq_data *data);336 void (*irq_enable)(struct irq_data *data);···554{555 return d->msi_desc;556}557-558-#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT559-/* Please do not use: Use the replacement functions instead */560-static inline int set_irq_chip(unsigned int irq, struct irq_chip *chip)561-{562- return irq_set_chip(irq, chip);563-}564-static inline int set_irq_data(unsigned int irq, void *data)565-{566- return irq_set_handler_data(irq, data);567-}568-static inline int set_irq_chip_data(unsigned int irq, void *data)569-{570- return irq_set_chip_data(irq, data);571-}572-static inline int set_irq_type(unsigned int irq, unsigned int type)573-{574- return irq_set_irq_type(irq, type);575-}576-static inline int set_irq_msi(unsigned int irq, struct msi_desc *entry)577-{578- return irq_set_msi_desc(irq, entry);579-}580-static inline struct irq_chip *get_irq_chip(unsigned int irq)581-{582- return irq_get_chip(irq);583-}584-static inline void *get_irq_chip_data(unsigned int irq)585-{586- return irq_get_chip_data(irq);587-}588-static inline void *get_irq_data(unsigned int irq)589-{590- return irq_get_handler_data(irq);591-}592-static inline void *irq_data_get_irq_data(struct irq_data *d)593-{594- return irq_data_get_irq_handler_data(d);595-}596-static inline struct msi_desc *get_irq_msi(unsigned int irq)597-{598- return irq_get_msi_desc(irq);599-}600-static inline void set_irq_noprobe(unsigned int irq)601-{602- irq_set_noprobe(irq);603-}604-static inline void set_irq_probe(unsigned int irq)605-{606- irq_set_probe(irq);607-}608-static inline void set_irq_nested_thread(unsigned int irq, int nest)609-{610- irq_set_nested_thread(irq, nest);611-}612-static inline void613-set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,614- irq_flow_handler_t handle, const char *name)615-{616- irq_set_chip_and_handler_name(irq, chip, handle, name);617-}618-static inline void619-set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,620- irq_flow_handler_t handle)621-{622- irq_set_chip_and_handler(irq, chip, handle);623-}624-static inline void625-__set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,626- const char *name)627-{628- __irq_set_handler(irq, handle, is_chained, name);629-}630-static inline void set_irq_handler(unsigned int irq, irq_flow_handler_t handle)631-{632- irq_set_handler(irq, handle);633-}634-static inline void635-set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle)636-{637- irq_set_chained_handler(irq, handle);638-}639-#endif640641int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node);642void irq_free_descs(unsigned int irq, unsigned int cnt);
···92 IRQ_NO_BALANCING = (1 << 13),93 IRQ_MOVE_PCNTXT = (1 << 14),94 IRQ_NESTED_THREAD = (1 << 15),00000000000095};9697#define IRQF_MODIFY_MASK \···321 */322struct irq_chip {323 const char *name;0000000000000000000000324 unsigned int (*irq_startup)(struct irq_data *data);325 void (*irq_shutdown)(struct irq_data *data);326 void (*irq_enable)(struct irq_data *data);···588{589 return d->msi_desc;590}00000000000000000000000000000000000000000000000000000000000000000000000000000000000591592int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node);593void irq_free_descs(unsigned int irq, unsigned int cnt);
+1-59
include/linux/irqdesc.h
···35 * @name: flow handler name for /proc/interrupts output36 */37struct irq_desc {38-39-#ifdef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED40 struct irq_data irq_data;41-#else42- /*43- * This union will go away, once we fixed the direct access to44- * irq_desc all over the place. The direct fields are a 1:145- * overlay of irq_data.46- */47- union {48- struct irq_data irq_data;49- struct {50- unsigned int irq;51- unsigned int node;52- unsigned int pad_do_not_even_think_about_it;53- struct irq_chip *chip;54- void *handler_data;55- void *chip_data;56- struct msi_desc *msi_desc;57-#ifdef CONFIG_SMP58- cpumask_var_t affinity;59-#endif60- };61- };62-#endif63-64 struct timer_rand_state *timer_rand_state;65 unsigned int __percpu *kstat_irqs;66 irq_flow_handler_t handle_irq;···43 irq_preflow_handler_t preflow_handler;44#endif45 struct irqaction *action; /* IRQ action list */46-#ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT47 unsigned int status_use_accessors;48-#else49- unsigned int status; /* IRQ status */50-#endif51 unsigned int core_internal_state__do_not_mess_with_it;52 unsigned int depth; /* nested irq disables */53 unsigned int wake_depth; /* nested wake enables */···98 return desc->irq_data.msi_desc;99}100101-#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT102-static inline struct irq_chip *get_irq_desc_chip(struct irq_desc *desc)103-{104- return irq_desc_get_chip(desc);105-}106-static inline void *get_irq_desc_data(struct irq_desc *desc)107-{108- return irq_desc_get_handler_data(desc);109-}110-111-static inline void *get_irq_desc_chip_data(struct irq_desc *desc)112-{113- return irq_desc_get_chip_data(desc);114-}115-116-static inline struct msi_desc *get_irq_desc_msi(struct irq_desc *desc)117-{118- return irq_desc_get_msi_desc(desc);119-}120-#endif121-122/*123 * Architectures call this to let the generic IRQ layer124 * handle an interrupt. If the descriptor is attached to an···144 desc->name = name;145}146147-#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT148-static inline void __set_irq_handler_unlocked(int irq,149- irq_flow_handler_t handler)150-{151- __irq_set_handler_locked(irq, handler);152-}153-154static inline int irq_balancing_disabled(unsigned int irq)155{156 struct irq_desc *desc;157158 desc = irq_to_desc(irq);159- return desc->status & IRQ_NO_BALANCING_MASK;160}161-#endif162163static inline void164irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class)
···35 * @name: flow handler name for /proc/interrupts output36 */37struct irq_desc {0038 struct irq_data irq_data;0000000000000000000000039 struct timer_rand_state *timer_rand_state;40 unsigned int __percpu *kstat_irqs;41 irq_flow_handler_t handle_irq;···68 irq_preflow_handler_t preflow_handler;69#endif70 struct irqaction *action; /* IRQ action list */071 unsigned int status_use_accessors;00072 unsigned int core_internal_state__do_not_mess_with_it;73 unsigned int depth; /* nested irq disables */74 unsigned int wake_depth; /* nested wake enables */···127 return desc->irq_data.msi_desc;128}129000000000000000000000130/*131 * Architectures call this to let the generic IRQ layer132 * handle an interrupt. If the descriptor is attached to an···194 desc->name = name;195}1960000000197static inline int irq_balancing_disabled(unsigned int irq)198{199 struct irq_desc *desc;200201 desc = irq_to_desc(irq);202+ return desc->status_use_accessors & IRQ_NO_BALANCING_MASK;203}0204205static inline void206irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class)
-4
kernel/irq/Kconfig
···10config GENERIC_HARDIRQS11 def_bool y1213-# Select this to disable the deprecated stuff14-config GENERIC_HARDIRQS_NO_DEPRECATED15- bool16-17config GENERIC_HARDIRQS_NO_COMPAT18 bool19
···93 * Already running: If it is shared get the other94 * CPU to go looking for our mystery interrupt too95 */96- irq_compat_set_pending(desc);97 desc->istate |= IRQS_PENDING;98 goto out;99 }
···93 * Already running: If it is shared get the other94 * CPU to go looking for our mystery interrupt too95 */096 desc->istate |= IRQS_PENDING;97 goto out;98 }