Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755748AbbGPOjU (ORCPT ); Thu, 16 Jul 2015 10:39:20 -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 X-IronPort-AV: E=Sophos;i="5.15,488,1432566000"; d="scan'208";a="190502105" 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 970 Lines: 33 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} -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/