From patchwork Fri Jul 24 09:15:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 30185 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id BF477B7BA3 for ; Fri, 24 Jul 2009 19:29:23 +1000 (EST) Received: by ozlabs.org (Postfix) id B36FBDDD1C; Fri, 24 Jul 2009 19:29:23 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (bilbo.ozlabs.org [203.10.76.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bilbo.ozlabs.org", Issuer "CAcert Class 3 Root" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id B0110DDD1B for ; Fri, 24 Jul 2009 19:29:23 +1000 (EST) Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by bilbo.ozlabs.org (Postfix) with ESMTP id 2AC48101CCB for ; Fri, 24 Jul 2009 19:16:56 +1000 (EST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id BB873B7C9B for ; Fri, 24 Jul 2009 19:15:39 +1000 (EST) Received: by ozlabs.org (Postfix) id AE709DDD04; Fri, 24 Jul 2009 19:15:39 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1030) id AD25FDDD1B; Fri, 24 Jul 2009 19:15:39 +1000 (EST) To: From: Benjamin Herrenschmidt Date: Fri, 24 Jul 2009 19:15:26 +1000 Subject: [PATCH 9/20] powerpc/mm: Call mmu_context_init() from ppc64 (v2) In-Reply-To: <1248426902.401617.944220131651.qpush@grosgo> Message-Id: <20090724091539.AD25FDDD1B@ozlabs.org> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Our 64-bit hash context handling has no init function, but 64-bit Book3E will use the common mmu_context_nohash.c code which does, so define an empty inline mmu_context_init() for 64-bit server and call it from our 64-bit setup_arch() Signed-off-by: Benjamin Herrenschmidt Acked-by: Kumar Gala --- v2. Remove whitespace addition to mmu_context_hash64.c arch/powerpc/include/asm/mmu_context.h | 7 ++++++- arch/powerpc/kernel/setup_64.c | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) --- linux-work.orig/arch/powerpc/include/asm/mmu_context.h 2009-07-22 16:25:25.000000000 +1000 +++ linux-work/arch/powerpc/include/asm/mmu_context.h 2009-07-22 16:25:50.000000000 +1000 @@ -14,7 +14,6 @@ /* * Most if the context management is out of line */ -extern void mmu_context_init(void); extern int init_new_context(struct task_struct *tsk, struct mm_struct *mm); extern void destroy_context(struct mm_struct *mm); @@ -23,6 +22,12 @@ extern void switch_stab(struct task_stru extern void switch_slb(struct task_struct *tsk, struct mm_struct *mm); extern void set_context(unsigned long id, pgd_t *pgd); +#ifdef CONFIG_PPC_BOOK3S_64 +static inline void mmu_context_init(void) { } +#else +extern void mmu_context_init(void); +#endif + /* * switch_mm is the entry point called from the architecture independent * code in kernel/sched.c Index: linux-work/arch/powerpc/kernel/setup_64.c =================================================================== --- linux-work.orig/arch/powerpc/kernel/setup_64.c 2009-07-22 16:26:23.000000000 +1000 +++ linux-work/arch/powerpc/kernel/setup_64.c 2009-07-22 16:26:31.000000000 +1000 @@ -534,6 +534,10 @@ void __init setup_arch(char **cmdline_p) #endif paging_init(); + + /* Initialize the MMU context management stuff */ + mmu_context_init(); + ppc64_boot_msg(0x15, "Setup Done"); }