From: Petr Malat <oss@malat.biz>
To: David Laight <David.Laight@aculab.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Joern Engel <joern@lazybastard.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] mtd: phram: Map RAM using memremap instead of ioremap
Date: Mon, 23 May 2022 17:27:48 +0200 [thread overview]
Message-ID: <Youn9AmqY6/EExDw@ntb.petris.klfree.czf> (raw)
In-Reply-To: <3cab9a7f4ed34ca0b742a62c2bdc3bce@AcuMS.aculab.com>
Hi!
On Mon, May 23, 2022 at 02:51:41PM +0000, David Laight wrote:
> From: Petr Malat
> > Sent: 23 May 2022 15:28
> >
> > One can't use memcpy on memory obtained by ioremap, because IO memory
> > may have different alignment and size access restriction than the system
> > memory. Use memremap as phram driver operates on RAM.
>
> Does that actually help?
> The memcpy() is still likely to issue unaligned accesses
> that the hardware can't handle.
Yes, it solves the issue. Memcpy can cause unaligned access only on
platforms, which can handle it. And on ARM64 it's handled only for
RAM and not for a device memory (__pgprot(PROT_DEVICE_*)).
Petr
next prev parent reply other threads:[~2022-05-23 15:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 14:28 Petr Malat
2022-05-23 14:51 ` David Laight
2022-05-23 15:27 ` Petr Malat [this message]
2022-05-23 16:09 ` David Laight
2022-05-24 7:13 ` Petr Malat
2022-06-07 10:24 ` Petr Malat
2022-05-23 15:00 ` Greg KH
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=Youn9AmqY6/EExDw@ntb.petris.klfree.czf \
--to=oss@malat.biz \
--cc=David.Laight@aculab.com \
--cc=joern@lazybastard.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=stable@vger.kernel.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
all inboxes | Powered by JetHome®