From: Sivansh Gupta <sivansh.gupta@oss.qualcomm.com>
To: Sibi Sankar <sibi.sankar@oss.qualcomm.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Sivansh Gupta <sivansh.gupta@oss.qualcomm.com>
Subject: [PATCH v2] mailbox: qcom-cpucp: read mbox hardware register using readq()
Date: Tue, 15 Sep 2026 15:09:10 +0530 [thread overview]
Message-ID: <20260915093910.2487018-1-sivansh.gupta@oss.qualcomm.com> (raw)
In-Reply-To: <7527e6c7-82ad-48f1-8329-5b9222c347e4@oss.qualcomm.com>
Mailbox hardware registers are 64 bit wide, but the interrupt handler
currently reads only 32 bits with readl() at 0x4 offset (upper 32
bits). This does not return the correct value expected by PDP log
driver. Reading the register with readq() at the base address
returns the correct value expected.
Use readq() to access the 64-bit register and pass the correct value
to the mailbox client.
Fixes: 0e2a9a03106c ("mailbox: Add support for QTI CPUCP mailbox controller")
Signed-off-by: Sivansh Gupta <sivansh.gupta@oss.qualcomm.com>
---
v2:
- Expanded the commit message to explain why this change is required.
drivers/mailbox/qcom-cpucp-mbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mailbox/qcom-cpucp-mbox.c b/drivers/mailbox/qcom-cpucp-mbox.c
index 7ffc40acea9b..f56a05149281 100644
--- a/drivers/mailbox/qcom-cpucp-mbox.c
+++ b/drivers/mailbox/qcom-cpucp-mbox.c
@@ -61,7 +61,7 @@ static irqreturn_t qcom_cpucp_mbox_irq_fn(int irq, void *data)
status = readq(cpucp->rx_base + APSS_CPUCP_RX_MBOX_STAT);
for_each_set_bit(i, (unsigned long *)&status, cpucp->mbox.num_chans) {
- u32 val = readl(cpucp->rx_base + APSS_CPUCP_RX_MBOX_CMD(i) + APSS_CPUCP_MBOX_CMD_OFF);
+ u64 val = readq(cpucp->rx_base + APSS_CPUCP_RX_MBOX_CMD(i));
struct mbox_chan *chan = &cpucp->chans[i];
unsigned long flags;
--
2.43.0
next prev parent reply other threads:[~2026-09-15 9:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 15:50 [PATCH] " Sivansh Gupta
2026-09-09 6:20 ` Sibi Sankar
2026-09-15 9:39 ` Sivansh Gupta [this message]
2026-09-17 8:07 ` [PATCH v2] " Konrad Dybcio
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=20260915093910.2487018-1-sivansh.gupta@oss.qualcomm.com \
--to=sivansh.gupta@oss.qualcomm.com \
--cc=jassisinghbrar@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sibi.sankar@oss.qualcomm.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
all inboxes | Powered by JetHome®