mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
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: f3bdbd4270 ("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>
This commit is contained in:
parent
8ca7eada62
commit
ed9836c040
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ struct ionic_eq {
|
|||
|
||||
struct ionic_queue q;
|
||||
|
||||
bool armed;
|
||||
int armed;
|
||||
bool enable;
|
||||
|
||||
struct work_struct work;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user