From patchwork Tue Jun 14 13:54:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joakim Tjernlund X-Patchwork-Id: 100342 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id BC272100F97 for ; Wed, 15 Jun 2011 00:07:33 +1000 (EST) Received: by ozlabs.org (Postfix) id B42E4B7149; Wed, 15 Jun 2011 00:05:42 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from gw1.transmode.se (gw1.transmode.se [195.58.98.146]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 62096B7117 for ; Wed, 15 Jun 2011 00:05:42 +1000 (EST) Received: from mail1.transmode.se (mail1.transmode.se [192.168.201.18]) by gw1.transmode.se (Postfix) with ESMTP id C5BAA258066; Tue, 14 Jun 2011 15:55:28 +0200 (CEST) Received: from gentoo-jocke.transmode.se ([172.20.4.10]) by mail1.transmode.se (Lotus Domino Release 8.5.2FP2) with ESMTP id 2011061415552786-76961 ; Tue, 14 Jun 2011 15:55:27 +0200 Received: from gentoo-jocke.transmode.se (localhost [127.0.0.1]) by gentoo-jocke.transmode.se (8.14.4/8.14.0) with ESMTP id p5EDtSRK010961; Tue, 14 Jun 2011 15:55:28 +0200 Received: (from jocke@localhost) by gentoo-jocke.transmode.se (8.14.4/8.14.4/Submit) id p5EDtSJK010960; Tue, 14 Jun 2011 15:55:28 +0200 From: Joakim Tjernlund To: Willy Tarreau , Scott Wood , linuxppc-dev Subject: [PATCH 13/15] 8xx: Use symbolic constants in TLB asm Date: Tue, 14 Jun 2011 15:54:58 +0200 Message-Id: <1308059700-10839-14-git-send-email-Joakim.Tjernlund@transmode.se> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1308059700-10839-1-git-send-email-Joakim.Tjernlund@transmode.se> References: <1308059700-10839-1-git-send-email-Joakim.Tjernlund@transmode.se> X-MIMETrack: Itemize by SMTP Server on mail1/Transmode(Release 8.5.2FP2|March 22, 2011) at 06/14/2011 15:55:27, Serialize by Router on mail1/Transmode(Release 8.5.2FP2|March 22, 2011) at 06/14/2011 15:55:27, Serialize complete at 06/14/2011 15:55:27 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Use the PTE #defines where possible instead of hardcoded constants. Signed-off-by: Joakim Tjernlund --- arch/ppc/kernel/head_8xx.S | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index d701542..a4290b5 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S @@ -442,11 +442,11 @@ DataStoreTLBMiss: * this into the Linux pgd/pmd and load it in the operation * above. */ - rlwimi r21, r20, 0, 27, 27 + rlwimi r21, r20, 0, _PAGE_GUARDED /* Insert the WriteThru flag into the TWC from the Linux PTE. * It is bit 25 in the Linux PTE and bit 30 in the TWC */ - rlwimi r21, r20, 32-5, 30, 30 + rlwimi r21, r20, 32-5, _PAGE_WRITETHRU>>5 DO_8xx_CPU6(0x3b80, r3) mtspr MD_TWC, r21 @@ -460,9 +460,9 @@ DataStoreTLBMiss: /* Honour kernel RO, User NA */ /* 0x200 == Extended encoding, bit 22 */ /* r20 |= (r20 & _PAGE_USER) >> 2 */ - rlwimi r20, r20, 32-2, 0x200 + rlwimi r20, r20, 32-2, _PAGE_USER>>2 /* Copy USER to Encoding */ /* r21 = (r20 & _PAGE_RW) >> 1 */ - rlwinm r21, r20, 32-1, 0x200 + rlwinm r21, r20, 32-1, _PAGE_RW>>1 or r20, r21, r20 /* invert RW and 0x200 bits */ xori r20, r20, _PAGE_RW | 0x200 @@ -582,11 +582,11 @@ DARFixed: /* Insert the Guarded flag into the TWC from the Linux PTE. * It is bit 27 of both the Linux PTE and the TWC */ - rlwimi r21, r20, 0, 27, 27 + rlwimi r21, r20, 0, _PAGE_GUARDED /* Insert the WriteThru flag into the TWC from the Linux PTE. * It is bit 25 in the Linux PTE and bit 30 in the TWC */ - rlwimi r21, r20, 32-5, 30, 30 + rlwimi r21, r20, 32-5, _PAGE_WRITETHRU>>5 DO_8xx_CPU6(0x3b80, r3) mtspr MD_TWC, r21 mfspr r21, MD_TWC /* get the pte address again */