Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

megaraid_sas: use raw_smp_processor_id()

We only want to steer the I/O completion towards a queue, but don't
actually access any per-CPU data, so the raw_ version is fine to use
and avoids the warnings when using smp_processor_id().

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Andy Lutomirski <luto@kernel.org>
Tested-by: Andy Lutomirski <luto@kernel.org>
Acked-by: Sumit Saxena <sumit.saxena@avagotech.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Odin.com>

authored by

Christoph Hellwig and committed by
James Bottomley
16b8528d e557990e

+6 -3
+6 -3
drivers/scsi/megaraid/megaraid_sas_fusion.c
··· 1584 1584 fp_possible = io_info.fpOkForIo; 1585 1585 } 1586 1586 1587 - /* Use smp_processor_id() for now until cmd->request->cpu is CPU 1587 + /* Use raw_smp_processor_id() for now until cmd->request->cpu is CPU 1588 1588 id by default, not CPU group id, otherwise all MSI-X queues won't 1589 1589 be utilized */ 1590 1590 cmd->request_desc->SCSIIO.MSIxIndex = instance->msix_vectors ? 1591 - smp_processor_id() % instance->msix_vectors : 0; 1591 + raw_smp_processor_id() % instance->msix_vectors : 0; 1592 1592 1593 1593 if (fp_possible) { 1594 1594 megasas_set_pd_lba(io_request, scp->cmd_len, &io_info, scp, ··· 1693 1693 << MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_SHIFT; 1694 1694 cmd->request_desc->SCSIIO.DevHandle = io_request->DevHandle; 1695 1695 cmd->request_desc->SCSIIO.MSIxIndex = 1696 - instance->msix_vectors ? smp_processor_id() % instance->msix_vectors : 0; 1696 + instance->msix_vectors ? 1697 + raw_smp_processor_id() % 1698 + instance->msix_vectors : 1699 + 0; 1697 1700 os_timeout_value = scmd->request->timeout / HZ; 1698 1701 1699 1702 if (instance->secure_jbod_support &&