From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from relay12.mail.gandi.net ([217.70.178.232]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i2d66-00087p-EM for barebox@lists.infradead.org; Tue, 27 Aug 2019 15:09:30 +0000 Received: from geraet.pengutronix.de (hazel.nat.pengutronix.de [85.220.165.66]) (Authenticated sender: ahmad@a3f.at) by relay12.mail.gandi.net (Postfix) with ESMTPSA id C595E200010 for ; Tue, 27 Aug 2019 15:09:24 +0000 (UTC) From: Ahmad Fatoum Date: Tue, 27 Aug 2019 17:09:09 +0200 Message-Id: <20190827150918.16247-2-ahmad@a3f.at> In-Reply-To: <20190827150918.16247-1-ahmad@a3f.at> References: <20190827150918.16247-1-ahmad@a3f.at> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 01/10] Kconfig: create Kconfig symbol for ARCH_HAS_STACK_DUMP To: barebox@lists.infradead.org Other arch-specific features are exposed in Kconfig too, so do here likewise. Signed-off-by: Ahmad Fatoum --- arch/arm/Kconfig | 1 + arch/arm/cpu/Kconfig | 1 + arch/arm/include/asm/barebox.h | 8 -------- include/common.h | 2 +- lib/Kconfig | 3 +++ 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 931a16599f46..95ec2d9079ca 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -423,6 +423,7 @@ config ARM_EXCEPTIONS config ARM_UNWIND bool "enable stack unwinding support" depends on AEABI + select ARCH_HAS_STACK_DUMP help This option enables stack unwinding support in barebox using the information automatically generated by the diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig index f8abbccfca62..6b4fed526988 100644 --- a/arch/arm/cpu/Kconfig +++ b/arch/arm/cpu/Kconfig @@ -87,6 +87,7 @@ config CPU_V8 select CPU_SUPPORTS_64BIT_KERNEL select ARM_EXCEPTIONS select GENERIC_FIND_NEXT_BIT + select ARCH_HAS_STACK_DUMP config CPU_XSC3 bool diff --git a/arch/arm/include/asm/barebox.h b/arch/arm/include/asm/barebox.h index 4e89466593be..38d3a0943e18 100644 --- a/arch/arm/include/asm/barebox.h +++ b/arch/arm/include/asm/barebox.h @@ -1,14 +1,6 @@ #ifndef _BAREBOX_H_ #define _BAREBOX_H_ 1 -#ifdef CONFIG_ARM_UNWIND -#define ARCH_HAS_STACK_DUMP -#endif - -#ifdef CONFIG_CPU_V8 -#define ARCH_HAS_STACK_DUMP -#endif - #ifdef CONFIG_ARM_EXCEPTIONS #define ARCH_HAS_DATA_ABORT_MASK #endif diff --git a/include/common.h b/include/common.h index 8cc8e14fb7fc..ebb2ecef5c2a 100644 --- a/include/common.h +++ b/include/common.h @@ -72,7 +72,7 @@ int ctrlc(void); int arch_ctrlc(void); void ctrlc_handled(void); -#ifdef ARCH_HAS_STACK_DUMP +#ifdef CONFIG_ARCH_HAS_STACK_DUMP void dump_stack(void); #else static inline void dump_stack(void) diff --git a/lib/Kconfig b/lib/Kconfig index f75eba922085..53289e696509 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -165,4 +165,7 @@ config BLOBGEN select BASE64 bool "include blob encode/decode support" +config ARCH_HAS_STACK_DUMP + bool + endmenu -- 2.20.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox