Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751122AbbHLRil (ORCPT ); Wed, 12 Aug 2015 13:38:41 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:50815 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751025AbbHLRij (ORCPT ); Wed, 12 Aug 2015 13:38:39 -0400 Date: Wed, 12 Aug 2015 19:38:23 +0200 From: Peter Zijlstra To: Boris Ostrovsky Cc: Stephen Rothwell , Jeremy Fitzhardinge , Konrad Rzeszutek Wilk , Stefano Stabellini , Xen Devel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Lutomirski , David Vrabel Subject: Re: linux-next: manual merge of the xen-tip tree with the tip tree Message-ID: <20150812173823.GG18673@twins.programming.kicks-ass.net> References: <20150812150954.36bc605c@canb.auug.org.au> <55CB49CA.8050305@oracle.com> <20150812172105.GW16853@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150812172105.GW16853@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2259 Lines: 55 On Wed, Aug 12, 2015 at 07:21:05PM +0200, Peter Zijlstra wrote: > On Wed, Aug 12, 2015 at 09:27:38AM -0400, Boris Ostrovsky wrote: > > > Incidentally, 11276d53 ("locking/static_keys: Add a new static_key > > interface") breaks old-ish compilers (gcc version 4.4.4 20100503 (Red Hat > > 4.4.4-2) (GCC)): > > > > > > > > CC arch/x86/kernel/nmi.o > > In file included from > > /home/build/linux-boris/include/linux/jump_label.h:109, > > from > > /home/build/linux-boris/arch/x86/include/asm/spinlock.h:5, > > from /home/build/linux-boris/include/linux/spinlock.h:88, > > from /home/build/linux-boris/arch/x86/kernel/nmi.c:14: > > /home/build/linux-boris/arch/x86/include/asm/jump_label.h: In function > > ‘nmi_handle’: > > /home/build/linux-boris/arch/x86/include/asm/jump_label.h:21: warning: asm > > operand 0 probably doesn’t match constraints > > /home/build/linux-boris/arch/x86/include/asm/jump_label.h:21: error: > > impossible constraint in ‘asm’ > > make[3]: *** [arch/x86/kernel/nmi.o] Error 1 > > make[2]: *** [arch/x86/kernel] Error 2 > > make[1]: *** [arch/x86] Error 2 > > Ugh bugger. > > I bet its that: &((char *)key)[branch] business, an earlier variant > thereof tripped up more recent GCCs too. > > So its an __always_inline function, and both argument are always compile > time constants, @key is the address of an object in static storage (a > global) and @branch is a simple 0/1 at the call site. > > Now we wish to compute (unsigned long)key + branch at compile/link time > to feed to the assembler as an immediate, which should be possible, > given its all 'constants'. > > It just appears GCC is having a hard time with this. > > Let me see if I have a sufficiently old GCC around to play with. So both my 4.4 compilers: gcc-4.4 (Ubuntu/Linaro 4.4.7-8ubuntu1) 4.4.7 gcc-4.4 (Debian 4.4.7-2) 4.4.7 Do not have CC_HAVE_ASM_GOTO at all, and my gcc-4.6 (my next oldest compiler) doesn't have trouble building this. -- 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/