Commit 85cabc0c authored by Linus Torvalds's avatar Linus Torvalds

Get rid of atari-specific "ide_intr_lock" from generic IDE code

parent 374f82c0
......@@ -743,7 +743,7 @@ void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
ide_startstop_t startstop;
/* for atari only: POSSIBLY BROKEN HERE(?) */
ide_get_lock(&ide_intr_lock, ide_intr, hwgroup);
ide_get_lock(ide_intr, hwgroup);
/* necessary paranoia: ensure IRQs are masked on local CPU */
local_irq_disable();
......@@ -783,7 +783,7 @@ void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
*/
/* for atari only */
ide_release_lock(&ide_intr_lock);
ide_release_lock();
hwgroup->busy = 0;
}
......
......@@ -181,14 +181,6 @@ spinlock_t ide_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
#ifdef IDE_ARCH_LOCK
/*
* ide_lock is used by the Atari code to obtain access to the IDE interrupt,
* which is shared between several drivers.
*/
static int ide_intr_lock;
#endif /* IDE_ARCH_LOCK */
#ifdef CONFIG_IDEDMA_AUTO
int noautodma = 0;
#else
......@@ -2097,12 +2089,12 @@ void __init ide_init_builtin_drivers (void)
#ifdef CONFIG_BLK_DEV_IDE
if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
ide_get_lock(&ide_intr_lock, NULL, NULL); /* for atari only */
ide_get_lock(NULL, NULL); /* for atari only */
(void) ideprobe_init();
if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
ide_release_lock(&ide_intr_lock); /* for atari only */
ide_release_lock(); /* for atari only */
#endif /* CONFIG_BLK_DEV_IDE */
#ifdef CONFIG_PROC_FS
......
......@@ -147,26 +147,28 @@ static __inline__ void ide_init_default_hwifs(void)
#ifdef CONFIG_ATARI
#define ATA_ARCH_LOCK
static __inline__ void ide_release_lock (int *ide_lock)
extern int ide_intr_lock;
static __inline__ void ide_release_lock (void)
{
if (MACH_IS_ATARI) {
if (*ide_lock == 0) {
if (ide_intr_lock == 0) {
printk("ide_release_lock: bug\n");
return;
}
*ide_lock = 0;
ide_intr_lock = 0;
stdma_release();
}
}
static __inline__ void ide_get_lock (int *ide_lock, void (*handler)(int, void *, struct pt_regs *), void *data)
static __inline__ void ide_get_lock(void (*handler)(int, void *, struct pt_regs *), void *data)
{
if (MACH_IS_ATARI) {
if (*ide_lock == 0) {
if (ide_intr_lock == 0) {
if (in_interrupt() > 0)
panic( "Falcon IDE hasn't ST-DMA lock in interrupt" );
stdma_lock(handler, data);
*ide_lock = 1;
ide_intr_lock = 1;
}
}
}
......
......@@ -360,8 +360,8 @@ extern int ide_irq_lock;
/* Currently only Atari needs it */
#ifndef IDE_ARCH_LOCK
# define ide_release_lock(lock) do {} while (0)
# define ide_get_lock(lock, hdlr, data) do {} while (0)
# define ide_release_lock() do {} while (0)
# define ide_get_lock(hdlr, data) do {} while (0)
#endif /* IDE_ARCH_LOCK */
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment