LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Laura Abbott <labbott@redhat.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Andreas Krebbel <krebbel@linux.ibm.com>,
	Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390/jump_label: Correct asm contraint
Date: Tue, 29 Jan 2019 08:25:58 +0100	[thread overview]
Message-ID: <898d52cc-fa76-0888-429f-27446190653b@redhat.com> (raw)
In-Reply-To: <20190123132401.GG3424@osiris>

On 1/23/19 5:24 AM, Heiko Carstens wrote:
> On Wed, Jan 23, 2019 at 01:55:13PM +0100, Laura Abbott wrote:
>> There's a build failure with gcc9:
>>
>>   ./arch/s390/include/asm/jump_label.h: Assembler messages:
>>   ./arch/s390/include/asm/jump_label.h:23: Error: bad expression
>>   ./arch/s390/include/asm/jump_label.h:23: Error: junk at end of line, first unrecognized character is `r'
>>   make[1]: *** [scripts/Makefile.build:277: init/main.o] Error 1
>>
>> According to the toolchain people, the actual issue is the use of
>> "X" constraint which is too permissive. Switch to using "i" instead.
>>
>> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1668703
>> Signed-off-by: Laura Abbott <labbott@redhat.com>
>> ---
>>   arch/s390/include/asm/jump_label.h | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/s390/include/asm/jump_label.h b/arch/s390/include/asm/jump_label.h
>> index e2d3e6c43395..41dabfd8518d 100644
>> --- a/arch/s390/include/asm/jump_label.h
>> +++ b/arch/s390/include/asm/jump_label.h
>> @@ -22,7 +22,7 @@ static inline bool arch_static_branch(struct static_key *key, bool branch)
>>   			  ".long	0b-.,%l[label]-.\n"
>>   			  ".quad	%0-.\n"
>>   			  ".popsection\n"
>> -			  : : "X" (&((char *)key)[branch]) : : label);
>> +			  : : "i" (&((char *)key)[branch]) : : label);
>>   	return false;
>>   label:
>>   	return true;
> 
> Hmmm, this works only for the kernel image, but not for modules, which
> we compile with "-fPIC", which again doesn't work as described in the
> referenced bugzilla:
> 
> In file included from ././include/linux/compiler_types.h:68,
>                   from <command-line>:
> ./arch/s390/include/asm/jump_label.h: In function 'kvm_vcpu_ioctl':
> ./include/linux/compiler-gcc.h:124:38: warning: asm operand 0 probably doesn't match constraints
>   #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
>                                        ^~~
> ./arch/s390/include/asm/jump_label.h:19:2: note: in expansion of macro 'asm_volatile_goto'
>    asm_volatile_goto("0: brcl 0,"__stringify(JUMP_LABEL_NOP_OFFSET)"\n"
>    ^~~~~~~~~~~~~~~~~
> ./include/linux/compiler-gcc.h:124:38: error: impossible constraint in 'asm'
>   #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
>                                        ^~~
> ./arch/s390/include/asm/jump_label.h:19:2: note: in expansion of macro 'asm_volatile_goto'
>    asm_volatile_goto("0: brcl 0,"__stringify(JUMP_LABEL_NOP_OFFSET)"\n"
> 
> Andreas, Ilya, any idea how to fix this?
> 

I've had to turn off s390 in Fedora until this gets fixed :(


  reply	other threads:[~2019-01-29  7:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23 12:55 Laura Abbott
2019-01-23 13:24 ` Heiko Carstens
2019-01-29  7:25   ` Laura Abbott [this message]
2019-01-30  8:53     ` Heiko Carstens
2019-02-05 12:43     ` Heiko Carstens
2019-02-09 20:34       ` Laura Abbott
2019-02-20  8:58         ` Heiko Carstens
2019-02-20 18:40           ` Laura Abbott

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=898d52cc-fa76-0888-429f-27446190653b@redhat.com \
    --to=labbott@redhat.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=krebbel@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --subject='Re: [PATCH] s390/jump_label: Correct asm contraint' \
    /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

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).