Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933559AbbELRvy (ORCPT ); Tue, 12 May 2015 13:51:54 -0400 Received: from g4t3425.houston.hp.com ([15.201.208.53]:46342 "EHLO g4t3425.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932984AbbELRvw (ORCPT ); Tue, 12 May 2015 13:51:52 -0400 Message-ID: <55523DAE.2080605@hp.com> Date: Tue, 12 May 2015 13:51:42 -0400 From: Waiman Long User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 MIME-Version: 1.0 To: Ingo Molnar CC: Linus Torvalds , Peter Zijlstra , Peter Anvin , Brian Gerst , Thomas Gleixner , Borislav Petkov , Peter Zijlstra , Andy Lutomirski , Louis Langholtz , Denys Vlasenko , linux-kernel@vger.kernel.org Subject: Re: [tip:x86/build] x86/build: Remove -Wno-sign-compare References: <20150512084415.GA6535@gmail.com> <20150512085303.GA9090@gmail.com> In-Reply-To: <20150512085303.GA9090@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3015 Lines: 66 On 05/12/2015 04:53 AM, Ingo Molnar wrote: > * Ingo Molnar wrote: > >> Here's the full list of warnings for allmod64: >> >> make bzImage: >> >> include/linux/blkdev.h:624:26: warning: switch condition has boolean value [-Wswitch-bool] >> ./arch/x86/include/asm/qspinlock.h:28:2: warning: implicit declaration of function ?pv_queued_spin_lock_slowpath? [-Wimplicit-function-declaration] >> ./arch/x86/include/asm/qspinlock.h:33:2: warning: implicit declaration of function ?pv_queued_spin_unlock? [-Wimplicit-function-declaration] >> ./arch/x86/include/asm/qspinlock.h:28:2: warning: implicit declaration of function ?pv_queued_spin_lock_slowpath? [-Wimplicit-function-declaration] >> ./arch/x86/include/asm/qspinlock.h:33:2: warning: implicit declaration of function ?pv_queued_spin_unlock? [-Wimplicit-function-declaration] >> ./arch/x86/include/asm/qspinlock.h:28:2: warning: implicit declaration of function ?pv_queued_spin_lock_slowpath? [-Wimplicit-function-declaration] >> ./arch/x86/include/asm/qspinlock.h:33:2: warning: implicit declaration of function ?pv_queued_spin_unlock? [-Wimplicit-function-declaration] >> ./arch/x86/include/asm/qspinlock.h:28:2: warning: implicit declaration of function ?pv_queued_spin_lock_slowpath? [-Wimplicit-function-declaration] >> ./arch/x86/include/asm/qspinlock.h:33:2: warning: implicit declaration of function ?pv_queued_spin_unlock? [-Wimplicit-function-declaration] > And that comes from tip:locking/core, but those warnings do not show > up with GCC 4.9.2: so it's either a GCC 5.0.1 bug, or we missed > something with the WIP queued pv spinlocks changes that newer GCC is > able to notice. > > Thanks, > > Ingo The only way this can happen is when __ASSEMBLY__ is defined and asm/qspinlock.h is included. Could you apply the following patch to see if it can fix the compilation warnings? I don't have a gcc 5 compiler on hand to verify that. Cheers, Longman --- arch/x86/include/asm/qspinlock.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/x86/include/asm/qspinlock.h b/arch/x86/include/asm/qspinlock.h index 9d51fae..3ea1c57 100644 --- a/arch/x86/include/asm/qspinlock.h +++ b/arch/x86/include/asm/qspinlock.h @@ -17,7 +17,10 @@ static inline void native_queued_spin_unlock(struct qspinlock *lock) smp_store_release((u8 *)lock, 0); } -#ifdef CONFIG_PARAVIRT_SPINLOCKS +/* + * Disable the PV code for assembly to prevent compilation warnings. + */ +#if defined(CONFIG_PARAVIRT_SPINLOCKS) && !defined(__ASSEMBLY__) extern void native_queued_spin_lock_slowpath(struct qspinlock *lock, u32 val); extern void __pv_init_lock_hash(void); extern void __pv_queued_spin_lock_slowpath(struct qspinlock *lock, u32 val); -- -- 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/