Commit 0bff777b authored by Luo bin's avatar Luo bin Committed by David S. Miller

hinic: fix a irq affinity bug

can not use a local variable as an input parameter of
irq_set_affinity_hint
Signed-off-by: default avatarLuo bin <luobin9@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a2f2ef4a
......@@ -94,6 +94,7 @@ struct hinic_rq {
struct hinic_wq *wq;
struct cpumask affinity_mask;
u32 irq;
u16 msix_entry;
......
......@@ -475,7 +475,6 @@ static int rx_request_irq(struct hinic_rxq *rxq)
struct hinic_hwdev *hwdev = nic_dev->hwdev;
struct hinic_rq *rq = rxq->rq;
struct hinic_qp *qp;
struct cpumask mask;
int err;
rx_add_napi(rxq);
......@@ -492,8 +491,8 @@ static int rx_request_irq(struct hinic_rxq *rxq)
}
qp = container_of(rq, struct hinic_qp, rq);
cpumask_set_cpu(qp->q_id % num_online_cpus(), &mask);
return irq_set_affinity_hint(rq->irq, &mask);
cpumask_set_cpu(qp->q_id % num_online_cpus(), &rq->affinity_mask);
return irq_set_affinity_hint(rq->irq, &rq->affinity_mask);
}
static void rx_free_irq(struct hinic_rxq *rxq)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment