[PATCH 2/4] 8xx: Avoid testing for kernel space in ITLB Miss.
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Mar 17 08:19:36 EST 2010
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).
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list