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

From
Kumar Gala <hidden>
Date
2008-08-06 22:17:04
Reply to
Grant Likely, 2008-08-06
On Aug 6, 2008, at 4:54 PM, Grant Likely wrote:
On Wed, Aug 6, 2008 at 8:07 AM, Kumar Gala [off-list ref] wrote:
quoted
On Aug 6, 2008, at 1:02 AM, Grant Likely wrote:
quoted
From: Grant Likely <redacted>

ioremap_bat() is useful for things like mapping SoC internally memory
mapped
register and early text because it allows mappings to devices to be setup
early in the boot process where they are needed, and the mappings persist
after the MMU is configured.

Without ioremap_bat(), setting up the MMU would cause the early text
mappings to get lost and mostly likely result in a kernel panic on the
next
attempt at output.

Signed-off-by: Grant Likely <redacted>
---
why can't we just do this in ioremap itself?
I suppose we could; but the usecase is somewhat different and I wanted
to keep it simple.  Using a separate API also helps reenforce that the
caller really needs to know what they are doing because BATs are a
limited resource.
there is a bunch of error checking and difference in semantics that you need to fix.  I think introduce a new API for this is silly, especially since we expect there to only be one actual invocation of the API for serial console access.

- k
Thread (45 messages) 45 messages, 14 authors, last reply 2008-08-13
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help