Re: [RFC/PATCH 1/3] powerpc: add ioremap_bat() function for setting up BAT translated IO regions.
From: Kumar Gala <hidden>
Date: 2008-08-07 18:22:23
From: Kumar Gala <hidden>
Date: 2008-08-07 18:22:23
On Aug 7, 2008, at 11:45 AM, Scott Wood wrote:
On Wed, Aug 06, 2008 at 05:11:08PM -0600, Grant Likely wrote:quoted
I do this particular test to make absolute sure that the caller absolutely understands the limitations of the block mapping. If they call this with something that isn't 128k aligned, then I make it fail immediately so the coder is forced to go and understand what they are allowed to do. Basically, I'm reinforcing the fact that this is not the same as ioremap(). I haven't decided yet if I should test size in the same way. Thoughts?I'd prefer it round up the size as needed to cover the requested mapping and needed alignment. The minimum size is going to be different on Book E, for example, and I can think of at least one user that will be shared between Book E and classic (CPM2 early console).
Which is how ioremap works today. We ask for a size of 3 bytes and it rounds up to a 4k page. The same should be true of the new interface (and round up to whatever the smallest size the HW we are using can handle). - k