All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Andy Whitcroft <apw@shadowen.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	jbeulich@novell.com, schwab@suse.de
Subject: Re: warning: read-write constraint -- 2.6.15-git8 onwards
Date: Thu, 19 Jan 2006 04:03:58 +0100	[thread overview]
Message-ID: <200601190403.59205.ak@suse.de> (raw)
In-Reply-To: <43CE881A.1060403@shadowen.org>

On Wednesday 18 January 2006 19:25, Andy Whitcroft wrote:
> It seems that the following commit causes a bunch of warnings out of
> most of the files in the kernel tree (see below for examples).  Backing
> this out seems to cure them?




> Compiled with:
> 
>     gcc version 3.3.4 (Debian 1:3.3.4-6sarge1)
> 
> -apw
> 
>   CC      arch/x86_64/kernel/process.o
> include/asm/bitops.h: In function `default_idle':
> include/asm/bitops.h:65: warning: read-write constraint does not allow a
> register
> include/asm/bitops.h:65: warning: read-write constraint does not allow a
> register
> include/asm/bitops.h:30: warning: read-write constraint does not allow a
> register
> include/asm/bitops.h:30: warning: read-write constraint does not allow a
> register

I only tested with gcc 4.0 and 4.1 prereleases where it worked just fine.

 __asm__ __volatile__( LOCK_PREFIX
                "btrl %1,%0"
                :"+m" (ADDR)
                :"dIr" (nr));

I tried to covert them from +m to explicit input/output
arguments ("=m" (ADDR) : "0" (ADDR)) to fix your compiler 
but with that I get the the same warning as you with 3.4 with 4.0.
Don't know how else it could be written. 

Ok one could just pass the address and do a full memory clobber, but 
that would be a overly large sledgehammer for the problem.

Jan or Andreas - do you have any suggestions how to fix this or should
we revert back to the old (technically wrong) state which was

    __asm__ __volatile__( LOCK_PREFIX
                "btrl %1,%0"
                :"=m" (ADDR)
                :"dIr" (nr));


Thanks,
-Andi



  reply	other threads:[~2006-01-19  3:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-18 18:25 warning: read-write constraint -- 2.6.15-git8 onwards Andy Whitcroft
2006-01-19  3:03 ` Andi Kleen [this message]
2006-01-20 10:02   ` Jan Beulich

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=200601190403.59205.ak@suse.de \
    --to=ak@suse.de \
    --cc=apw@shadowen.org \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwab@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.