From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: arm64 memcpy_{from|to}io and memset_io
Date: Wed, 14 Oct 2015 17:12:14 +0100 [thread overview]
Message-ID: <20151014161213.GH4239@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <CAC8NTUUgQk0CNaBj2p=38U+yyFWE6ZQkSgs1KA=MviQg3g_X=Q@mail.gmail.com>
On Tue, Oct 13, 2015 at 11:12:18PM -0700, Radha Mohan wrote:
> I see that the memcpy_{from|to}io and memset_io are not in an
> optimized manner. I guess these are just a copy from
> arch/arm/include/asm/io.h where there could be problem with different
> implementations.
I think you may be looking at an older kernel version. In the latest
mainline, memcpy_*io functions are more optimised in the sense that they
use 64-bit accesses if the alignment permits.
> Do we still need these to be byte write ?
No but see above.
> Can we convert them to use a more optimized memcpy ?
There is a risk to converting them to something like memcpy() as the
latter does not guarantee aligned accesses. Alignment is mandatory for
Device memory access.
> We have some drivers, like framebuffer driver using these functions
> and end up writing byte-by-byte. This causes a very poor VGA
> performance.
You probably have an old kernel version.
--
Catalin
next prev parent reply other threads:[~2015-10-14 16:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 6:12 arm64 memcpy_{from|to}io and memset_io Radha Mohan
2015-10-14 8:17 ` Arnd Bergmann
2015-10-14 16:12 ` Catalin Marinas [this message]
2015-10-14 16:16 ` Radha Mohan
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=20151014161213.GH4239@e104818-lin.cambridge.arm.com \
--to=catalin.marinas@arm.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