[PATCH 02/20] powerpc/8xx: Map linear kernel RAM with 8M pages
Segher Boessenkool
segher at kernel.crashing.org
Thu Aug 13 17:00:43 AEST 2015
On Wed, Aug 12, 2015 at 03:40:56PM +0200, Christophe Leroy wrote:
> /* Insert level 1 index */
> rlwimi r11, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29
> lwz r11, (swapper_pg_dir-PAGE_OFFSET)@l(r11) /* Get the level 1 entry */
> + mtcr r11
Maybe mtcrf is faster? You only want one field, anyhow.
> + bgt- cr7,5f /* CR7.GT = bit 29 = Large page (8M or 512K) */
You can write this as bt- 29,5f which should be easier to read.
> /* Insert level 1 index */
> 3: rlwimi r11, r10, 32 - ((PAGE_SHIFT - 2) << 1), (PAGE_SHIFT - 2) << 1, 29
> lwz r11, (swapper_pg_dir-PAGE_OFFSET)@l(r11) /* Get the level 1 entry */
> + mtcr r11
> + bgt cr7,200f
Same here... Probably good to comment it, too.
Segher
More information about the Linuxppc-dev
mailing list