From: <markhe@veritas.com>
To: <linux-kernel@vger.kernel.org>
Subject: [PATCH] copy_from_high_bh
Date: Sun, 8 Jul 2001 16:04:20 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.33.0107081603100.9756-100000@alloc.wat.veritas.com> (raw)
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,
next reply other threads:[~2001-07-08 15:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-08 15:04 markhe [this message]
[not found] <Pine.LNX.4.33.0107081102410.7044-100000@penguin.transmeta.com>
2001-07-08 18:26 ` Mark Hemment
2001-07-08 23:33 ` Andrea Arcangeli
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=Pine.LNX.4.33.0107081603100.9756-100000@alloc.wat.veritas.com \
--to=markhe@veritas.com \
--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
all inboxes | Powered by JetHome®