All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: linux-kernel@vger.kernel.org
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Rui Nuno Capela <rncbc@rncbc.org>
Subject: [patch] drivers/ide/pci/alim15x3.c SMP fix
Date: Thu, 1 Sep 2005 09:24:30 +0200	[thread overview]
Message-ID: <20050901072430.GA6213@elte.hu> (raw)


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);
 }

             reply	other threads:[~2005-09-01  7:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-01  7:24 Ingo Molnar [this message]
2005-09-01  8:13 ` [patch] drivers/ide/pci/alim15x3.c SMP fix 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050901072430.GA6213@elte.hu \
    --to=mingo@elte.hu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rncbc@rncbc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.