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: 6807621 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D20A2C05AC for ; Thu, 16 Jul 2015 14:39:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0B06220673 for ; Thu, 16 Jul 2015 14:39:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 209B02065D for ; Thu, 16 Jul 2015 14:39:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754574AbbGPOjT (ORCPT ); Thu, 16 Jul 2015 10:39:19 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:40903 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754363AbbGPOis (ORCPT ); Thu, 16 Jul 2015 10:38:48 -0400 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, Chris Brandt 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> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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}