Re: [Fastboot] Re: Kexec on 2.5.59 problems ?

Eric W. Biederman
2003-02-18T14:56:57Z

Suparna Bhattacharya <suparna@in.ibm.com> writes:

> Here's the explanation from Anton about why using init_mm is
> a problem on ppc64.

Thanks.

> Hi Suparna,
>
> On ppc64 we have many 2^41B (2 TB) regions:
>
> USER
> KERNEL
> VMALLOC
> IO
>
> Why 2TB? Well our three level linux pagetables can map 2TB. The kernel has
> no pagetables, so we only need three sets of pagetables. As usual each
> user task has its own set of pagetables. So that leaves vmalloc and IO.
>
> For IO we create our own pgd, ioremap_pgd and for vmalloc we use init_mm.
> Why not? Its not being used anywhere else... except for kexec.
>
> So init_mm covers the region of:
>
> 0xD000000000000000 to 0xD000000000000000+2^41
>
> And what kexec wants is a page under 4GB :)

In this case it definitely wants something identity mapped, which would
mean in the first 2TB region. On x86 the limit is 4GB because I only have
32bit pointers. On a 64bit arch that limit should go away.

> Thats why we created another mm.

That makes sense. I guess it boils down to the fact that init_mm
is special cased in a number of places and using it I am likely to get
me into trouble...

You would not happen to have code that creates a separate mm so I can
be lazy would you?

Eric