]>
Commit | Line | Data |
---|---|---|
4cbecc48 GKH |
1 | From 16b8528d20607925899b1df93bfd8fbab98d267c Mon Sep 17 00:00:00 2001 |
2 | From: Christoph Hellwig <hch@infradead.org> | |
3 | Date: Wed, 15 Apr 2015 09:44:37 -0700 | |
4 | Subject: megaraid_sas: use raw_smp_processor_id() | |
5 | ||
6 | From: Christoph Hellwig <hch@infradead.org> | |
7 | ||
8 | commit 16b8528d20607925899b1df93bfd8fbab98d267c upstream. | |
9 | ||
10 | We only want to steer the I/O completion towards a queue, but don't | |
11 | actually access any per-CPU data, so the raw_ version is fine to use | |
12 | and avoids the warnings when using smp_processor_id(). | |
13 | ||
14 | Signed-off-by: Christoph Hellwig <hch@lst.de> | |
15 | Reported-by: Andy Lutomirski <luto@kernel.org> | |
16 | Tested-by: Andy Lutomirski <luto@kernel.org> | |
17 | Acked-by: Sumit Saxena <sumit.saxena@avagotech.com> | |
18 | Signed-off-by: James Bottomley <JBottomley@Odin.com> | |
19 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
20 | ||
21 | --- | |
22 | drivers/scsi/megaraid/megaraid_sas_fusion.c | 9 ++++++--- | |
23 | 1 file changed, 6 insertions(+), 3 deletions(-) | |
24 | ||
25 | --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c | |
26 | +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c | |
27 | @@ -1584,11 +1584,11 @@ megasas_build_ldio_fusion(struct megasas | |
28 | fp_possible = io_info.fpOkForIo; | |
29 | } | |
30 | ||
31 | - /* Use smp_processor_id() for now until cmd->request->cpu is CPU | |
32 | + /* Use raw_smp_processor_id() for now until cmd->request->cpu is CPU | |
33 | id by default, not CPU group id, otherwise all MSI-X queues won't | |
34 | be utilized */ | |
35 | cmd->request_desc->SCSIIO.MSIxIndex = instance->msix_vectors ? | |
36 | - smp_processor_id() % instance->msix_vectors : 0; | |
37 | + raw_smp_processor_id() % instance->msix_vectors : 0; | |
38 | ||
39 | if (fp_possible) { | |
40 | megasas_set_pd_lba(io_request, scp->cmd_len, &io_info, scp, | |
41 | @@ -1693,7 +1693,10 @@ megasas_build_dcdb_fusion(struct megasas | |
42 | << MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_SHIFT; | |
43 | cmd->request_desc->SCSIIO.DevHandle = io_request->DevHandle; | |
44 | cmd->request_desc->SCSIIO.MSIxIndex = | |
45 | - instance->msix_vectors ? smp_processor_id() % instance->msix_vectors : 0; | |
46 | + instance->msix_vectors ? | |
47 | + raw_smp_processor_id() % | |
48 | + instance->msix_vectors : | |
49 | + 0; | |
50 | os_timeout_value = scmd->request->timeout / HZ; | |
51 | ||
52 | if (instance->secure_jbod_support && |