[PATCH 2/4] 8xx: Avoid testing for kernel space in ITLB Miss.

Joakim Tjernlund joakim.tjernlund at transmode.se
Wed Mar 17 18:35:36 EST 2010


Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote on 2010/03/16 22:19:36:
>
> On Fri, 2010-02-26 at 09:29 +0100, Joakim Tjernlund wrote:
> > +#ifdef CONFIG_MODULES
> > +       /* Only modules will cause ITLB Misses as we always
> > +        * pin the first 8MB of kernel memory */
> >         andi.   r11, r10, 0x0800        /* Address >= 0x80000000 */
> >         beq     3f
> >         lis     r11, swapper_pg_dir at h
> >         ori     r11, r11, swapper_pg_dir at l
> >         rlwimi  r10, r11, 0, 2, 19
> >  3:
> > +#endif
>
> You can optimize that further I think...
>
> You can probably just remove the code above, and add something to
> do_page_fault() that lazily copies the kernel PGD entries from
> swapper_pg_dir to the app pgdir. (You can even pre-fill that when
> creating a new mm).

I did look at this at some point and could not figure out how
to do this.



More information about the Linuxppc-dev mailing list