diff options
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r-- | kernel/irq/manage.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 274ba9238fb7..54eb5c99351b 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -911,6 +911,33 @@ static int irq_thread(void *data) | |||
911 | return 0; | 911 | return 0; |
912 | } | 912 | } |
913 | 913 | ||
914 | /** | ||
915 | * irq_wake_thread - wake the irq thread for the action identified by dev_id | ||
916 | * @irq: Interrupt line | ||
917 | * @dev_id: Device identity for which the thread should be woken | ||
918 | * | ||
919 | */ | ||
920 | void irq_wake_thread(unsigned int irq, void *dev_id) | ||
921 | { | ||
922 | struct irq_desc *desc = irq_to_desc(irq); | ||
923 | struct irqaction *action; | ||
924 | unsigned long flags; | ||
925 | |||
926 | if (!desc || WARN_ON(irq_settings_is_per_cpu_devid(desc))) | ||
927 | return; | ||
928 | |||
929 | raw_spin_lock_irqsave(&desc->lock, flags); | ||
930 | for (action = desc->action; action; action = action->next) { | ||
931 | if (action->dev_id == dev_id) { | ||
932 | if (action->thread) | ||
933 | __irq_wake_thread(desc, action); | ||
934 | break; | ||
935 | } | ||
936 | } | ||
937 | raw_spin_unlock_irqrestore(&desc->lock, flags); | ||
938 | } | ||
939 | EXPORT_SYMBOL_GPL(irq_wake_thread); | ||
940 | |||
914 | static void irq_setup_forced_threading(struct irqaction *new) | 941 | static void irq_setup_forced_threading(struct irqaction *new) |
915 | { | 942 | { |
916 | if (!force_irqthreads) | 943 | if (!force_irqthreads) |