public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] copy_from_high_bh
@ 2001-07-08 15:04 markhe
  0 siblings, 0 replies; 3+ messages in thread
From: markhe @ 2001-07-08 15:04 UTC (permalink / raw)
  To: linux-kernel

Hi,

  mm/highmem.c/copy_from_high_bh() blocks interrupts while copying "down"
to a bounce buffer, for writing.
  This function is only ever called from create_bounce() (which cannot
be called from an interrupt context - it may block), and the kmap
'KM_BOUNCE_WRITE' is only used in copy_from_high_bh().

  Therefore, the comment in copy_from_high_bh() is wrong, and the
__cli()/__sti() unnecessary.

  Patch against 2.4.6 below.

Mark

-------------------------------------------------------------------

diff -urN -X dontdiff linux-2.4.6/mm/highmem.c cli-2.4.6/mm/highmem.c
--- linux-2.4.6/mm/highmem.c	Fri Jun 29 23:17:34 2001
+++ cli-2.4.6/mm/highmem.c	Sun Jul  8 15:50:04 2001
@@ -182,20 +182,12 @@
 {
 	struct page *p_from;
 	char *vfrom;
-	unsigned long flags;

 	p_from = from->b_page;

-	/*
-	 * Since this can be executed from IRQ context, reentrance
-	 * on the same CPU must be avoided:
-	 */
-	__save_flags(flags);
-	__cli();
 	vfrom = kmap_atomic(p_from, KM_BOUNCE_WRITE);
 	memcpy(to->b_data, vfrom + bh_offset(from), to->b_size);
 	kunmap_atomic(vfrom, KM_BOUNCE_WRITE);
-	__restore_flags(flags);
 }

 static inline void copy_to_high_bh_irq (struct buffer_head *to,



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

end of thread, other threads:[~2001-07-08 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.33.0107081102410.7044-100000@penguin.transmeta.com>
2001-07-08 18:26 ` [PATCH] copy_from_high_bh Mark Hemment
2001-07-08 23:33   ` Andrea Arcangeli
2001-07-08 15:04 markhe

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