scsi/mpt2sas: remove unnecesscary preempt requirement for MSIX
PATCH 1/1 scsi/mpt2sas: remove unnecesscary preempt requirement for MSIX
smp_processor_id() need used in preempt safe ENV. Otherwise, the cpu may be preempted and run on other cpus. But here, we don't care much the specific CPU which handler the MSI, so just replace it by raw_smp_processor_id() to avoid preempt debug warning.
--- drivers/scsi/mpt2sas/mpt2sas_base.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/mpt2sas/mpt2sas_base.c +1 -1
@@ -1785,7 +1785,7 @@ static inline void _base_writeq(__u64 b, volatile void __iomem *addr,static inline u8 _base_get_msix_index (struct MPT2SAS_ADAPTER *ioc) { -return ioc->cpu_msix_table[smp_processor_id ()]; +return ioc->cpu_msix_table[raw_smp_processor_id ()]; }/**
Signature · 1 line
1.7.5.4
Alex,
I submitted this patch already.
James, request you to pick up the patch that I previously submitted for fixing this issue. Attaching the patch that I submitted previously.
Regards,
Nagalakshmi
-----Original Message-----
From: Alex Shi [mailto:[email protected]]
Sent: Saturday, April 28, 2012 11:58 AM
To: [email protected]; Nandigama, Nagalakshmi
Cc: [email protected]; [email protected]; [email protected]
Subject: [PATCH] scsi/mpt2sas: remove unnecesscary preempt requirement for MSIX
smp_processor_id() need used in preempt safe ENV. Otherwise, the cpu may be preempted and run on other cpus. But here, we don't care much the specific CPU which handler the MSI, so just replace it by raw_smp_processor_id() to avoid preempt debug warning.
--- drivers/scsi/mpt2sas/mpt2sas_base.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/mpt2sas/mpt2sas_base.c +1 -1
@@ -1785,7 +1785,7 @@ static inline void _base_writeq(__u64 b, volatile void __iomem *addr,static inline u8 _base_get_msix_index (struct MPT2SAS_ADAPTER *ioc) { -return ioc->cpu_msix_table[smp_processor_id ()]; +return ioc->cpu_msix_table[raw_smp_processor_id ()]; }/**
Signature · 1 line
1.7.5.4
James, this patch is not picked up for 3.5. Request you to push this patch for next release.
Regards,
Nagalakshmi
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Tuesday, April 17, 2012 11:25 AM
To: [email protected]; [email protected]; Nandigama, Nagalakshmi; Prakash, Sathya; Moore, Eric
Cc: [email protected]
Subject: [PATCH] [SCSI] mpt2sas : Fix unsafe using smp_processor_id() in preemptible
When CONFIG_DEBUG_PREEMPT is enabled, bug is observed in the smp_processor_id(). This is because smp_processor_id() is not called in preempt safe condition.
To fix this issue, use raw_smp_processor_id instead of smp_processor_id.
---
drivers/scsi/mpt2sas/mpt2sas_base.c +1 -1
@@ -1792,7 +1792,7 @@ static inline void _base_writeq(__u64 b, volatile void __iomem *addr,static inline u8 _base_get_msix_index (struct MPT2SAS_ADAPTER *ioc) { -return ioc->cpu_msix_table[smp_processor_id ()]; +return ioc->cpu_msix_table[raw_smp_processor_id ()]; }/**
Quoted 2 lines · Nagalakshmi
Alex,
I submitted this patch already.
Ok. that's fine.
Quoted 38 lines
James, request you to pick up the patch that I previously submitted for fixing this issue. Attaching the patch that I submitted previously.
Regards,
Nagalakshmi-----Original Message-----
From: Alex Shi [mailto:[email protected]]
Sent: Saturday, April 28, 2012 11:58 AM
To: [email protected]; Nandigama, Nagalakshmi
Cc: [email protected]; [email protected]; [email protected]
Subject: [PATCH] scsi/mpt2sas: remove unnecesscary preempt requirement for MSIX
smp_processor_id()need used in preempt safe ENV. Otherwise, the cpu may be preempted and run on other cpus. But here, we don't care much the specific CPU which handler the MSI, so just replace it byraw_smp_processor_id()to avoid preempt debug warning.Signed-off-by Alex Shi <[email protected]>--- drivers/scsi/mpt2sas/mpt2sas_base.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/scsi/mpt2sas/mpt2sas_base.c +1
-1@@ -1785,7 +1785,7 @@ static inline void _base_writeq(__u64 b, volatile void __iomem *addr,static inline u8 _base_get_msix_index (struct MPT2SAS_ADAPTER *ioc) { -return ioc->cpu_msix_table[smp_processor_id ()]; +return ioc->cpu_msix_table[raw_smp_processor_id ()]; }/**