From: Tom Rini Date: Tue, 10 Jan 2017 18:14:05 -0500 Subject: [U-Boot] [PATCH] armv8: fix #if around spin-table code in start.S In-Reply-To: <1482830383-9092-1-git-send-email-oded.gabbay@gmail.com> References: <1482830383-9092-1-git-send-email-oded.gabbay@gmail.com> Message-ID: <20170110231405.GX7532@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Dec 27, 2016 at 11:19:43AM +0200, Oded Gabbay wrote: > Using CONFIG_IS_ENABLED() doesn't work in SPL. This patch replaces the only > occurrence of CONFIG_IS_ENABLED() in start.S to a regular #if defined(). > It also adds "&& !defined(CONFIG_SPL_BUILD)" to that #if statement because > the spin-table code can't currently work in SPL, and the spin-table file > isn't even compiled in SPL. > > Signed-off-by: Oded Gabbay > --- > arch/arm/cpu/armv8/start.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S > index 4f5f6d8..2f975a0 100644 > --- a/arch/arm/cpu/armv8/start.S > +++ b/arch/arm/cpu/armv8/start.S > @@ -99,7 +99,7 @@ save_boot_params_ret: > /* Processor specific initialization */ > bl lowlevel_init > > -#if CONFIG_IS_ENABLED(ARMV8_SPIN_TABLE) > +#if defined(CONFIG_ARMV8_SPIN_TABLE) && !defined(CONFIG_SPL_BUILD) > branch_if_master x0, x1, master_cpu > b spin_table_secondary_jump > /* never return */ I don't get it, sorry. Looking at include/linux/kconfig.h: CONFIG_IS_ENABLED(ARMV8_SPIN_TABLE) is 1 if CONFIG_ARMV8_SPIN_TABLE and CONFIG_SPL_BUILD is undefined. CONFIG_IS_ENABLED(ARMV8_SPIN_TABLE) is always 0 since CONFIG_SPL_ARMV8_SPIN_TABLE is not a symbol. And since we don't link the spin table objects in outside of SPL, we wouldn't want to try and call those functions. So, what's the bug exactly? Just a lack-of-clarity by using CONFIG_IS_ENABLED(ARMV8_SPIN_TABLE) vs 'defined(CONFIG_ARMV8_SPIN_TABLE) && !defined(CONFIG_SPL_BUILD)' ? Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: