Skip to content

Commit d0bab30

Browse files
Roy PledgeLi Yang
authored andcommitted
soc: fsl: dpio: Prefer the CPU affine DPIO
Use the cpu affine DPIO unless there isn't one which can happen if less DPIOs than cores are assign to the kernel. Signed-off-by: Roy Pledge <[email protected]> Signed-off-by: Ioana Ciornei <[email protected]> Signed-off-by: Li Yang <[email protected]>
1 parent 162b323 commit d0bab30

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/soc/fsl/dpio/dpio-service.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static inline struct dpaa2_io *service_select_by_cpu(struct dpaa2_io *d,
5858
* If cpu == -1, choose the current cpu, with no guarantees about
5959
* potentially being migrated away.
6060
*/
61-
if (unlikely(cpu < 0))
61+
if (cpu < 0)
6262
cpu = smp_processor_id();
6363

6464
/* If a specific cpu was requested, pick it up immediately */
@@ -70,6 +70,10 @@ static inline struct dpaa2_io *service_select(struct dpaa2_io *d)
7070
if (d)
7171
return d;
7272

73+
d = service_select_by_cpu(d, -1);
74+
if (d)
75+
return d;
76+
7377
spin_lock(&dpio_list_lock);
7478
d = list_entry(dpio_list.next, struct dpaa2_io, node);
7579
list_del(&d->node);

0 commit comments

Comments
 (0)