linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* highmem pages
@ 2005-10-05  7:35 Jeff Garzik
  2005-10-06 10:35 ` Albert Lee
  0 siblings, 1 reply; 12+ messages in thread
From: Jeff Garzik @ 2005-10-05  7:35 UTC (permalink / raw)
  To: Albert Lee; +Cc: linux-ide@vger.kernel.org


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


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

end of thread, other threads:[~2005-10-09 13:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-05  7:35 highmem pages Jeff Garzik
2005-10-06 10:35 ` 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

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).