Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4796478pxu; Wed, 21 Oct 2020 05:45:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymFRDuOOUATTUwX8/RQormxGMwU/wP4QWhbSnnQpkrXxxF450pntaiKe+OJgS8q88dYA+H X-Received: by 2002:a17:906:4b18:: with SMTP id y24mr3501225eju.416.1603284317759; Wed, 21 Oct 2020 05:45:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603284317; cv=none; d=google.com; s=arc-20160816; b=j5GKLtSbjA+XWqRyeCGOKHQqr5vphdTGuZL4xsYrGmifYKUJUC6ofOIj/JvCbwkwOE BvyQXkLqB/EzE+ZAMFYjBMYF0fn+n6ywzKSAGV01aUCp5ow76yFv4uJF8gYzIYeT//TB uStDtkXKFILRZ6p2Jj3Rh5Dd5xXyfUmDjYedp0vdPmErVaHqkNtG6E0iNIAYrhGnvLuQ HdjDHC0Hi0Y4FWCWq36SgzkfLIdI+NcCFfRgGSUVD/m3bBhvZt9rmWiRenrtaJMd3T3i i0biOcKfB9fRQ7EFVCbtvhbL+REgUyyXxVmEn045zNsISq1JEPPg4sCPyVi2ahgX8T0H OX7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=v7lJx9zYgH4vNQ4Z+2sCXtsY4IelKbPSUc0cEyUMLZ0=; b=jHozArv1sLfo5qewQb1xPTkT21j9Ih/T+kwAvIsV+Jyft1xHnM1yTs4RqJhyP0Qn00 9lSjO2F4fcrTa1TF7gXKqBqWcMpeA8iuGg51sSBi1e627KyWaSE0og3tIZEfqXynw7iU +BXHRrmAbYoGzMtsdYHnSouKRpfy9op5FjD7QUYd43O9qu/AvqTOdyWYaPwpImtlsx58 VTNb+HKS++C7p00REbnAhDHJJgwISZxzoNAxlt7ZxwtzIpsdEm5jSz8rq77wbKhlz5wG vD8E8uKFKXHPCu8D+OpiRwNPWkdI9D9Lpl/+xM0IiLp3c7SThwZF2JWDCSzv0Nmodkid oUng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i14si1362458edl.282.2020.10.21.05.44.55; Wed, 21 Oct 2020 05:45:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390801AbgJUG4M (ORCPT + 99 others); Wed, 21 Oct 2020 02:56:12 -0400 Received: from smtp.h3c.com ([60.191.123.50]:10849 "EHLO h3cspam02-ex.h3c.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730565AbgJUG4M (ORCPT ); Wed, 21 Oct 2020 02:56:12 -0400 Received: from DAG2EX03-BASE.srv.huawei-3com.com ([10.8.0.66]) by h3cspam02-ex.h3c.com with ESMTPS id 09L6t8vc026263 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 21 Oct 2020 14:55:08 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from localhost.localdomain (10.99.212.201) by DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 21 Oct 2020 14:55:10 +0800 From: Xianting Tian To: , , , , CC: , , , Xianting Tian Subject: [PATCH] scsi: megaraid_sas: use spin_lock() in hard IRQ Date: Wed, 21 Oct 2020 14:45:02 +0800 Message-ID: <20201021064502.35469-1-tian.xianting@h3c.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.99.212.201] X-ClientProxiedBy: BJSMTP01-EX.srv.huawei-3com.com (10.63.20.132) To DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) X-DNSRBL: X-MAIL: h3cspam02-ex.h3c.com 09L6t8vc026263 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since we already in hard IRQ context when running megasas_isr(), so use spin_lock() is enough, which is faster than spin_lock_irqsave(). Signed-off-by: Xianting Tian --- drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 2b7e7b5f3..bd186254d 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -3977,15 +3977,14 @@ static irqreturn_t megasas_isr(int irq, void *devp) { struct megasas_irq_context *irq_context = devp; struct megasas_instance *instance = irq_context->instance; - unsigned long flags; irqreturn_t rc; if (atomic_read(&instance->fw_reset_no_pci_access)) return IRQ_HANDLED; - spin_lock_irqsave(&instance->hba_lock, flags); + spin_lock(&instance->hba_lock); rc = megasas_deplete_reply_queue(instance, DID_OK); - spin_unlock_irqrestore(&instance->hba_lock, flags); + spin_unlock(&instance->hba_lock); return rc; } -- 2.17.1