Skip to content

Commit 4583a4f

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
scsi: lpfc: use hdwq assigned cpu for allocation
Looking at the recent conversion from smp_processor_id() to raw_smp_processor_id(), realized that the allocation should be based on the cpu the hdwq is bound to, not the executing cpu. Revise to pull cpu number from the hdwq Fixes: 765ab6c ("scsi: lpfc: Fix a kernel warning triggered by lpfc_get_sgl_per_hdwq()") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 9b44ffa commit 4583a4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/scsi/lpfc/lpfc_sli.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20668,7 +20668,7 @@ lpfc_get_sgl_per_hdwq(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_buf)
2066820668
/* allocate more */
2066920669
spin_unlock_irqrestore(&hdwq->hdwq_lock, iflags);
2067020670
tmp = kmalloc_node(sizeof(*tmp), GFP_ATOMIC,
20671-
cpu_to_node(raw_smp_processor_id()));
20671+
cpu_to_node(hdwq->io_wq->chann));
2067220672
if (!tmp) {
2067320673
lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
2067420674
"8353 error kmalloc memory for HDWQ "
@@ -20811,7 +20811,7 @@ lpfc_get_cmd_rsp_buf_per_hdwq(struct lpfc_hba *phba,
2081120811
/* allocate more */
2081220812
spin_unlock_irqrestore(&hdwq->hdwq_lock, iflags);
2081320813
tmp = kmalloc_node(sizeof(*tmp), GFP_ATOMIC,
20814-
cpu_to_node(raw_smp_processor_id()));
20814+
cpu_to_node(hdwq->io_wq->chann));
2081520815
if (!tmp) {
2081620816
lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
2081720817
"8355 error kmalloc memory for HDWQ "

0 commit comments

Comments
 (0)