linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-arch@vger.kernel.org
Subject: Re: [RFC PATCH 2/4] pio-mapping: Add ARM support for the PIO mapping API
Date: Tue, 09 Feb 2010 18:03:24 +0000	[thread overview]
Message-ID: <1265738604.8655.58.camel@pc1117.cambridge.arm.com> (raw)
In-Reply-To: <1265649274.6289.12.camel@mulgrave.site>

On Mon, 2010-02-08 at 17:14 +0000, James Bottomley wrote:
> On Mon, 2010-02-08 at 16:10 +0000, Catalin Marinas wrote:
> 
> This API would have to cope with highmem too ... and because of the
> limited mappings available, we can't just map an arbitrary sized buffer
> (especially in atomics where the number of available slots is often only
> two).
> 
> > static inline void *pio_map_range(void *start, size_t size,
> >                                 enum pio_data_direction dir)
> > {
> >       return start;
> > }
> >
> > static inline void pio_unmap_range(void *start, size_t size,
> >                                  enum pio_data_direction dir)
> > {
> > }
> 
> I think really for range PIO, we need helpers to map and unmap a page at
> a time ... sort of like the for_each_sg approach except this time we
> loop over the pages in the range mapping and unmapping a single one.

These were not intended to create any additional mapping, more like the
dma_map_single() functions and only do the necessary flushing.

AFAICT, an HCD driver would call the pio_map_range() once to get the
address of the buffer and than wait for it to be filled in (e.g. via
interrupts). When it is full, it would call pio_unmap_range(). So even
if we do it per page, you still need to map the same amount of memory,
unless we modify the HCD drivers but I don't think this would be very
popular.

Maybe the name choosing is wrong. Would something like pio_begin() and
pio_end() work better for already mapped buffers?

-- 
Catalin

  reply	other threads:[~2010-02-09 18:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-05 16:31 [RFC PATCH 0/4] PIO drivers and cache coherency Catalin Marinas
2010-02-05 16:31 ` [RFC PATCH 1/4] pio-mapping: Add generic support for PIO mapping API Catalin Marinas
2010-02-05 16:31 ` [RFC PATCH 2/4] pio-mapping: Add ARM support for the " Catalin Marinas
2010-02-05 16:43   ` James Bottomley
2010-02-05 17:20     ` Catalin Marinas
2010-02-05 17:36       ` James Bottomley
2010-02-05 18:02         ` Catalin Marinas
2010-02-08 16:10         ` Catalin Marinas
2010-02-08 16:54           ` Russell King
2010-02-08 17:20             ` James Bottomley
2010-02-08 17:33               ` Russell King
2010-02-08 19:07                 ` James Bottomley
2010-02-08 18:02             ` [RFC PATCH 2/4] pio-mapping: Add ARM support for the PIOmapping API Catalin Marinas
2010-02-08 19:09               ` James Bottomley
2010-02-08 17:14           ` [RFC PATCH 2/4] pio-mapping: Add ARM support for the PIO mapping API James Bottomley
2010-02-09 18:03             ` Catalin Marinas [this message]
2010-02-17  9:11               ` Benjamin Herrenschmidt
2010-02-17 20:04                 ` Russell King
2010-02-17 20:39                   ` Benjamin Herrenschmidt
2010-02-05 16:32 ` [RFC PATCH 3/4] pio-mapping: Use the PIO mapping API in libata-sff.c Catalin Marinas
2010-02-05 16:32 ` [RFC PATCH 4/4] pio-mapping: Use the PIO mapping API in the ISP1760 HCD driver Catalin Marinas

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=1265738604.8655.58.camel@pc1117.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-arch@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).