aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2015-04-15 12:44:37 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-04-16 13:37:58 -0400
commit16b8528d20607925899b1df93bfd8fbab98d267c (patch)
treed937083867262ee5fcc1b13e75a37b3164a1f069 /drivers/scsi/megaraid
parente557990e358934fb168d30371c9c0f63e314c6b8 (diff)
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>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 675b5e7aba94..5a0800d19970 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -1584,11 +1584,11 @@ megasas_build_ldio_fusion(struct megasas_instance *instance,
1584 fp_possible = io_info.fpOkForIo; 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 id by default, not CPU group id, otherwise all MSI-X queues won't 1588 id by default, not CPU group id, otherwise all MSI-X queues won't
1589 be utilized */ 1589 be utilized */
1590 cmd->request_desc->SCSIIO.MSIxIndex = instance->msix_vectors ? 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 if (fp_possible) { 1593 if (fp_possible) {
1594 megasas_set_pd_lba(io_request, scp->cmd_len, &io_info, scp, 1594 megasas_set_pd_lba(io_request, scp->cmd_len, &io_info, scp,
@@ -1693,7 +1693,10 @@ megasas_build_dcdb_fusion(struct megasas_instance *instance,
1693 << MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_SHIFT; 1693 << MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_SHIFT;
1694 cmd->request_desc->SCSIIO.DevHandle = io_request->DevHandle; 1694 cmd->request_desc->SCSIIO.DevHandle = io_request->DevHandle;
1695 cmd->request_desc->SCSIIO.MSIxIndex = 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 os_timeout_value = scmd->request->timeout / HZ; 1700 os_timeout_value = scmd->request->timeout / HZ;
1698 1701
1699 if (instance->secure_jbod_support && 1702 if (instance->secure_jbod_support &&