From patchwork Tue Jun 21 05:33:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inderpal Singh X-Patchwork-Id: 899802 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5L5YCrU006277 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 21 Jun 2011 05:34:33 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QYtbB-0003kv-Sq; Tue, 21 Jun 2011 05:34:05 +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 1QYtbB-0006gI-HC; Tue, 21 Jun 2011 05:34:05 +0000 Received: from mail-vw0-f49.google.com ([209.85.212.49]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QYtb4-0006fz-Q9 for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2011 05:34:03 +0000 Received: by vws8 with SMTP id 8so3632137vws.36 for ; Mon, 20 Jun 2011 22:33:57 -0700 (PDT) Received: by 10.52.175.129 with SMTP id ca1mr1259706vdc.168.1308634437388; Mon, 20 Jun 2011 22:33:57 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id du6sm2032050vdb.45.2011.06.20.22.33.54 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Jun 2011 22:33:56 -0700 (PDT) From: Inderpal Singh To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: EXYNOS4: Fix secondary CPU boot after wake-up Date: Tue, 21 Jun 2011 11:03:05 +0530 Message-Id: <1308634385-8544-1-git-send-email-inderpal.singh@linaro.org> X-Mailer: git-send-email 1.7.1 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110621_013358_917978_477D9D89 X-CRM114-Status: GOOD ( 13.44 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.212.49 listed in list.dnswl.org] Cc: kgene.kim@samsung.com, samsung@lists.linaro.org, Inderpal Singh , inderpal.s@samsung.com 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 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Jun 2011 05:34:33 +0000 (UTC) 1. After wake-up, the system-wide flags register loses its value. Hence, write the address of secondary startup function to successfully boot the secondary CPU. 2. Changes SGI1 to SGI0 for secondary CPU boot up Signed-off-by: Inderpal Singh --- 1. The below patch is mandatory to boot secondary CPU after wake-up from sleep http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/4850 2. The change SGI1 to SGI0 for secondary CPU boot up is done as discussed at following link http://comments.gmane.org/gmane.linux.kernel.samsung-soc/4877 arch/arm/mach-exynos4/platsmp.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c index c5e65a0..061260c 100644 --- a/arch/arm/mach-exynos4/platsmp.c +++ b/arch/arm/mach-exynos4/platsmp.c @@ -101,11 +101,18 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) write_pen_release(cpu); /* + * After wake-up, the system-wide flags register loses its value. + * Hence, write the address of secondary startup function again. + */ + __raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)), S5P_VA_SYSRAM); + + + /* * Send the secondary CPU a soft interrupt, thereby causing * the boot monitor to read the system wide flags register, * and branch to the address found there. */ - gic_raise_softirq(cpumask_of(cpu), 1); + gic_raise_softirq(cpumask_of(cpu), 0); timeout = jiffies + (1 * HZ); while (time_before(jiffies, timeout)) {