kernel: padata : use this_cpu_ptr per-cpu helper
Subsystems (2)
PATCH 6/9 kernel: padata : use this_cpu_ptr per-cpu helper
From: Shan Wei <[email protected]>
Signed-off-by Shan Wei <[email protected]>
--- kernel/padata.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/padata.c +1 -1
@@ -204,7 +204,7 @@ static struct padata_priv *padata_get_next(struct parallel_data *pd) goto out; } - queue =per_cpu_ptr (pd->pqueue,smp_processor_id ()); + queue =this_cpu_ptr (pd->pqueue);if (queue->cpu_index == next_queue->cpu_index) { padata =ERR_PTR (-ENODATA ); goto out;
Signature · 1 line
1.7.1
Quoted 13 lines · Shan Wei
From: Shan Wei <[email protected]>
Signed-off-by Shan Wei <[email protected]>--- kernel/padata.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)kernel/padata.c +0
-0
kernel/padata.c static struct padata_priv *padata_get_next(struct parallel_data *pd) · line 208
Quoted 6 lines
kernel/padata.c +1
-1@@ -204,7 +204,7 @@ static struct padata_priv *padata_get_next(struct parallel_data *pd) goto out; } - queue =per_cpu_ptr (pd->pqueue,smp_processor_id ()); + queue =this_cpu_ptr (pd->pqueue);if (queue->cpu_index == next_queue->cpu_index) {
Its simpler to just remove the per_cpu op completely and change the if statement to
if (this_cpu_read(pd->pqueue->cpu_index) == next_queue->cpu_index))
{
..