Subject: Re: [PATCH] 8xx: map_page() skip pinned region and tlbie debugging aid

From: Dan Malek <[email-masked]>
Date: Mon, 27 Jun 2005 16:46:44 -0400

On Jun 27, 2005, at 9:39 AM, Marcelo Tosatti wrote:

> Bullshit, map_page()'s call for flush_HPTE() is conditioned by 
> "mem_init_done",
> and mapin_ram() is called before mem_init_done is set.

Excuse me?

>> The IMMR space is a 16kB window (correct?), so I wonder if it might
>> be better to the use occupied pinned slot for another more accessed
>> region (an 8MB one preferably!).
>
> Thats still some food for thought...

Actually, most 8xx systems map the IMMR, plus other external
devices (including flash memory), into a packed space at the top
of the address range.  The 8M mapping catches the IMMR space,
but also many of these other devices subject to ioremap().  In
some systems, they trade off mapping the IMMR, or data pages,
to get an additional 8M of peripheral IO space.

The data space pinning is the big trade off right now.  You can
pin 4 entries, or 32M of space.  If you only have 16M of real
memory, the other two 8M entries can be used to cover IO space.
This is one (of a a few) advantages of using dynamic large
pages instead of pinned entries.  You could map more 8M
spaces for IO.  The problem is all of these have been custom
initialization and mapping code.

You see, this just keeps growing in features and complexity :-)
It would be nice for ioremap() to consider multiple, dynamic 8M
pages on 8xx like it does BATs on traditional PPC.  It will do
this .... someday soon.

Perhaps I should go back and push some of this dynamic 8M
page stuff.  It would eliminate the tlbie() problems, give us
more flexibility.  Damn, not enough hours in a day ....

Thanks.

	-- Dan