From: Abhijit Gangurde <abhijit.gangurde@amd.com>
To: <jgg@ziepe.ca>, <leon@kernel.org>
Cc: <allen.hubbe@amd.com>, <linux-rdma@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Abhijit Gangurde <abhijit.gangurde@amd.com>
Subject: [PATCH rdma-next 1/2] RDMA/ionic: Fix build failure on SPARC due to xchg() operand size
Date: Fri, 19 Sep 2025 17:43:00 +0530 [thread overview]
Message-ID: <20250919121301.1113759-1-abhijit.gangurde@amd.com> (raw)
xchg() is used to safely handle the event queue arming.
However SPARC xchg operates only 4B of variable.
Change variable type from bool to int.
Unverified Error/Warning (likely false positive, kindly check if interested):
ERROR: modpost: "__xchg_called_with_bad_pointer" [drivers/infiniband/hw/ionic/ionic_rdma.ko] undefined!
Error/Warning ids grouped by kconfigs:
recent_errors
`-- sparc-allmodconfig
`-- ERROR:__xchg_called_with_bad_pointer-drivers-infiniband-hw-ionic-ionic_rdma.ko-undefined
Fixes: f3bdbd42702c ("RDMA/ionic: Create device queues to support admin operations")
Reported-by: Leon Romanovsky <leon@kernel.org>
Closes: https://lore.kernel.org/lkml/20250918180750.GA135135@unreal/
Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
---
drivers/infiniband/hw/ionic/ionic_admin.c | 8 ++++----
drivers/infiniband/hw/ionic/ionic_ibdev.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/infiniband/hw/ionic/ionic_admin.c b/drivers/infiniband/hw/ionic/ionic_admin.c
index 1ba7a8ecc073..d9221ef134c4 100644
--- a/drivers/infiniband/hw/ionic/ionic_admin.c
+++ b/drivers/infiniband/hw/ionic/ionic_admin.c
@@ -945,7 +945,7 @@ static void ionic_poll_eq_work(struct work_struct *work)
npolled, 0);
queue_work(ionic_evt_workq, &eq->work);
} else {
- xchg(&eq->armed, true);
+ xchg(&eq->armed, 1);
ionic_intr_credits(eq->dev->lif_cfg.intr_ctrl, eq->intr,
0, IONIC_INTR_CRED_UNMASK);
}
@@ -954,10 +954,10 @@ static void ionic_poll_eq_work(struct work_struct *work)
static irqreturn_t ionic_poll_eq_isr(int irq, void *eqptr)
{
struct ionic_eq *eq = eqptr;
- bool was_armed;
+ int was_armed;
u32 npolled;
- was_armed = xchg(&eq->armed, false);
+ was_armed = xchg(&eq->armed, 0);
if (unlikely(!eq->enable) || !was_armed)
return IRQ_HANDLED;
@@ -968,7 +968,7 @@ static irqreturn_t ionic_poll_eq_isr(int irq, void *eqptr)
npolled, 0);
queue_work(ionic_evt_workq, &eq->work);
} else {
- xchg(&eq->armed, true);
+ xchg(&eq->armed, 1);
ionic_intr_credits(eq->dev->lif_cfg.intr_ctrl, eq->intr,
0, IONIC_INTR_CRED_UNMASK);
}
diff --git a/drivers/infiniband/hw/ionic/ionic_ibdev.h b/drivers/infiniband/hw/ionic/ionic_ibdev.h
index b7a1a57bae03..82fda1e3cdb6 100644
--- a/drivers/infiniband/hw/ionic/ionic_ibdev.h
+++ b/drivers/infiniband/hw/ionic/ionic_ibdev.h
@@ -126,7 +126,7 @@ struct ionic_eq {
struct ionic_queue q;
- bool armed;
+ int armed;
bool enable;
struct work_struct work;
--
2.43.0
next reply other threads:[~2025-09-19 12:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 12:13 Abhijit Gangurde [this message]
2025-09-19 12:13 ` [PATCH rdma-next 2/2] RDMA/ionic: Use ether_addr_copy instead of memcpy Abhijit Gangurde
2025-09-21 11:32 ` [PATCH rdma-next 1/2] RDMA/ionic: Fix build failure on SPARC due to xchg() operand size Leon Romanovsky
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=20250919121301.1113759-1-abhijit.gangurde@amd.com \
--to=abhijit.gangurde@amd.com \
--cc=allen.hubbe@amd.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@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®