diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-06-15 11:29:31 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-11-24 16:47:49 +0100 |
commit | 545b8c8df41f9ecbaf806332d4095bc4bc7c14e8 (patch) | |
tree | 8ce051dfb3d847b5fa8cddf6aa2ad265e3416a36 /drivers | |
parent | irq_work: Cleanup (diff) | |
download | linux-545b8c8df41f9ecbaf806332d4095bc4bc7c14e8.tar.xz linux-545b8c8df41f9ecbaf806332d4095bc4bc7c14e8.zip |
smp: Cleanup smp_call_function*()
Get rid of the __call_single_node union and cleanup the API a little
to avoid external code relying on the structure layout as much.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cpuidle/coupled.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/lio_core.c | 9 |
2 files changed, 3 insertions, 9 deletions
diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c index 04003b90dc49..74068742cef3 100644 --- a/drivers/cpuidle/coupled.c +++ b/drivers/cpuidle/coupled.c @@ -674,8 +674,7 @@ have_coupled: coupled->refcnt++; csd = &per_cpu(cpuidle_coupled_poke_cb, dev->cpu); - csd->func = cpuidle_coupled_handle_poke; - csd->info = (void *)(unsigned long)dev->cpu; + INIT_CSD(csd, cpuidle_coupled_handle_poke, (void *)(unsigned long)dev->cpu); return 0; } diff --git a/drivers/net/ethernet/cavium/liquidio/lio_core.c b/drivers/net/ethernet/cavium/liquidio/lio_core.c index 9ef172976b35..37d064193f0f 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_core.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_core.c @@ -729,13 +729,8 @@ static void liquidio_napi_drv_callback(void *arg) droq->cpu_id == this_cpu) { napi_schedule_irqoff(&droq->napi); } else { - call_single_data_t *csd = &droq->csd; - - csd->func = napi_schedule_wrapper; - csd->info = &droq->napi; - csd->flags = 0; - - smp_call_function_single_async(droq->cpu_id, csd); + INIT_CSD(&droq->csd, napi_schedule_wrapper, &droq->napi); + smp_call_function_single_async(droq->cpu_id, &droq->csd); } } |