From: christophe leroy <christophe.leroy@c-s.fr>
To: Scott Wood <oss@buserror.net>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2] powerpc/8xx: Fix do_mtspr_cpu6 build on older compilers
Date: Tue, 15 Mar 2016 19:12:28 +0100 [thread overview]
Message-ID: <56E8508C.8010409@c-s.fr> (raw)
In-Reply-To: <1458063685.12370.28.camel@buserror.net>
Le 15/03/2016 18:41, Scott Wood a écrit :
> 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"?
I mean it doesn't fail with 4.8.3
Christophe
>
>> Change the one-element array into a simple variable to avoid this.
>>
>> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
>> Cc: Scott Wood <oss@buserror.net>
>> ---
>> 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
>
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
next prev parent reply other threads:[~2016-03-15 18:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 13:07 [PATCH v2] powerpc/8xx: Fix do_mtspr_cpu6 build on older compilers Christophe Leroy
2016-03-15 17:41 ` Scott Wood
2016-03-15 18:12 ` christophe leroy [this message]
2016-03-16 10:24 ` [v2] " Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56E8508C.8010409@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=oss@buserror.net \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).