From patchwork Mon Aug 15 17:34:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 1068632 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 p7FHZbDP019563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 15 Aug 2011 17:35:58 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qt13u-0008T8-2l; Mon, 15 Aug 2011 17:34:55 +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 1Qt13k-0006mW-6m; Mon, 15 Aug 2011 17:34:44 +0000 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qt13f-0006kw-6K for linux-arm-kernel@lists.infradead.org; Mon, 15 Aug 2011 17:34:41 +0000 Received: from localhost.localdomain (e102144-lin.cambridge.arm.com [10.1.69.60]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id p7FHXT11009105; Mon, 15 Aug 2011 18:33:29 +0100 (BST) From: Will Deacon To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: s3c24xx: ensure cpu_reset is only called when memory is flat-mapped Date: Mon, 15 Aug 2011 18:34:22 +0100 Message-Id: <1313429662-3145-1-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110815_133439_480895_8D7BC5C0 X-CRM114-Status: GOOD ( 11.91 ) X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [217.140.96.50 listed in list.dnswl.org] -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Will Deacon , Ben Dooks 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: , 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]); Mon, 15 Aug 2011 17:35:58 +0000 (UTC) s3c24xx_pm_restart makes a direct call to arch_reset, without first establishing a 1:1 memory mapping. arch_reset will then call cpu_reset(0), which is designed to be called only with an identity map in place. Following the discussion here: http://lists.infradead.org/pipermail/linux-arm-kernel/2011-July/057281.html This patch ensures that arch_reset is only called via arm_machine_restart so that we have a consistent flat mapping requirement for the MMU-off code. Cc: Ben Dooks Signed-off-by: Will Deacon --- arch/arm/plat-s3c24xx/cpu.c | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-) diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c index c1fc6c6..528930c 100644 --- a/arch/arm/plat-s3c24xx/cpu.c +++ b/arch/arm/plat-s3c24xx/cpu.c @@ -198,18 +198,6 @@ static unsigned long s3c24xx_read_idcode_v4(void) */ static void s3c24xx_pm_restart(char mode, const char *cmd) { - if (mode != 's') { - unsigned long flags; - - local_irq_save(flags); - __cpuc_flush_kern_all(); - __cpuc_flush_user_all(); - - arch_reset(mode, cmd); - local_irq_restore(flags); - } - - /* fallback, or unhandled */ arm_machine_restart(mode, cmd); }