From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751821AbbHMHBW (ORCPT ); Thu, 13 Aug 2015 03:01:22 -0400 Received: from gate.crashing.org ([63.228.1.57]:53432 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751141AbbHMHBV (ORCPT ); Thu, 13 Aug 2015 03:01:21 -0400 Date: Thu, 13 Aug 2015 02:00:43 -0500 From: Segher Boessenkool To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , scottwood@freescale.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/20] powerpc/8xx: Map linear kernel RAM with 8M pages Message-ID: <20150813070043.GA29938@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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