Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965543AbcCORlf (ORCPT ); Tue, 15 Mar 2016 13:41:35 -0400 Received: from host.buserror.net ([209.198.135.123]:39612 "EHLO host.buserror.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965132AbcCORld (ORCPT ); Tue, 15 Mar 2016 13:41:33 -0400 Message-ID: <1458063685.12370.28.camel@buserror.net> From: Scott Wood To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 15 Mar 2016 12:41:25 -0500 In-Reply-To: <20160315130750.0E43C1A2375@localhost.localdomain> References: <20160315130750.0E43C1A2375@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 75.72.173.242 X-SA-Exim-Mail-From: oss@buserror.net X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -15 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Subject: Re: [PATCH v2] powerpc/8xx: Fix do_mtspr_cpu6 build on older compilers X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:57:07 +0000) X-SA-Exim-Scanned: Yes (on host.buserror.net) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1306 Lines: 41 On Tue, 2016-03-15 at 14:07 +0100, Christophe Leroy wrote: > Some versions of GCC, reportedly before 4.8, fail with > arch/powerpc/mm/8xx_mmu.c:139:2: error: memory input 1 is not directly > addressable "before 4.8" means "< 4.8", not "<= 4.8" -- did you mean "before 4.9"? > Change the one-element array into a simple variable to avoid this. > > Signed-off-by: Christophe Leroy > Cc: Scott Wood > --- > Verified with GCC 4.4.4 and GCC 4.8.3 > > v2: compilation result is compliant with CPU6 ERRATA > (using stw/lwz and not stwx/lwzx) > > arch/powerpc/include/asm/reg_8xx.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/include/asm/reg_8xx.h > b/arch/powerpc/include/asm/reg_8xx.h > index d41412c..94d01f8 100644 > --- a/arch/powerpc/include/asm/reg_8xx.h > +++ b/arch/powerpc/include/asm/reg_8xx.h > @@ -53,7 +53,7 @@ > #ifdef CONFIG_8xx_CPU6 > #define do_mtspr_cpu6(rn, rn_addr, v) \ > do { > \ > - int _reg_cpu6 = rn_addr, _tmp_cpu6[1]; \ > + int _reg_cpu6 = rn_addr, _tmp_cpu6; \ > asm volatile("stw %0, %1;" \ > "lwz %0, %1;" \ > "mtspr " __stringify(rn) ",%2" : > \ I thought I tried this with 4.7.2 without success, but now it seems to be working... -Scott