public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] drivers/ide/pci/alim15x3.c SMP fix
@ 2005-09-01  7:24 Ingo Molnar
  2005-09-01  8:13 ` Rui Nuno Capela
  2005-09-01 10:42 ` Alan Cox
  0 siblings, 2 replies; 12+ messages in thread
From: Ingo Molnar @ 2005-09-01  7:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox, Rui Nuno Capela


is this the right way to fix the UP assumption below?

	Ingo

Signed-off-by: Ingo Molnar <mingo@elte.hu>

Index: linux/drivers/ide/pci/alim15x3.c
===================================================================
--- linux.orig/drivers/ide/pci/alim15x3.c
+++ linux/drivers/ide/pci/alim15x3.c
@@ -323,7 +323,7 @@ static void ali15x3_tune_drive (ide_driv
 		if (r_clc >= 16)
 			r_clc = 0;
 	}
-	local_irq_save(flags);
+	spin_lock_irqsave(&ide_lock, flags);
 	
 	/* 
 	 * PIO mode => ATA FIFO on, ATAPI FIFO off
@@ -345,7 +345,7 @@ static void ali15x3_tune_drive (ide_driv
 	
 	pci_write_config_byte(dev, port, s_clc);
 	pci_write_config_byte(dev, port+drive->select.b.unit+2, (a_clc << 4) | r_clc);
-	local_irq_restore(flags);
+	spin_unlock_irqrestore(&ide_lock, flags);
 
 	/*
 	 * setup   active  rec
@@ -601,7 +601,7 @@ static unsigned int __devinit init_chips
 	}
 #endif  /* defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS) */
 
-	local_irq_save(flags);
+	spin_lock_irqsave(&ide_lock, flags);
 
 	if (m5229_revision < 0xC2) {
 		/*
@@ -614,7 +614,7 @@ static unsigned int __devinit init_chips
 		 * clear bit 7
 		 */
 		pci_write_config_byte(dev, 0x4b, tmpbyte & 0x7F);
-		local_irq_restore(flags);
+		spin_unlock_irqrestore(&ide_lock, flags);
 		return 0;
 	}
 
@@ -639,7 +639,7 @@ static unsigned int __devinit init_chips
 	 * 0:0.0 so if we didn't find one we know what is cooking.
 	 */
 	if (north && north->vendor != PCI_VENDOR_ID_AL) {
-		local_irq_restore(flags);
+		spin_unlock_irqrestore(&ide_lock, flags);
 	        return 0;
 	}
 
@@ -662,7 +662,7 @@ static unsigned int __devinit init_chips
 			pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02);
 		}
 	}
-	local_irq_restore(flags);
+	spin_unlock_irqrestore(&ide_lock, flags);
 	return 0;
 }
 
@@ -686,7 +686,7 @@ static unsigned int __devinit ata66_ali1
 	unsigned long flags;
 	u8 tmpbyte;
 
-	local_irq_save(flags);
+	spin_lock_irqsave(&ide_lock, flags);
 
 	if (m5229_revision >= 0xC2) {
 		/*
@@ -736,7 +736,7 @@ static unsigned int __devinit ata66_ali1
 
 	pci_write_config_byte(dev, 0x53, tmpbyte);
 
-	local_irq_restore(flags);
+	spin_unlock_irqrestore(&ide_lock, flags);
 
 	return(ata66);
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-10-17 12:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-01  7:24 [patch] drivers/ide/pci/alim15x3.c SMP fix Ingo Molnar
2005-09-01  8:13 ` Rui Nuno Capela
2005-09-01  8:17   ` Ingo Molnar
2005-09-01  8:51     ` Rui Nuno Capela
2005-09-01 10:42 ` Alan Cox
2005-10-03  6:50   ` Ingo Molnar
2005-10-03 16:24     ` Alan Cox
2005-10-04  9:29     ` tsc_c3_compensate undefined since patch-2.6.13-rt13 Rui Nuno Capela
2005-10-04 10:14       ` Ingo Molnar
2005-10-04 13:07         ` Rui Nuno Capela
2005-10-16 22:43         ` Rui Nuno Capela
2005-10-17 12:48           ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox