public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ohad Ben-Cohen <ohad@wizery.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	linux-remoteproc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	kernel-janitors@vger.kernel.org
Subject: [PATCH] remoteproc: meson-mx-ao-arc: fix a bit test
Date: Mon, 4 Oct 2021 13:52:57 +0300	[thread overview]
Message-ID: <20211004105257.GA27301@kili> (raw)

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-10-04 10:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 10:52 Dan Carpenter [this message]
2021-10-04 17:09 ` (subset) [PATCH] remoteproc: meson-mx-ao-arc: fix a bit test Bjorn Andersson
2021-10-04 20:47 ` Martin Blumenstingl

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=20211004105257.GA27301@kili \
    --to=dan.carpenter@oracle.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=jbrunet@baylibre.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=narmstrong@baylibre.com \
    --cc=ohad@wizery.com \
    /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