summaryrefslogtreecommitdiff
path: root/drivers/ide
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2018-05-04 16:24:46 +0200
committerDavid S. Miller <davem@davemloft.net>2018-06-05 16:26:47 -0400
commit47b82e88180c3c6db795a43373beab47cb073f7a (patch)
tree1ef365d5cbd94830da977107d8f11ebe466610fe /drivers/ide
parentce1e518190ea71d1ecf1a91a8b0794ba9bd78e89 (diff)
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>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-iops.c13
-rw-r--r--drivers/ide/ide-taskfile.c2
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 210a0887dd29..d55e9ebd5628 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -108,6 +108,7 @@ int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad,
ide_hwif_t *hwif = drive->hwif;
const struct ide_tp_ops *tp_ops = hwif->tp_ops;
unsigned long flags;
+ bool irqs_threaded = force_irqthreads;
int i;
u8 stat;
@@ -115,8 +116,10 @@ int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad,
stat = tp_ops->read_status(hwif);
if (stat & ATA_BUSY) {
- local_save_flags(flags);
- local_irq_enable_in_hardirq();
+ if (!irqs_threaded) {
+ local_save_flags(flags);
+ local_irq_enable_in_hardirq();
+ }
timeout += jiffies;
while ((stat = tp_ops->read_status(hwif)) & ATA_BUSY) {
if (time_after(jiffies, timeout)) {
@@ -129,12 +132,14 @@ int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad,
if ((stat & ATA_BUSY) == 0)
break;
- local_irq_restore(flags);
+ if (!irqs_threaded)
+ local_irq_restore(flags);
*rstat = stat;
return -EBUSY;
}
}
- local_irq_restore(flags);
+ if (!irqs_threaded)
+ local_irq_restore(flags);
}
/*
* Allow status to settle, then read it again.
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 14bdab15a454..89b29028d315 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -405,7 +405,7 @@ static ide_startstop_t pre_task_out_intr(ide_drive_t *drive,
return startstop;
}
- if ((drive->dev_flags & IDE_DFLAG_UNMASK) == 0)
+ if (!force_irqthreads && (drive->dev_flags & IDE_DFLAG_UNMASK) == 0)
local_irq_disable();
ide_set_handler(drive, &task_pio_intr, WAIT_WORSTCASE);