diff options
author | Justin Tee <justin.tee@broadcom.com> | 2023-07-12 11:05:19 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-07-23 16:17:07 -0400 |
commit | d668b368efc2fca15bf785c44b449d38d6b50553 (patch) | |
tree | ab828bb1949314b2ce86bbd151b1ae9808ba6d74 /drivers/scsi/lpfc/lpfc_nvmet.c | |
parent | 089ea22e374aa20043e72243c47b5867d5419d38 (diff) |
scsi: lpfc: Refactor cpu affinity assignment paths
During initialization, a lot of the same logic is used on MSI-X vector CPU
affinity assignment.
Create a lpfc_next_present_cpu() helper routine, and apply its usage for
refactoring purposes.
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20230712180522.112722-10-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nvmet.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nvmet.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index dff4584d338b..425328d9c2d8 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.c +++ b/drivers/scsi/lpfc/lpfc_nvmet.c @@ -1620,10 +1620,7 @@ lpfc_nvmet_setup_io_context(struct lpfc_hba *phba) cpu = cpumask_first(cpu_present_mask); continue; } - cpu = cpumask_next(cpu, cpu_present_mask); - if (cpu == nr_cpu_ids) - cpu = cpumask_first(cpu_present_mask); - + cpu = lpfc_next_present_cpu(cpu); } for_each_present_cpu(i) { |