From patchwork Thu May 19 06:26:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 796292 Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4J6LO23000812 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 19 May 2011 06:21:45 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QMwZw-0004rw-7O; Thu, 19 May 2011 06:19:24 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QMwZu-0001AA-Ju; Thu, 19 May 2011 06:19:22 +0000 Received: from mail-pz0-f49.google.com ([209.85.210.49]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QMwZr-00019s-26 for linux-arm-kernel@lists.infradead.org; Thu, 19 May 2011 06:19:19 +0000 Received: by pzk28 with SMTP id 28so1229006pzk.36 for ; Wed, 18 May 2011 23:19:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:date:message-id:subject; bh=li8leWDHAvuijLFE5prtqz/+xAODtgE7QK8LMrBIA+0=; b=AnmMhhhDmvFbVMsAPOQj1n3kA90KGTHUL+xc8oZzn/XQcqRXlF1hKQONyxXoILsecH S0ay/AeScX4j1wYMK85nD+qvNSj+oO3vEeYcIuRePGgVYn9Pjf8eihrRNNkbKtNjD9vS mRzQzqdfUZGHYjj3a1FPk0V2EadiNc9roap/8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=xNfME/+9WcbdPfcMzg1m5ki9sCBOeuwBM/wdTG8wCpUDIW5sD/EBVwUNGmTA+MWbRY FvX2No6z04yBAuiJOWem642Q3GKn2FRYDex7jKiPMYd5cqwmOSVBwhgG9UKJvQeJyWJo mU0gq7HvR4EafnI1rIRI98E6MHZK+8knE+RIY= Received: by 10.142.248.41 with SMTP id v41mr1705003wfh.323.1305785956445; Wed, 18 May 2011 23:19:16 -0700 (PDT) Received: from [127.0.0.1] (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id i7sm1547779pbs.7.2011.05.18.23.19.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 May 2011 23:19:15 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Thu, 19 May 2011 15:26:20 +0900 Message-Id: <20110519062620.27921.52669.sendpatchset@t400s> Subject: [PATCH] ARM: mach-shmobile: sh73a0 twd_base fix X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110519_021919_269166_1665D0B9 X-CRM114-Status: GOOD ( 11.52 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (magnus.damm[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: linux@arm.linux.org.uk, lethal@linux-sh.org, Magnus Damm , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 19 May 2011 06:21:45 +0000 (UTC) From: Magnus Damm Fix the case of too late twd_base initialization for SMP on sh73a0 which bas been broken because sh73a0 specific smp_prepare_cpu() and percpu_timer_setup() changed order in the commits: 05c74a6cbcfb416286a947668ba32f63d99fe74a c413521eb4e2d7ffd5ce432a144708d479054bd3 Without this fix the sh73a0 SMP kernel panics on boot. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/smp-sh73a0.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- 0001/arch/arm/mach-shmobile/smp-sh73a0.c +++ work/arch/arm/mach-shmobile/smp-sh73a0.c 2011-05-19 14:50:24.000000000 +0900 @@ -59,6 +59,11 @@ unsigned int __init sh73a0_get_core_coun { void __iomem *scu_base = scu_base_addr(); +#ifdef CONFIG_HAVE_ARM_TWD + /* twd_base needs to be initialized before percpu_timer_setup() */ + twd_base = (void __iomem *)0xf0000600; +#endif + return scu_get_core_count(scu_base); } @@ -82,10 +87,6 @@ int __cpuinit sh73a0_boot_secondary(unsi void __init sh73a0_smp_prepare_cpus(void) { -#ifdef CONFIG_HAVE_ARM_TWD - twd_base = (void __iomem *)0xf0000600; -#endif - scu_enable(scu_base_addr()); /* Map the reset vector (in headsmp.S) */