From patchwork Thu Jul 16 14:37:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Brandt X-Patchwork-Id: 6807641 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A8F149F380 for ; Thu, 16 Jul 2015 14:41:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9E8220673 for ; Thu, 16 Jul 2015 14:41:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 211792065D for ; Thu, 16 Jul 2015 14:41:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZFkJi-00055q-40; Thu, 16 Jul 2015 14:39:18 +0000 Received: from relmlor2.renesas.com ([210.160.252.172] helo=relmlie1.idc.renesas.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZFkJZ-0004sn-7E for linux-arm-kernel@lists.infradead.org; Thu, 16 Jul 2015 14:39:09 +0000 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 16 Jul 2015 23:38:46 +0900 Received: from relmlac3.idc.renesas.com (relmlac3.idc.renesas.com [10.200.69.23]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 3657B4165D; Thu, 16 Jul 2015 23:38:46 +0900 (JST) Received: by relmlac3.idc.renesas.com (Postfix, from userid 0) id 16CD01806F; Thu, 16 Jul 2015 23:38:45 +0900 (JST) Received: from relmlac3.idc.renesas.com (localhost [127.0.0.1]) by relmlac3.idc.renesas.com (Postfix) with ESMTP id EC20B1800A; Thu, 16 Jul 2015 23:38:45 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac3.idc.renesas.com with ESMTP id ZAM14119; Thu, 16 Jul 2015 23:38:45 +0900 X-IronPort-AV: E=Sophos;i="5.15,488,1432566000"; d="scan'208";a="190502105" Received: from unknown (HELO rtamta01.rta.renesas.com) ([143.103.48.75]) by relmlii1.idc.renesas.com with ESMTP; 16 Jul 2015 23:38:44 +0900 Received: from localhost.localdomain (unknown [172.27.49.110]) by rtamta01.rta.renesas.com (Postfix) with ESMTP id 1FC3550E; Thu, 16 Jul 2015 14:38:24 +0000 (UTC) From: Chris Brandt To: linux@arm.linux.org.uk, arnd@arndb.de Subject: [PATCH 1/2] ARM: xip: Can't use text area as stack Date: Thu, 16 Jul 2015 10:37:13 -0400 Message-Id: <1437057434-1616-2-git-send-email-chris.brandt@renesas.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1437057434-1616-1-git-send-email-chris.brandt@renesas.com> References: <1437057434-1616-1-git-send-email-chris.brandt@renesas.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150716_073909_372032_E81E9EDB X-CRM114-Status: UNSURE ( 5.95 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -3.9 (---) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chris Brandt , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For an XIP_KERNEL build, ROM and RAM are separated, so we can't reserve code space to serve as a temporary stack. Signed-off-by: Chris Brandt --- arch/arm/mm/proc-v7.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 0716bbe..8559449 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -412,7 +412,11 @@ __v7_pj4b_setup: #endif /* CONFIG_CPU_PJ4B */ __v7_setup: +#ifndef CONFIG_XIP_KERNEL adr r12, __v7_setup_stack @ the local stack +#else + ldr r12, =PLAT_PHYS_OFFSET @ the local stack +#endif stmia r12, {r0-r5, r7, r9, r11, lr} bl v7_invalidate_l1 ldmia r12, {r0-r5, r7, r9, r11, lr}