diff options
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r-- | kernel/irq/manage.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index fa17855ca65a..514bcfd855a8 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -555,9 +555,9 @@ int can_request_irq(unsigned int irq, unsigned long irqflags) | |||
555 | return 0; | 555 | return 0; |
556 | 556 | ||
557 | if (irq_settings_can_request(desc)) { | 557 | if (irq_settings_can_request(desc)) { |
558 | if (desc->action) | 558 | if (!desc->action || |
559 | if (irqflags & desc->action->flags & IRQF_SHARED) | 559 | irqflags & desc->action->flags & IRQF_SHARED) |
560 | canrequest =1; | 560 | canrequest = 1; |
561 | } | 561 | } |
562 | irq_put_desc_unlock(desc, flags); | 562 | irq_put_desc_unlock(desc, flags); |
563 | return canrequest; | 563 | return canrequest; |
@@ -840,9 +840,6 @@ static void irq_thread_dtor(struct callback_head *unused) | |||
840 | static int irq_thread(void *data) | 840 | static int irq_thread(void *data) |
841 | { | 841 | { |
842 | struct callback_head on_exit_work; | 842 | struct callback_head on_exit_work; |
843 | static const struct sched_param param = { | ||
844 | .sched_priority = MAX_USER_RT_PRIO/2, | ||
845 | }; | ||
846 | struct irqaction *action = data; | 843 | struct irqaction *action = data; |
847 | struct irq_desc *desc = irq_to_desc(action->irq); | 844 | struct irq_desc *desc = irq_to_desc(action->irq); |
848 | irqreturn_t (*handler_fn)(struct irq_desc *desc, | 845 | irqreturn_t (*handler_fn)(struct irq_desc *desc, |
@@ -854,8 +851,6 @@ static int irq_thread(void *data) | |||
854 | else | 851 | else |
855 | handler_fn = irq_thread_fn; | 852 | handler_fn = irq_thread_fn; |
856 | 853 | ||
857 | sched_setscheduler(current, SCHED_FIFO, ¶m); | ||
858 | |||
859 | init_task_work(&on_exit_work, irq_thread_dtor); | 854 | init_task_work(&on_exit_work, irq_thread_dtor); |
860 | task_work_add(current, &on_exit_work, false); | 855 | task_work_add(current, &on_exit_work, false); |
861 | 856 | ||
@@ -950,6 +945,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
950 | */ | 945 | */ |
951 | if (new->thread_fn && !nested) { | 946 | if (new->thread_fn && !nested) { |
952 | struct task_struct *t; | 947 | struct task_struct *t; |
948 | static const struct sched_param param = { | ||
949 | .sched_priority = MAX_USER_RT_PRIO/2, | ||
950 | }; | ||
953 | 951 | ||
954 | t = kthread_create(irq_thread, new, "irq/%d-%s", irq, | 952 | t = kthread_create(irq_thread, new, "irq/%d-%s", irq, |
955 | new->name); | 953 | new->name); |
@@ -957,6 +955,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) | |||
957 | ret = PTR_ERR(t); | 955 | ret = PTR_ERR(t); |
958 | goto out_mput; | 956 | goto out_mput; |
959 | } | 957 | } |
958 | |||
959 | sched_setscheduler(t, SCHED_FIFO, ¶m); | ||
960 | |||
960 | /* | 961 | /* |
961 | * We keep the reference to the task struct even if | 962 | * We keep the reference to the task struct even if |
962 | * the thread dies to avoid that the interrupt code | 963 | * the thread dies to avoid that the interrupt code |