summaryrefslogtreecommitdiffstats
path: root/kernel/irq/manage.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r--kernel/irq/manage.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 4bff6a10ae8e..2ff1c0c82fc9 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -398,7 +398,8 @@ int irq_select_affinity_usr(unsigned int irq)
398/** 398/**
399 * irq_set_vcpu_affinity - Set vcpu affinity for the interrupt 399 * irq_set_vcpu_affinity - Set vcpu affinity for the interrupt
400 * @irq: interrupt number to set affinity 400 * @irq: interrupt number to set affinity
401 * @vcpu_info: vCPU specific data 401 * @vcpu_info: vCPU specific data or pointer to a percpu array of vCPU
402 * specific data for percpu_devid interrupts
402 * 403 *
403 * This function uses the vCPU specific data to set the vCPU 404 * This function uses the vCPU specific data to set the vCPU
404 * affinity for an irq. The vCPU specific data is passed from 405 * affinity for an irq. The vCPU specific data is passed from
@@ -536,7 +537,7 @@ void __enable_irq(struct irq_desc *desc)
536 * time. If it was already started up, then irq_startup() 537 * time. If it was already started up, then irq_startup()
537 * will invoke irq_enable() under the hood. 538 * will invoke irq_enable() under the hood.
538 */ 539 */
539 irq_startup(desc, IRQ_RESEND, IRQ_START_COND); 540 irq_startup(desc, IRQ_RESEND, IRQ_START_FORCE);
540 break; 541 break;
541 } 542 }
542 default: 543 default:
@@ -1305,7 +1306,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
1305 * thread_mask assigned. See the loop above which or's 1306 * thread_mask assigned. See the loop above which or's
1306 * all existing action->thread_mask bits. 1307 * all existing action->thread_mask bits.
1307 */ 1308 */
1308 new->thread_mask = 1 << ffz(thread_mask); 1309 new->thread_mask = 1UL << ffz(thread_mask);
1309 1310
1310 } else if (new->handler == irq_default_primary_handler && 1311 } else if (new->handler == irq_default_primary_handler &&
1311 !(desc->irq_data.chip->flags & IRQCHIP_ONESHOT_SAFE)) { 1312 !(desc->irq_data.chip->flags & IRQCHIP_ONESHOT_SAFE)) {
@@ -1342,6 +1343,21 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
1342 goto out_unlock; 1343 goto out_unlock;
1343 } 1344 }
1344 1345
1346 /*
1347 * Activate the interrupt. That activation must happen
1348 * independently of IRQ_NOAUTOEN. request_irq() can fail
1349 * and the callers are supposed to handle
1350 * that. enable_irq() of an interrupt requested with
1351 * IRQ_NOAUTOEN is not supposed to fail. The activation
1352 * keeps it in shutdown mode, it merily associates
1353 * resources if necessary and if that's not possible it
1354 * fails. Interrupts which are in managed shutdown mode
1355 * will simply ignore that activation request.
1356 */
1357 ret = irq_activate(desc);
1358 if (ret)
1359 goto out_unlock;
1360
1345 desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \ 1361 desc->istate &= ~(IRQS_AUTODETECT | IRQS_SPURIOUS_DISABLED | \
1346 IRQS_ONESHOT | IRQS_WAITING); 1362 IRQS_ONESHOT | IRQS_WAITING);
1347 irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS); 1363 irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS);
@@ -1417,7 +1433,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
1417 wake_up_process(new->secondary->thread); 1433 wake_up_process(new->secondary->thread);
1418 1434
1419 register_irq_proc(irq, desc); 1435 register_irq_proc(irq, desc);
1420 irq_add_debugfs_entry(irq, desc);
1421 new->dir = NULL; 1436 new->dir = NULL;
1422 register_handler_proc(irq, new); 1437 register_handler_proc(irq, new);
1423 return 0; 1438 return 0;