public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jakub W. Jozwicki" <jozwicki@aster.pl>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.25.10 1/2] libata: fix locking for kmap_atomic
Date: Sun, 13 Jul 2008 01:27:36 +0200	[thread overview]
Message-ID: <200807130127.36706.jozwicki@aster.pl> (raw)

Change locking surrounding kmap_atomic from local_irqsave to 
local_irqsave_nort. This fixes issues with PREEMPT_RT.
 
Signed-off-by:  Jakub Jozwicki <jozwicki@aster.pl>

--- linux-2.6.25.10/drivers/ata/libata-core.c	2008-07-03 05:46:47.000000000 
+0200
+++ linux-2.6.25.10-rt7/drivers/ata/libata-core.c	2008-07-12 
23:59:33.132140258 +0200
@@ -5157,14 +5157,14 @@
 		unsigned long flags;
 
 		/* FIXME: use a bounce buffer */
-		local_irq_save(flags);
+		local_irq_save_nort(flags);
 		buf = kmap_atomic(page, KM_IRQ0);
 
 		/* do the actual data transfer */
 		ap->ops->data_xfer(qc->dev, buf + offset, qc->sect_size, do_write);
 
 		kunmap_atomic(buf, KM_IRQ0);
-		local_irq_restore(flags);
+		local_irq_restore_nort(flags);
 	} else {
 		buf = page_address(page);
 		ap->ops->data_xfer(qc->dev, buf + offset, qc->sect_size, do_write);
@@ -5294,14 +5294,14 @@
 		unsigned long flags;
 
 		/* FIXME: use bounce buffer */
-		local_irq_save(flags);
+		local_irq_save_nort(flags);
 		buf = kmap_atomic(page, KM_IRQ0);
 
 		/* do the actual data transfer */
 		consumed = ap->ops->data_xfer(dev,  buf + offset, count, rw);
 
 		kunmap_atomic(buf, KM_IRQ0);
-		local_irq_restore(flags);
+		local_irq_restore_nort(flags);
 	} else {
 		buf = page_address(page);
 		consumed = ap->ops->data_xfer(dev,  buf + offset, count, rw);

             reply	other threads:[~2008-07-12 23:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-12 23:27 Jakub W. Jozwicki [this message]
2008-07-13  8:26 ` [PATCH 2.6.25.10 1/2] libata: fix locking for kmap_atomic Andrew Morton
2008-07-13 13:17   ` Jakub W. Jozwicki
2008-07-13 17:46     ` Jeremy Fitzhardinge
2008-07-13 18:53       ` Jakub W. Jozwicki
2008-07-13 21:32         ` Jeremy Fitzhardinge
2008-07-13 10:25 ` Alan Cox
2008-07-13 13:30   ` Jakub W. Jozwicki
2008-07-13 14:15     ` Alan Cox

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=200807130127.36706.jozwicki@aster.pl \
    --to=jozwicki@aster.pl \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox