Thread (12 messages) flat view 12 messages, 4 authors, 2011-01-23
STALE5701d

[PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io()

From: Russell King - ARM Linux <hidden>
Date: 2011-01-22 23:15:28

On Sun, Jan 23, 2011 at 06:56:40AM +0800, Eric Miao wrote:
From: Eric Miao <redacted>

Provided that the only place initializing the fixed IO mapping is
in mdesc->map_io(), the VMALLOC_END can actually be calculated by
first invoking the function without actually doing the map.
We really can't do this.  You're assuming that platforms only do IO
mapping in their map_io callback - that's way far from the truth.

Samsung platforms for instance register clocks and other stuff.

OMAP platforms issue cache flushes which won't work on CPUs requiring
a mapping to be setup for this to work.  They also check CPU revisions
(requiring mappings in place for that), probe the size of sram, etc.
None of this will work without mappings setup.

And there's a catch-you in OMAP there - it needs accessible mappings
to work out what other mappings (eg, sram size) to setup.  It can't map
a larger area than is actually present because that's known to cause
problems.

So, without a lot of effort to clean up platform code first, it's
really unsafe to do this double-call of map_io().  Given that it
takes some platform support _years_ to change, I really don't see
that this is a practical approach.

I'd instead suggest adding vmalloc_end to the machine description
record.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help