[RFC/PATCH 1/3] powerpc: add ioremap_bat() function for setting up BAT translated IO regions.

Grant Likely grant.likely at secretlab.ca
Wed Aug 13 05:50:28 EST 2008


On Thu, Aug 07, 2008 at 07:04:04PM -0500, Kumar Gala wrote:
>> mem_init_done isn't a good indication. We can do page tables when it's
>> 0, we would have to use a separate mem_preinit_done or something :-)
>>
>> I initially also though about a flag to ioremap_prot to be honest. But
>> it does obfuscate the normal ioremap code path and if there's a flag,
>> that means that callers know the difference and thus may as well call
>> a separate function, don't you think ?
>
> I'm ok with exposing a separate function as far as the API goes.. I'm  
> not ok with duplicating the logic of __ioremap().

Turns out there is very little actual duplication of code with
__ioremap().  The checks for p_mapped_by_* are the same, but all the
alignment checks are different because different boundaries are used.

I attempted to break things down to a common function, but there is not
a lot there.  But I will add a function to manage modification of
ioremap_bot.

g.



More information about the Linuxppc-dev mailing list