From patchwork Wed Oct 17 06:37:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10644661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1E36A1508 for ; Wed, 17 Oct 2018 06:38:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EEF329B75 for ; Wed, 17 Oct 2018 06:38:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02D6929C79; Wed, 17 Oct 2018 06:38:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4F5129B75 for ; Wed, 17 Oct 2018 06:38:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727326AbeJQOcw (ORCPT ); Wed, 17 Oct 2018 10:32:52 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:34015 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727099AbeJQOcw (ORCPT ); Wed, 17 Oct 2018 10:32:52 -0400 Received: by mail-pf1-f193.google.com with SMTP id f78-v6so6927415pfe.1 for ; Tue, 16 Oct 2018 23:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dLITXr0qGS5+qNNrkToVGwRUIAKEHLoqSv3jn4Q5nHg=; b=XjTqVfxus6pnY6qyvi6X3GK/YTTdoMDXcS/UvcB5or1VVXzKDoerh16Wr0Ep3S/b7O 53D5xsIsKsTH4C8hrYXS5rRDR9DKhQOc2p3s4S8uGjRY30DkcDBw61EeaohXXxf23OJZ /xs30dcfgi09tw/P0ESmQtk16nw18aQoLNGrE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dLITXr0qGS5+qNNrkToVGwRUIAKEHLoqSv3jn4Q5nHg=; b=mTK90YeHHcjuZCcpdHN2GjvY7TtS7+t0zSgXV7xsiN2bAXgNid9re0o3Mg9pa7JxNE Crs6y8xSr7XE5pfbxaNbN+aTklohk3EySpkfVrHpYyqlPzTAVT5EjuaCM6PwW0ordCYd 78fsGAOmMfuRZ12QV/fwc+H9WZ1G7LSIKaOaUQ+6RTMANu4KoICUQjfxSCP2EmV8Wjby c9msIPHy+nMMlTQe2HYR7Jr5qM3grYOLawckW+0kk0tbubVfAuDGm+SCdoWjChSASx9d zUz9xQlTL1ReSGzgwfOhn9iUkdIIvY3XsTrLodmP4INgkyR0AaiMk6JTb8lpHRBgV5Rg TXGQ== X-Gm-Message-State: ABuFfojXJVbARBeQ3Jl+ilzFHWlYtnOEJec546v0L0YXscazMifLwiYx pfv7/LeIAMMl+SsJZ7ZMLhDFRtMsK0dFqg== X-Google-Smtp-Source: ACcGV60Lqdfp+bPbCMhUv1n+1v++0az64GzYtLk4rFngfzJJzMPJ7HIXP8T2CwO5GI4bv92Ax1lJsA== X-Received: by 2002:a63:5726:: with SMTP id l38-v6mr23425110pgb.118.1539758323124; Tue, 16 Oct 2018 23:38:43 -0700 (PDT) Received: from dhcp-135-24-192-142.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id y131-v6sm19375425pfg.164.2018.10.16.23.38.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Oct 2018 23:38:42 -0700 (PDT) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, Shivasharan S Subject: [PATCH V2 12/19] megaraid_sas: Remove spin lock for dpc operation Date: Tue, 16 Oct 2018 23:37:50 -0700 Message-Id: <1539758277-1882-13-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1539758277-1882-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> References: <1539758277-1882-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Optimization - No need to hold hba_lock in dpc context for reading atomic variable. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 7df7e2c8d4b3..259fc892703e 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -3573,18 +3573,13 @@ megasas_complete_cmd_dpc_fusion(unsigned long instance_addr) { struct megasas_instance *instance = (struct megasas_instance *)instance_addr; - unsigned long flags; u32 count, MSIxIndex; count = instance->msix_vectors > 0 ? instance->msix_vectors : 1; /* If we have already declared adapter dead, donot complete cmds */ - spin_lock_irqsave(&instance->hba_lock, flags); - if (atomic_read(&instance->adprecovery) == MEGASAS_HW_CRITICAL_ERROR) { - spin_unlock_irqrestore(&instance->hba_lock, flags); + if (atomic_read(&instance->adprecovery) == MEGASAS_HW_CRITICAL_ERROR) return; - } - spin_unlock_irqrestore(&instance->hba_lock, flags); for (MSIxIndex = 0 ; MSIxIndex < count; MSIxIndex++) complete_cmd_fusion(instance, MSIxIndex);