[lkml]   [2008]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.6.25-mm1
On Fri, 18 Apr 2008 20:29:25 -0700
Andrew Morton <> wrote:

> That's
> WARN_ON_ONCE(is_ram);
> the changelog for the patch which added that warning is
> information-free

it got added with a full changelog, then temporary removed and then added back ;(

> and there's no code comment explaining what went
> wrong, which makes things rather harder than they ought to be.
> Yes it's due to the new OLPC code. olpc_init() has
> romsig = ioremap(0xffffffc0, 16);
> which we probably just shouldn't do this at all unless we're running
> on the OLPC hardware. But we need to do this to find out if we're
> running on the OLPC hardware! Perhaps the warning should just be
> removed. --

calling ioremap() on something which COULD be ram is... REALLY nasty.
The kernel has to mark that page uncached, for all users and mappings of that memory.
A second hard case then is to find out when the last ioremap() user has
released that memory (since there's several cases where different parts of the same
4K page can be ioremapped) before it can map it cached again. The good news is that
until this olpc patch got in, there were no users of this capability....
Instead of outright forbidding it though we added a warn_on to find out if the
assumption of no users was correct...
seems it caught some new code which is trying to do this here.

this code should probably be a lot more careful and check that
1) there is no actual kernel memory or something else at this region
(what if there's some other device there? this code could blow up)
2) the machine won't tripple fault or otherwise throw tantrums if
this hardcoded value is accessed (not automatic on x86!!)
3) it only runs if there's a really high degree of confidence that this really is
an OLPC device.
or maybe
4) get this address from some other table or system provided resource

If you want to reach me at my work email, use
For development, discussion and tips for power savings,

 \ /
  Last update: 2008-04-19 20:23    [W:0.149 / U:3.376 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site