From patchwork Wed May 18 21:05:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 96237 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 E4FC8100804 for ; Thu, 19 May 2011 07:07:28 +1000 (EST) Received: from VA3EHSOBE009.bigfish.com (va3ehsobe006.messaging.microsoft.com [216.32.180.16]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Cybertrust SureServer Standard Validation CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id D062C1007F9 for ; Thu, 19 May 2011 07:05:35 +1000 (EST) Received: from mail105-va3-R.bigfish.com (10.7.14.250) by VA3EHSOBE009.bigfish.com (10.7.40.29) with Microsoft SMTP Server id 14.1.225.22; Wed, 18 May 2011 21:05:33 +0000 Received: from mail105-va3 (localhost.localdomain [127.0.0.1]) by mail105-va3-R.bigfish.com (Postfix) with ESMTP id 8F2E117682B0; Wed, 18 May 2011 21:05:33 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail105-va3 (localhost.localdomain [127.0.0.1]) by mail105-va3 (MessageSwitch) id 1305752733402786_13225; Wed, 18 May 2011 21:05:33 +0000 (UTC) Received: from VA3EHSMHS032.bigfish.com (unknown [10.7.14.251]) by mail105-va3.bigfish.com (Postfix) with ESMTP id 5CE2E54804B; Wed, 18 May 2011 21:05:33 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS032.bigfish.com (10.7.99.42) with Microsoft SMTP Server (TLS) id 14.1.225.22; Wed, 18 May 2011 21:05:32 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.270.2; Wed, 18 May 2011 16:05:31 -0500 Received: from schlenkerla.am.freescale.net (schlenkerla.am.freescale.net [10.82.121.12]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p4IL5V9G000512; Wed, 18 May 2011 16:05:31 -0500 (CDT) Date: Wed, 18 May 2011 16:05:31 -0500 From: Scott Wood To: Subject: [PATCH 3/7] powerpc/mm: 64-bit tlb miss: get PACA from memory rather than SPR Message-ID: <20110518210531.GB29524@schlenkerla.am.freescale.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110518210453.GA29500@schlenkerla.am.freescale.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: freescale.com Cc: linuxppc-dev@lists.ozlabs.org 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: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org This saves a few cycles, at least on e5500. Signed-off-by: Scott Wood --- arch/powerpc/include/asm/exception-64e.h | 16 +++++++--------- arch/powerpc/kernel/paca.c | 5 +++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/exception-64e.h b/arch/powerpc/include/asm/exception-64e.h index 6d53f31..6921261 100644 --- a/arch/powerpc/include/asm/exception-64e.h +++ b/arch/powerpc/include/asm/exception-64e.h @@ -62,16 +62,14 @@ #define EX_TLB_ESR ( 9 * 8) /* Level 0 and 2 only */ #define EX_TLB_SRR0 (10 * 8) #define EX_TLB_SRR1 (11 * 8) -#define EX_TLB_MMUCR0 (12 * 8) /* Level 0 */ -#define EX_TLB_MAS1 (12 * 8) /* Level 0 */ -#define EX_TLB_MAS2 (13 * 8) /* Level 0 */ +#define EX_TLB_PACA (12 * 8) #ifdef CONFIG_BOOK3E_MMU_TLB_STATS -#define EX_TLB_R8 (14 * 8) -#define EX_TLB_R9 (15 * 8) -#define EX_TLB_LR (16 * 8) -#define EX_TLB_SIZE (17 * 8) +#define EX_TLB_R8 (13 * 8) +#define EX_TLB_R9 (14 * 8) +#define EX_TLB_LR (15 * 8) +#define EX_TLB_SIZE (16 * 8) #else -#define EX_TLB_SIZE (14 * 8) +#define EX_TLB_SIZE (13 * 8) #endif #define START_EXCEPTION(label) \ @@ -98,7 +96,7 @@ exc_##label##_book3e: std r11,EX_TLB_R11(r12); \ mfspr r11,SPRN_SPRG_TLB_SCRATCH; \ std r13,EX_TLB_R13(r12); \ - mfspr r13,SPRN_SPRG_PACA; \ + ld r13,EX_TLB_PACA(r12); \ std r14,EX_TLB_R14(r12); \ addi r14,r12,EX_TLB_SIZE; \ std r15,EX_TLB_R15(r12); \ diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index 102244e..814dae2 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c @@ -151,6 +151,11 @@ void __init initialise_paca(struct paca_struct *new_paca, int cpu) #ifdef CONFIG_PPC_STD_MMU_64 new_paca->slb_shadow_ptr = &slb_shadow[cpu]; #endif /* CONFIG_PPC_STD_MMU_64 */ +#ifdef CONFIG_PPC_BOOK3E + new_paca->extlb[0][EX_TLB_PACA / 8] = (u64)new_paca; + new_paca->extlb[1][EX_TLB_PACA / 8] = (u64)new_paca; + new_paca->extlb[2][EX_TLB_PACA / 8] = (u64)new_paca; +#endif } /* Put the paca pointer into r13 and SPRG_PACA */