mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 23:30:55 +07:00
IB/ehca: Remove _irqsave, move #ifdef
- In ehca_process_eq(), we're IRQ safe throughout the whole function, so we don't need another _irqsave in the middle of flight. - take_over_work() is only called by comp_pool_callback(), so it can move into the same #ifdef block. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
c55a0ddd8e
commit
c7a14939e7
@ -517,12 +517,11 @@ void ehca_process_eq(struct ehca_shca *shca, int is_irq)
|
|||||||
else {
|
else {
|
||||||
struct ehca_cq *cq = eq->eqe_cache[i].cq;
|
struct ehca_cq *cq = eq->eqe_cache[i].cq;
|
||||||
comp_event_callback(cq);
|
comp_event_callback(cq);
|
||||||
spin_lock_irqsave(&ehca_cq_idr_lock, flags);
|
spin_lock(&ehca_cq_idr_lock);
|
||||||
cq->nr_events--;
|
cq->nr_events--;
|
||||||
if (!cq->nr_events)
|
if (!cq->nr_events)
|
||||||
wake_up(&cq->wait_completion);
|
wake_up(&cq->wait_completion);
|
||||||
spin_unlock_irqrestore(&ehca_cq_idr_lock,
|
spin_unlock(&ehca_cq_idr_lock);
|
||||||
flags);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ehca_dbg(&shca->ib_device, "Got non completion event");
|
ehca_dbg(&shca->ib_device, "Got non completion event");
|
||||||
@ -711,6 +710,7 @@ static void destroy_comp_task(struct ehca_comp_pool *pool,
|
|||||||
kthread_stop(task);
|
kthread_stop(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
static void take_over_work(struct ehca_comp_pool *pool,
|
static void take_over_work(struct ehca_comp_pool *pool,
|
||||||
int cpu)
|
int cpu)
|
||||||
{
|
{
|
||||||
@ -735,7 +735,6 @@ static void take_over_work(struct ehca_comp_pool *pool,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG_CPU
|
|
||||||
static int comp_pool_callback(struct notifier_block *nfb,
|
static int comp_pool_callback(struct notifier_block *nfb,
|
||||||
unsigned long action,
|
unsigned long action,
|
||||||
void *hcpu)
|
void *hcpu)
|
||||||
|
Loading…
Reference in New Issue
Block a user