Skip to content

Commit 1a3b5cc

Browse files
author
Jakub Ramaseuski
committed
RDMA/ionic: Fix build failure on SPARC due to xchg() operand size
JIRA: https://issues.redhat.com/browse/RHEL-121486 commit ed9836c Author: Abhijit Gangurde <abhijit.gangurde@amd.com> Date: Fri Sep 19 17:43:00 2025 +0530 RDMA/ionic: Fix build failure on SPARC due to xchg() operand size 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: f3bdbd4 ("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> Link: https://patch.msgid.link/20250919121301.1113759-1-abhijit.gangurde@amd.com Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Jakub Ramaseuski <jramaseu@redhat.com>
1 parent ad72d85 commit 1a3b5cc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

drivers/infiniband/hw/ionic/ionic_admin.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ static void ionic_poll_eq_work(struct work_struct *work)
945945
npolled, 0);
946946
queue_work(ionic_evt_workq, &eq->work);
947947
} else {
948-
xchg(&eq->armed, true);
948+
xchg(&eq->armed, 1);
949949
ionic_intr_credits(eq->dev->lif_cfg.intr_ctrl, eq->intr,
950950
0, IONIC_INTR_CRED_UNMASK);
951951
}
@@ -954,10 +954,10 @@ static void ionic_poll_eq_work(struct work_struct *work)
954954
static irqreturn_t ionic_poll_eq_isr(int irq, void *eqptr)
955955
{
956956
struct ionic_eq *eq = eqptr;
957-
bool was_armed;
957+
int was_armed;
958958
u32 npolled;
959959

960-
was_armed = xchg(&eq->armed, false);
960+
was_armed = xchg(&eq->armed, 0);
961961

962962
if (unlikely(!eq->enable) || !was_armed)
963963
return IRQ_HANDLED;
@@ -968,7 +968,7 @@ static irqreturn_t ionic_poll_eq_isr(int irq, void *eqptr)
968968
npolled, 0);
969969
queue_work(ionic_evt_workq, &eq->work);
970970
} else {
971-
xchg(&eq->armed, true);
971+
xchg(&eq->armed, 1);
972972
ionic_intr_credits(eq->dev->lif_cfg.intr_ctrl, eq->intr,
973973
0, IONIC_INTR_CRED_UNMASK);
974974
}

drivers/infiniband/hw/ionic/ionic_ibdev.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ struct ionic_eq {
126126

127127
struct ionic_queue q;
128128

129-
bool armed;
129+
int armed;
130130
bool enable;
131131

132132
struct work_struct work;

0 commit comments

Comments
 (0)