From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:39722 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751938AbeBEIdT (ORCPT ); Mon, 5 Feb 2018 03:33:19 -0500 Received: by mail-wm0-f68.google.com with SMTP id b21so24053798wme.4 for ; Mon, 05 Feb 2018 00:33:18 -0800 (PST) Date: Mon, 5 Feb 2018 09:33:16 +0100 From: Christoffer Dall To: Arnd Bergmann Cc: Marc Zyngier , Russell King , Nicolas Pitre , Andi Kleen , Richard Earnshaw , Tamar Christina , "# 3.4.x" , Julien Thierry , Linux ARM , kvmarm@lists.cs.columbia.edu, Linux Kernel Mailing List Subject: Re: [PATCH 1/2] ARM: kvm: fix building with gcc-8 Message-ID: <20180205083316.GR21802@cbox> References: <20180202150756.420422-1-arnd@arndb.de> <20180204184517.GQ21802@cbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: On Sun, Feb 04, 2018 at 09:57:49PM +0100, Arnd Bergmann wrote: > On Sun, Feb 4, 2018 at 7:45 PM, Christoffer Dall > wrote: > > Hi Arnd, > > > > On Fri, Feb 02, 2018 at 04:07:34PM +0100, Arnd Bergmann wrote: > >> In banked-sr.c, we use a top-level '__asm__(".arch_extension virt")' > >> statement to allow compilation of a multi-CPU kernel for ARMv6 > >> and older ARMv7-A that don't normally support access to the banked > >> registers. > >> > >> This is considered to be a programming error by the gcc developers > >> and will no longer work in gcc-8, where we now get a build error: > >> > >> /tmp/cc4Qy7GR.s:34: Error: Banked registers are not available with this architecture. -- `mrs r3,SP_usr' > >> /tmp/cc4Qy7GR.s:41: Error: Banked registers are not available with this architecture. -- `mrs r3,ELR_hyp' > >> /tmp/cc4Qy7GR.s:55: Error: Banked registers are not available with this architecture. -- `mrs r3,SP_svc' > >> /tmp/cc4Qy7GR.s:62: Error: Banked registers are not available with this architecture. -- `mrs r3,LR_svc' > >> /tmp/cc4Qy7GR.s:69: Error: Banked registers are not available with this architecture. -- `mrs r3,SPSR_svc' > >> /tmp/cc4Qy7GR.s:76: Error: Banked registers are not available with this architecture. -- `mrs r3,SP_abt' > >> > >> Passign the '-march-armv7ve' flag to gcc works, and is ok here, because > >> we know the functions won't ever be called on pre-ARMv7VE machines. > >> Unfortunately, older compiler versions (4.8 and earlier) do not understand > >> that flag, so we still need to keep the asm around. > > > > Does "not understand" mean "ignores" or do we get an error? > > We get an error, which is why I used the $(call cc-option) Makefile > helper to check if the compiler supports it. > Right. > >> Backporting to stable kernels (4.6+) is needed to allow those to be built > >> with future compilers as well. > > > > This builds on the toolchains I have on my machine, so: > > > > Acked-by: Christoffer Dall > > > > Are you applying this via a tree with other fixes or would you like me > > to carry it in the kvmarm tree? > > Please pick it up in your tree. > Will do. Thanks, -Christoffer