From: Jeff Garzik <jgarzik@pobox.com>
To: Albert Lee <albertcc@tw.ibm.com>
Cc: "linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: highmem pages
Date: Wed, 05 Oct 2005 03:35:52 -0400 [thread overview]
Message-ID: <43438258.9080706@pobox.com> (raw)
Here is an interesting code snippet from ide-scsi, that could be useful
in libata:
> count = min(pc->sg->length - pc->b_count, bcount);
> if (PageHighMem(pc->sg->page)) {
> unsigned long flags;
>
> local_irq_save(flags);
> buf = kmap_atomic(pc->sg->page, KM_IRQ0) + pc->sg->offse
> t;
> drive->hwif->atapi_input_bytes(drive, buf + pc->b_count,
> count);
> kunmap_atomic(buf - pc->sg->offset, KM_IRQ0);
> local_irq_restore(flags);
> } else {
> buf = page_address(pc->sg->page) + pc->sg->offset;
> drive->hwif->atapi_input_bytes(drive, buf + pc->b_count,
> count);
> }
next reply other threads:[~2005-10-05 7:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-05 7:35 Jeff Garzik [this message]
2005-10-06 10:35 ` highmem pages Albert Lee
2005-10-06 10:40 ` [PATCH/RFC 1/3] irq-pio: reorganize ata_pio_sector() and __atapi_pio_bytes() Albert Lee
2005-10-06 10:42 ` [PATCH/RFC 2/3] irq-pio: reorganize "buf + offset" Albert Lee
2005-10-06 10:44 ` [PATCH/RFC 3/3] " Albert Lee
2005-10-06 11:20 ` highmem pages Jeff Garzik
2005-10-07 6:00 ` Albert Lee
2005-10-07 6:08 ` [PATCH 0/3] libata-dev: use PageHighMem() to optimize kmap_atomic() usage Albert Lee
2005-10-07 6:12 ` [PATCH 1/3] irq-pio: reorganize ata_pio_sector() and __atapi_pio_bytes() Albert Lee
2005-10-07 6:18 ` [PATCH 2/3] irq-pio: reorganize "buf + offset" Albert Lee
2005-10-07 6:20 ` [PATCH 3/3] irq-pio: use PageHighMem() to optimize the kmap_atomic() usage Albert Lee
2005-10-09 13:49 ` Jeff Garzik
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=43438258.9080706@pobox.com \
--to=jgarzik@pobox.com \
--cc=albertcc@tw.ibm.com \
--cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).