From: mans@mansr.com (Måns Rullgård)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: asm: add readq/writeq methods
Date: Sat, 07 Dec 2013 21:41:39 +0000 [thread overview]
Message-ID: <yw1xd2l8l4oc.fsf@unicorn.mansr.com> (raw)
In-Reply-To: <CAFEAcA9iHdEvr5f7Cv4NB+5Js7BU3gL8Tfh1WhyM0T6Dh7LKWw@mail.gmail.com> (Peter Maydell's message of "Sat, 7 Dec 2013 21:38:09 +0000")
Peter Maydell <peter.maydell@linaro.org> writes:
> On 7 December 2013 16:05, Matthias Mann <M.Mann@arkona-technologies.de> wrote:
>> Add readq/writeq methods for 32 bit ARM to allow transfering 64 bit words over
>> PCIe as a single transfer.
>
>> +#if __LINUX_ARM_ARCH__ >= 5
>> +static inline u64 __raw_readq(const volatile void __iomem *addr)
>> +{
>> + u64 val;
>> +#if __LITTLE_ENDIAN
>> + asm volatile("ldrd %Q1, %R1, %0"
>> + : "+Q" (*(volatile u64 __force *)addr),
>> + "=r" (val));
>> +#else
>> + asm volatile("ldrd %R1, %Q1, %0"
>> + : "+Q" (*(volatile u64 __force *)addr),
>> + "=r" (val));
>> +#endif
>> + return val;
>> +}
>
> Given that ldrd/strd accesses are only a single 64 bit access
> on CPUs with LPAE (on non-LPAE CPUs they may be
> implemented as just a pair of 32 bit accesses) should the
> condition be stricter than just __LINUX_ARM_ARCH__ >= 5 ?
What do actual CPUs, e.g. the A9, do?
--
M?ns Rullg?rd
mans at mansr.com
next prev parent reply other threads:[~2013-12-07 21:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-07 16:05 [PATCH v2] ARM: asm: add readq/writeq methods Matthias Mann
2013-12-07 21:38 ` Peter Maydell
2013-12-07 21:41 ` Måns Rullgård [this message]
2013-12-07 22:02 ` Matthias Mann
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=yw1xd2l8l4oc.fsf@unicorn.mansr.com \
--to=mans@mansr.com \
--cc=linux-arm-kernel@lists.infradead.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