[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFBinCDbxTo9B5nfP=etv+DBwwf3_L7PaRr2Fck2pELwwLQnLg@mail.gmail.com>
Date: Sun, 19 Sep 2021 22:04:05 +0200
From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To: Neil Armstrong <narmstrong@...libre.com>
Cc: ulf.hansson@...aro.org, linux-mmc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org,
Christian Hewitt <christianshewitt@...il.com>
Subject: Re: [PATCH] mmc: meson-gx: do not use memcpy_to/fromio for dram-access-quirk
On Mon, Sep 13, 2021 at 10:05 AM Neil Armstrong <narmstrong@...libre.com> wrote:
>
> The memory at the end of the controller only accepts 32bit read/write
> accesses, but the arm64 memcpy_to/fromio implementation only uses 64bit
> (which will be split into two 32bit access) and 8bit leading to incomplete
> copies to/from this memory when the buffer is not multiple of 8bytes.
>
> Add a local copy using writel/readl accesses to make sure we use the right
> memory access width.
>
> The switch to memcpy_to/fromio was done because of 285133040e6c
> ("arm64: Import latest memcpy()/memmove() implementation"), but using memcpy
> worked before since it mainly used 32bit memory acceses.
>
> Fixes: 103a5348c22c ("mmc: meson-gx: use memcpy_to/fromio for dram-access-quirk")
> Reported-by: Christian Hewitt <christianshewitt@...il.com>
> Suggested-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
> Signed-off-by: Neil Armstrong <narmstrong@...libre.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Powered by blists - more mailing lists