Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751314AbbLUNDu (ORCPT ); Mon, 21 Dec 2015 08:03:50 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:39964 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbbLUNDt (ORCPT ); Mon, 21 Dec 2015 08:03:49 -0500 Date: Mon, 21 Dec 2015 13:03:38 +0000 From: Russell King - ARM Linux To: Ard Biesheuvel Cc: Will Deacon , Andrew Pinski , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ARM64: Fix compiling with GCC 6 and Atomics enabled Message-ID: <20151221130338.GA8644@n2100.arm.linux.org.uk> References: <1450498655-3820-1-git-send-email-apinski@cavium.com> <20151221123843.GM23092@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2014 Lines: 42 On Mon, Dec 21, 2015 at 01:46:22PM +0100, Ard Biesheuvel wrote: > On 21 December 2015 at 13:38, Will Deacon wrote: > > On Fri, Dec 18, 2015 at 08:17:35PM -0800, Andrew Pinski wrote: > >> The problem here is that GCC 6 and above emits .arch now > >> for each function so now the global .arch_extension has > >> no effect. This fixes the problem by putting > >> .arch_extension inside ARM64_LSE_ATOMIC_INSN so > >> it is enabled for each place where LSE is used. > > > > Hmm, this is going to affect arch/arm/ much more heavily than arch/arm64. > > .arch_extension is used for virt, mp and sec over there, and it may be > > tricky to isolate the actual instruction usage (at least, virt looks > > lost in kvm/arm.c). > > > > Why can't gas have an option to accept all instruction encodings that it > > knows about, inspite of any .arch directives? > > > > Modern GAS supports things like -march=armv7-a+mp+sec+virt, so it > probably makes sense to pass that on the command line when building > for v7 (or +sec only for v6) if the assembler is found to support it > at build time. Modern GCCs (GCC 4 at least) add .arch / .cpu pseudo-instructions in the assembly output which means using -Wa,-march= and -Wa,-mcpu= to GCC are now totally useless. (From the bug reports I've seen, I don't deem GCC 5 to be anything but a total failure, and so as far as I'm concerned, GCC 5 is not to be used for ARM, and effectively doesn't exist. I have no experience or opinions on GCC 6. Hence, "GCC 4" still counts as "modern" being the only recent compilers that produce sane results.) -- RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. -- 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/