aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorSumit.Saxena@avagotech.com <Sumit.Saxena@avagotech.com>2014-09-12 09:27:18 -0400
committerChristoph Hellwig <hch@lst.de>2014-09-16 12:14:22 -0400
commit0756040952582c4e7c2f23ff2af882c0f0c7a516 (patch)
tree5323de07a6b316457de0c6c453b8921eae229715 /drivers/scsi/megaraid
parent07e38d94ef3646ccee4f222ae1f3033bb37f7fa0 (diff)
megaraid_sas : Use writeq for 64bit pci write to avoid spinlock overhead
Resending the patch. Addressed the review comments from Tomas Henzl. Reduce the assingment for u64 req_data variable. Use writeq() for 64bit PCI write instead of writel() to avoid additional lock overhead. Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 57b47fe69072..8898817eaf8b 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -1065,6 +1065,11 @@ megasas_fire_cmd_fusion(struct megasas_instance *instance,
1065 u32 req_desc_hi, 1065 u32 req_desc_hi,
1066 struct megasas_register_set __iomem *regs) 1066 struct megasas_register_set __iomem *regs)
1067{ 1067{
1068#if defined(writeq) && defined(CONFIG_64BIT)
1069 u64 req_data = (((u64)req_desc_hi << 32) | (u32)req_desc_lo);
1070
1071 writeq(le64_to_cpu(req_data), &(regs)->inbound_low_queue_port);
1072#else
1068 unsigned long flags; 1073 unsigned long flags;
1069 1074
1070 spin_lock_irqsave(&instance->hba_lock, flags); 1075 spin_lock_irqsave(&instance->hba_lock, flags);
@@ -1072,6 +1077,7 @@ megasas_fire_cmd_fusion(struct megasas_instance *instance,
1072 writel(le32_to_cpu(req_desc_lo), &(regs)->inbound_low_queue_port); 1077 writel(le32_to_cpu(req_desc_lo), &(regs)->inbound_low_queue_port);
1073 writel(le32_to_cpu(req_desc_hi), &(regs)->inbound_high_queue_port); 1078 writel(le32_to_cpu(req_desc_hi), &(regs)->inbound_high_queue_port);
1074 spin_unlock_irqrestore(&instance->hba_lock, flags); 1079 spin_unlock_irqrestore(&instance->hba_lock, flags);
1080#endif
1075} 1081}
1076 1082
1077/** 1083/**