linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	u.kleine-koenig@pengutronix.de, simon.kagstrom@netinsight.net,
	akpm@linux-foundation.org, dwmw2@infradead.org,
	linux-arm-kernel@lists.infradead.org, rth@twiddle.net
Subject: Re: [PATCH v2] MTD: Fix Orion NAND driver compilation with ARM OABI
Date: Sat, 24 Apr 2010 04:04:11 +0100	[thread overview]
Message-ID: <20100424030411.GK15349@shareable.org> (raw)
In-Reply-To: <20100424025858.GJ15349@shareable.org>

Jamie Lokier wrote:
> Nicolas Pitre wrote:
> > On Thu, 25 Mar 2010, Jamie Lokier wrote:
> > > Any one of these should fix it:
> > > 
> > >    - Make io_base a pointer-to-volatile-u64 or cast it in the asm, and
> > >      make sure to dereference it and use an "m" constraint (or
> > >      tighter, such as "Q", if ldrd needs it).  It must be u64, not
> > >      pointer-to-void, to tell GCC the size.  That tells GCC which memory
> > >      the asm accesses, and the volatile dereference should tell GCC
> > >      not to reorder them in principle (but the GCC manual doesn't
> > >      make a specific promise about this for asms).
> > 
> > The LDRD has special range constraints on its addressing mode which is 
> > not expressable with any of the available gcc memory constraints.
> 
>     'Q'
>           A memory reference where the exact address is in a single
>           register (''m'' is preferable for 'asm' statements)
> 
> If 'r' is good enough for io_base, 'Q' should be good enough for *io_base.

And if that doesn't work, it's possible to pass both the pointer, and
the dereference, as separate input operands, and only use the pointer
in the asm template.  GCC will still treat the dereference input as a
dependency.

-- Jamie

  reply	other threads:[~2010-04-24  3:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25 15:25 [PATCH v2] MTD: Fix Orion NAND driver compilation with ARM OABI Paulius Zaleckas
2010-03-25 16:26 ` Nicolas Pitre
2010-03-31 12:01   ` Paulius Zaleckas
2010-04-23 11:56     ` Artem Bityutskiy
2010-04-23 12:54       ` Nicolas Pitre
2010-04-23 15:13         ` Artem Bityutskiy
2010-04-23 17:50           ` Nicolas Pitre
2010-04-23 18:00             ` Andrew Morton
2010-04-23 18:22               ` Nicolas Pitre
2010-03-25 20:46 ` Jamie Lokier
2010-04-23 19:06   ` Nicolas Pitre
2010-04-24  2:58     ` Jamie Lokier
2010-04-24  3:04       ` Jamie Lokier [this message]
2010-04-24 13:02       ` Nicolas Pitre

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=20100424030411.GK15349@shareable.org \
    --to=jamie@shareable.org \
    --cc=akpm@linux-foundation.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nico@fluxnic.net \
    --cc=paulius.zaleckas@gmail.com \
    --cc=rth@twiddle.net \
    --cc=simon.kagstrom@netinsight.net \
    --cc=u.kleine-koenig@pengutronix.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 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).