From patchwork Sat Jan 26 20:59:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 2050441 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 56D8A3FD86 for ; Sat, 26 Jan 2013 21:01:51 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TzCqJ-00017Q-Gi; Sat, 26 Jan 2013 20:59:15 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TzCqE-00016b-Vx for linux-arm-kernel@lists.infradead.org; Sat, 26 Jan 2013 20:59:13 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 41BE680FD9; Sat, 26 Jan 2013 21:59:07 +0100 (CET) Date: Sat, 26 Jan 2013 21:59:05 +0100 From: Pavel Machek To: Dinh Nguyen Subject: Re: [PATCHv1 for soc 5/5] arm: socfpga: Add SMP support for actual socfpga harware Message-ID: <20130126205905.GA3006@amd.pavel.ucw.cz> References: <1359075633-13502-1-git-send-email-dinguyen@altera.com> <1359075633-13502-6-git-send-email-dinguyen@altera.com> <20130125175511.GE10055@amd.pavel.ucw.cz> <1359147770.32148.28.camel@linux-builds1> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1359147770.32148.28.camel@linux-builds1> User-Agent: Mutt/1.5.20 (2009-06-14) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130126_155911_135486_8194B4DA X-CRM114-Status: GOOD ( 17.99 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [195.113.26.193 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Olof Johansson , linux@arm.linux.org.uk, Arnd Bergmann , linux-arm-kernel@lists.infradead.org, wd@denx.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hi! > > > Because the CPU1 start address is different for socfpga-vt and > > > socfpga-cyclone5, we add code to use the correct CPU1 start addr. > > > > > > +++ b/arch/arm/configs/socfpga_defconfig > > > @@ -21,6 +21,7 @@ CONFIG_ARM_THUMBEE=y > > > # CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set > > > # CONFIG_CACHE_L2X0 is not set > > > CONFIG_HIGH_RES_TIMERS=y > > > +CONFIG_VMSPLIT_2G=y > > > CONFIG_SMP=y > > > CONFIG_NR_CPUS=2 > > > CONFIG_AEABI=y > > > > Is this related to CPU1 start address? > > Yes, it's really only necessary when running the virtual simulator. Aha, but defconfig does not mean that people will not try that config (and it may be useful for multiarch kernels etc). If we don't know what the cause is, what about this? Remove unneccessary #ifdef. socfpga will not boot in VMSPLIT_3G mode on emulator for some reason. Warn when such configuration is detected, and fall back to UP mode (so that user has chance to read the message). Thanks, Pavel Signed-off-by: Pavel Machek diff --git a/arch/arm/mach-socfpga/headsmp.S b/arch/arm/mach-socfpga/headsmp.S index 44cd055..dabf325 100644 --- a/arch/arm/mach-socfpga/headsmp.S +++ b/arch/arm/mach-socfpga/headsmp.S @@ -23,9 +23,7 @@ ENTRY(secondary_trampoline) ENTRY(secondary_trampoline_end) -#ifdef CONFIG_SMP ENTRY(v7_secondary_startup) bl v7_invalidate_l1 b secondary_startup ENDPROC(v7_secondary_startup) -#endif diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c index d54647e..81e0da0 100644 --- a/arch/arm/mach-socfpga/platsmp.c +++ b/arch/arm/mach-socfpga/platsmp.c @@ -75,6 +75,13 @@ static void __init socfpga_smp_init_cpus(void) ncores = scu_get_core_count(socfpga_scu_base_addr); +#ifndef CONFIG_VMSPLIT_2G + if (of_machine_is_compatible("altr,socfpga-vt")) { + printk("Emulator needs VMSPLIT_2G to work in SMP mode.\n"); + early_printk("Emulator needs VMSPLIT_2G to work in SMP mode.\n"); + ncores = 1; + } +#endif for (i = 0; i < ncores; i++) set_cpu_possible(i, true);