* [PATCH] remoteproc: meson-mx-ao-arc: fix a bit test
@ 2021-10-04 10:52 Dan Carpenter
2021-10-04 17:09 ` (subset) " Bjorn Andersson
2021-10-04 20:47 ` Martin Blumenstingl
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-10-04 10:52 UTC (permalink / raw)
To: Ohad Ben-Cohen, Martin Blumenstingl
Cc: Bjorn Andersson, Mathieu Poirier, Neil Armstrong, Kevin Hilman,
Jerome Brunet, linux-remoteproc, linux-arm-kernel, linux-amlogic,
kernel-janitors
The MESON_AO_RPROC_SRAM_USABLE_BITS macro is used like this:
if (priv->sram_pa & ~MESON_AO_RPROC_SRAM_USABLE_BITS) {
dev_err(dev, "SRAM address contains unusable bits\n");
The problem is that "->sram_pa" is type phys_addr_t which is potentially
64 bits. That means the MESON_AO_RPROC_SRAM_USABLE_BITS macro needs to
be a 64 bit type as well to ensure that high 32 bits are cleared.
Fixes: 6cb58ea897dd ("remoteproc: meson-mx-ao-arc: Add a driver for the AO ARC remote procesor")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/remoteproc/meson_mx_ao_arc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/remoteproc/meson_mx_ao_arc.c b/drivers/remoteproc/meson_mx_ao_arc.c
index 3d8f927ae448..462cddab6518 100644
--- a/drivers/remoteproc/meson_mx_ao_arc.c
+++ b/drivers/remoteproc/meson_mx_ao_arc.c
@@ -39,7 +39,7 @@
#define AO_SECURE_REG0_AHB_SRAM_BITS_19_12 GENMASK(15, 8)
/* Only bits [31:20] and [17:14] are usable, all other bits must be zero */
-#define MESON_AO_RPROC_SRAM_USABLE_BITS 0xfff3c000
+#define MESON_AO_RPROC_SRAM_USABLE_BITS 0xfff3c000ULL
#define MESON_AO_RPROC_MEMORY_OFFSET 0x10000000
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: (subset) [PATCH] remoteproc: meson-mx-ao-arc: fix a bit test
2021-10-04 10:52 [PATCH] remoteproc: meson-mx-ao-arc: fix a bit test Dan Carpenter
@ 2021-10-04 17:09 ` Bjorn Andersson
2021-10-04 20:47 ` Martin Blumenstingl
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2021-10-04 17:09 UTC (permalink / raw)
To: Martin Blumenstingl, Ohad Ben-Cohen, Dan Carpenter
Cc: linux-amlogic, Jerome Brunet, linux-arm-kernel, kernel-janitors,
Kevin Hilman, Neil Armstrong, linux-remoteproc, Mathieu Poirier
On Mon, 4 Oct 2021 13:52:57 +0300, Dan Carpenter wrote:
> The MESON_AO_RPROC_SRAM_USABLE_BITS macro is used like this:
>
> if (priv->sram_pa & ~MESON_AO_RPROC_SRAM_USABLE_BITS) {
> dev_err(dev, "SRAM address contains unusable bits\n");
>
> The problem is that "->sram_pa" is type phys_addr_t which is potentially
> 64 bits. That means the MESON_AO_RPROC_SRAM_USABLE_BITS macro needs to
> be a 64 bit type as well to ensure that high 32 bits are cleared.
>
> [...]
Applied, thanks!
[1/1] remoteproc: meson-mx-ao-arc: fix a bit test
commit: faf88ed1c083017d1f4478f45c4f375e7a3f8bdc
Best regards,
--
Bjorn Andersson <bjorn.andersson@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] remoteproc: meson-mx-ao-arc: fix a bit test
2021-10-04 10:52 [PATCH] remoteproc: meson-mx-ao-arc: fix a bit test Dan Carpenter
2021-10-04 17:09 ` (subset) " Bjorn Andersson
@ 2021-10-04 20:47 ` Martin Blumenstingl
1 sibling, 0 replies; 3+ messages in thread
From: Martin Blumenstingl @ 2021-10-04 20:47 UTC (permalink / raw)
To: Dan Carpenter
Cc: Ohad Ben-Cohen, Bjorn Andersson, Mathieu Poirier, Neil Armstrong,
Kevin Hilman, Jerome Brunet, linux-remoteproc, linux-arm-kernel,
linux-amlogic, kernel-janitors
Hi Dan,
thank you for this patch!
On Mon, Oct 4, 2021 at 12:53 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> The MESON_AO_RPROC_SRAM_USABLE_BITS macro is used like this:
>
> if (priv->sram_pa & ~MESON_AO_RPROC_SRAM_USABLE_BITS) {
> dev_err(dev, "SRAM address contains unusable bits\n");
>
> The problem is that "->sram_pa" is type phys_addr_t which is potentially
> 64 bits. That means the MESON_AO_RPROC_SRAM_USABLE_BITS macro needs to
> be a 64 bit type as well to ensure that high 32 bits are cleared.
>
> Fixes: 6cb58ea897dd ("remoteproc: meson-mx-ao-arc: Add a driver for the AO ARC remote procesor")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
even though it's already applied, here's my:
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Best regards,
Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-04 20:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-04 10:52 [PATCH] remoteproc: meson-mx-ao-arc: fix a bit test Dan Carpenter
2021-10-04 17:09 ` (subset) " Bjorn Andersson
2021-10-04 20:47 ` Martin Blumenstingl
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).