From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755718Ab0KVNhm (ORCPT ); Mon, 22 Nov 2010 08:37:42 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:41299 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752277Ab0KVNhl (ORCPT ); Mon, 22 Nov 2010 08:37:41 -0500 Date: Mon, 22 Nov 2010 13:37:28 +0000 From: Russell King - ARM Linux To: Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 13/20] ARM: LPAE: Add SMP support for the 3-level page table format Message-ID: <20101122133728.GJ31227@n2100.arm.linux.org.uk> References: <1289584840-18097-1-git-send-email-catalin.marinas@arm.com> <1289584840-18097-14-git-send-email-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1289584840-18097-14-git-send-email-catalin.marinas@arm.com> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 12, 2010 at 06:00:33PM +0000, Catalin Marinas wrote: > With 3-level page tables, starting secondary CPUs required allocating > the pgd as well. Since LPAE Linux uses TTBR1 for the kernel page tables, > this patch reorders the CPU setup call in the head.S file so that the > swapper_pg_dir is used. TTBR0 is set to the value generated by the > primary CPU. > Signed-off-by: Catalin Marinas > --- > arch/arm/kernel/head.S | 10 +++++----- > arch/arm/kernel/smp.c | 39 +++++++++++++++++++++++++++++++++++++-- > 2 files changed, 42 insertions(+), 7 deletions(-) > > diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S > index fd8a29e..b54d00e 100644 > --- a/arch/arm/kernel/head.S > +++ b/arch/arm/kernel/head.S > @@ -321,6 +321,10 @@ ENTRY(secondary_startup) > moveq r0, #'p' @ yes, error 'p' > beq __error_p > > + pgtbl r4 > + add r12, r10, #BSYM(PROCINFO_INITFUNC) > + blx r12 @ initialise processor > + @ (return control reg) I really don't like this being different in ordering from the boot CPU bring up. If we want to have the init function dealing with split page tables, we should pass in two pointers for it in both paths. From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@arm.linux.org.uk (Russell King - ARM Linux) Date: Mon, 22 Nov 2010 13:37:28 +0000 Subject: [PATCH v2 13/20] ARM: LPAE: Add SMP support for the 3-level page table format In-Reply-To: <1289584840-18097-14-git-send-email-catalin.marinas@arm.com> References: <1289584840-18097-1-git-send-email-catalin.marinas@arm.com> <1289584840-18097-14-git-send-email-catalin.marinas@arm.com> Message-ID: <20101122133728.GJ31227@n2100.arm.linux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Nov 12, 2010 at 06:00:33PM +0000, Catalin Marinas wrote: > With 3-level page tables, starting secondary CPUs required allocating > the pgd as well. Since LPAE Linux uses TTBR1 for the kernel page tables, > this patch reorders the CPU setup call in the head.S file so that the > swapper_pg_dir is used. TTBR0 is set to the value generated by the > primary CPU. > Signed-off-by: Catalin Marinas > --- > arch/arm/kernel/head.S | 10 +++++----- > arch/arm/kernel/smp.c | 39 +++++++++++++++++++++++++++++++++++++-- > 2 files changed, 42 insertions(+), 7 deletions(-) > > diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S > index fd8a29e..b54d00e 100644 > --- a/arch/arm/kernel/head.S > +++ b/arch/arm/kernel/head.S > @@ -321,6 +321,10 @@ ENTRY(secondary_startup) > moveq r0, #'p' @ yes, error 'p' > beq __error_p > > + pgtbl r4 > + add r12, r10, #BSYM(PROCINFO_INITFUNC) > + blx r12 @ initialise processor > + @ (return control reg) I really don't like this being different in ordering from the boot CPU bring up. If we want to have the init function dealing with split page tables, we should pass in two pointers for it in both paths.