From commits-return-5636-archive-asf-public=cust-asf.ponee.io@nuttx.apache.org Tue Mar 24 09:54:56 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id BED0318065C for ; Tue, 24 Mar 2020 10:54:55 +0100 (CET) Received: (qmail 34589 invoked by uid 500); 24 Mar 2020 09:54:55 -0000 Mailing-List: contact commits-help@nuttx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nuttx.apache.org Delivered-To: mailing list commits@nuttx.apache.org Received: (qmail 34570 invoked by uid 99); 24 Mar 2020 09:54:55 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Mar 2020 09:54:55 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 17B0681A09; Tue, 24 Mar 2020 09:54:55 +0000 (UTC) Date: Tue, 24 Mar 2020 09:54:55 +0000 To: "commits@nuttx.apache.org" Subject: [incubator-nuttx] 01/03: arch/arm: Fix linker error: undefined reference to `g_intstackalloc' MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: aguettouche@apache.org In-Reply-To: <158504369494.13980.939493714304268469@gitbox.apache.org> References: <158504369494.13980.939493714304268469@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-nuttx X-Git-Refname: refs/heads/pr618 X-Git-Reftype: branch X-Git-Rev: 9f48f6352c55ba5f0cadc1d1eb84457f6e18720c X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20200324095455.17B0681A09@gitbox.apache.org> This is an automated email from the ASF dual-hosted git repository. aguettouche pushed a commit to branch pr618 in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git commit 9f48f6352c55ba5f0cadc1d1eb84457f6e18720c Author: Xiang Xiao AuthorDate: Mon Mar 23 19:43:23 2020 +0800 arch/arm: Fix linker error: undefined reference to `g_intstackalloc' when CONFIG_ARCH_INTERRUPTSTACK, CONFIG_SMP and CONFIG_STACK_COLORATION are true Signed-off-by: Xiang Xiao --- arch/arm/src/common/up_checkstack.c | 6 ++++++ arch/arm/src/common/up_initialize.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/arch/arm/src/common/up_checkstack.c b/arch/arm/src/common/up_checkstack.c index fe75ed9..12ce6f7 100644 --- a/arch/arm/src/common/up_checkstack.c +++ b/arch/arm/src/common/up_checkstack.c @@ -211,9 +211,15 @@ ssize_t up_check_stack_remain(void) #if CONFIG_ARCH_INTERRUPTSTACK > 3 size_t up_check_intstack(void) { +#ifdef CONFIG_SMP + return do_stackcheck(up_intstack_base(), + (CONFIG_ARCH_INTERRUPTSTACK & ~3), + true); +#else return do_stackcheck((uintptr_t)&g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~3), true); +#endif } size_t up_check_intstack_remain(void) diff --git a/arch/arm/src/common/up_initialize.c b/arch/arm/src/common/up_initialize.c index 7e802f4..7389b32 100644 --- a/arch/arm/src/common/up_initialize.c +++ b/arch/arm/src/common/up_initialize.c @@ -75,7 +75,11 @@ #if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3 static inline void up_color_intstack(void) { +#ifdef CONFIG_SMP + uint32_t *ptr = (uint32_t *)up_intstack_base(); +#else uint32_t *ptr = (uint32_t *)&g_intstackalloc; +#endif ssize_t size; for (size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);