Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ide: don't enable/disable interrupts in force threaded-IRQ mode

The interrupts are enabled/disabled so the interrupt handler can run
with enabled interrupts while serving the interrupt and not lose other
interrupts especially the timer tick.
If the system runs with force-threaded interrupts then there is no need
to enable the interrupts.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sebastian Andrzej Siewior and committed by
David S. Miller
47b82e88 ce1e5181

+11 -5
+9 -4
drivers/ide/ide-iops.c
··· 108 108 ide_hwif_t *hwif = drive->hwif; 109 109 const struct ide_tp_ops *tp_ops = hwif->tp_ops; 110 110 unsigned long flags; 111 + bool irqs_threaded = force_irqthreads; 111 112 int i; 112 113 u8 stat; 113 114 ··· 116 115 stat = tp_ops->read_status(hwif); 117 116 118 117 if (stat & ATA_BUSY) { 119 - local_save_flags(flags); 120 - local_irq_enable_in_hardirq(); 118 + if (!irqs_threaded) { 119 + local_save_flags(flags); 120 + local_irq_enable_in_hardirq(); 121 + } 121 122 timeout += jiffies; 122 123 while ((stat = tp_ops->read_status(hwif)) & ATA_BUSY) { 123 124 if (time_after(jiffies, timeout)) { ··· 132 129 if ((stat & ATA_BUSY) == 0) 133 130 break; 134 131 135 - local_irq_restore(flags); 132 + if (!irqs_threaded) 133 + local_irq_restore(flags); 136 134 *rstat = stat; 137 135 return -EBUSY; 138 136 } 139 137 } 140 - local_irq_restore(flags); 138 + if (!irqs_threaded) 139 + local_irq_restore(flags); 141 140 } 142 141 /* 143 142 * Allow status to settle, then read it again.
+1 -1
drivers/ide/ide-taskfile.c
··· 405 405 return startstop; 406 406 } 407 407 408 - if ((drive->dev_flags & IDE_DFLAG_UNMASK) == 0) 408 + if (!force_irqthreads && (drive->dev_flags & IDE_DFLAG_UNMASK) == 0) 409 409 local_irq_disable(); 410 410 411 411 ide_set_handler(drive, &task_pio_intr, WAIT_WORSTCASE);
+1
kernel/irq/manage.c
··· 24 24 25 25 #ifdef CONFIG_IRQ_FORCED_THREADING 26 26 __read_mostly bool force_irqthreads; 27 + EXPORT_SYMBOL_GPL(force_irqthreads); 27 28 28 29 static int __init setup_forced_irqthreads(char *arg) 29 30 {