Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3268722pxb; Sun, 7 Feb 2021 03:45:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzC4M6EkNvcJ6XcsUb+JO6HqVBviA79sHKqQnyDhZfqlksIe/+WDDhzRkDAkTLRN5OVJhFD X-Received: by 2002:a17:906:c34d:: with SMTP id ci13mr12544841ejb.333.1612698350906; Sun, 07 Feb 2021 03:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612698350; cv=none; d=google.com; s=arc-20160816; b=J/gxzODQCgKvybJzdytM/zaa1Acw3WmyOw9vC/vBicAr/3hd+IouqvtR+pog4aBFYD DAJOyVBvFK+rIVtU+6adMExPjqV8xSeCa0YY7PfZB8sLt5e0bLK4omPfFXRapYHTAG3S r0RTuT08g1hYtrTRo0arQdpV7tkuxbx2cvVE6lYJ5/D5SaFT3QI5uirSJItcVeynrLlS e4yLATnWgUCZcfQFf04QWHiAPDkLjBvGFaS3uJ/kDkt+7P2B85fPOKNWH39kPEoFrC/d hbK0kNhfX8HUY98iqaMr1R7vEG75Q+ulfg/O2yswbv13DBIymmb224kuNBel9tb9/6PO rwhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=wFVpUAVkdKpdQilxH91GwhHpewmlFKO9I7abBdTs7HQ=; b=ygU/XQ0kdXdRgAwsdIKvpVLLSeigBeLA+KG8snBfVmKFS2HMyMEUy9wBcjBf9IpMLX Ke+KoXHA5EbBci6fk9pdjggnA+s/hv67N2kSMdUyEFpDJBBQdOaBz3vAJH4bZDa3/Aut PEXgA24jNFuHPk8FeogVGkt3N0tHxJwINxn+g80F3I3k4QSf0OHBsqD43COOfmHovRm3 BGmrBF/DoUMDx8ABqhqxvFXPD/6pfRxGxmm54dSib05+MCuFaWeMKsK50j2/Zmol5G7U dgm0yNAYvRY99hmO5esuhDuMLpJZD10mSekUTo4sAY2k+pvGvdLFWYqemTK+Bij9Oumy 8Pvg== 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 hs14si9904030ejc.159.2021.02.07.03.45.27; Sun, 07 Feb 2021 03:45:50 -0800 (PST) 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 S229626AbhBGLob (ORCPT + 99 others); Sun, 7 Feb 2021 06:44:31 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:12448 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229681AbhBGLk0 (ORCPT ); Sun, 7 Feb 2021 06:40:26 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DYRxV0b6mzjJlk; Sun, 7 Feb 2021 19:38:38 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Sun, 7 Feb 2021 19:39:37 +0800 From: Xiaofei Tan To: , CC: , , , Xiaofei Tan Subject: [PATCH for-next 29/32] scsi: stex: Replace spin_lock_irqsave with spin_lock in hard IRQ Date: Sun, 7 Feb 2021 19:37:00 +0800 Message-ID: <1612697823-8073-30-git-send-email-tanxiaofei@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1612697823-8073-1-git-send-email-tanxiaofei@huawei.com> References: <1612697823-8073-1-git-send-email-tanxiaofei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is redundant to do irqsave and irqrestore in hardIRQ context, where it has been in a irq-disabled context. Signed-off-by: Xiaofei Tan --- drivers/scsi/stex.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 1247120..1e797d1 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -886,9 +886,8 @@ static irqreturn_t stex_intr(int irq, void *__hba) struct st_hba *hba = __hba; void __iomem *base = hba->mmio_base; u32 data; - unsigned long flags; - spin_lock_irqsave(hba->host->host_lock, flags); + spin_lock(hba->host->host_lock); data = readl(base + ODBL); @@ -897,14 +896,14 @@ static irqreturn_t stex_intr(int irq, void *__hba) writel(data, base + ODBL); readl(base + ODBL); /* flush */ stex_mu_intr(hba, data); - spin_unlock_irqrestore(hba->host->host_lock, flags); + spin_unlock(hba->host->host_lock); if (unlikely(data & MU_OUTBOUND_DOORBELL_REQUEST_RESET && hba->cardtype == st_shasta)) queue_work(hba->work_q, &hba->reset_work); return IRQ_HANDLED; } - spin_unlock_irqrestore(hba->host->host_lock, flags); + spin_unlock(hba->host->host_lock); return IRQ_NONE; } @@ -987,9 +986,8 @@ static irqreturn_t stex_ss_intr(int irq, void *__hba) struct st_hba *hba = __hba; void __iomem *base = hba->mmio_base; u32 data; - unsigned long flags; - spin_lock_irqsave(hba->host->host_lock, flags); + spin_lock(hba->host->host_lock); if (hba->cardtype == st_yel) { data = readl(base + YI2H_INT); @@ -997,7 +995,7 @@ static irqreturn_t stex_ss_intr(int irq, void *__hba) /* clear the interrupt */ writel(data, base + YI2H_INT_C); stex_ss_mu_intr(hba); - spin_unlock_irqrestore(hba->host->host_lock, flags); + spin_unlock(hba->host->host_lock); if (unlikely(data & SS_I2H_REQUEST_RESET)) queue_work(hba->work_q, &hba->reset_work); return IRQ_HANDLED; @@ -1011,14 +1009,14 @@ static irqreturn_t stex_ss_intr(int irq, void *__hba) writel((1 << 22), base + YH2I_INT); } stex_ss_mu_intr(hba); - spin_unlock_irqrestore(hba->host->host_lock, flags); + spin_unlock(hba->host->host_lock); if (unlikely(data & SS_I2H_REQUEST_RESET)) queue_work(hba->work_q, &hba->reset_work); return IRQ_HANDLED; } } - spin_unlock_irqrestore(hba->host->host_lock, flags); + spin_unlock(hba->host->host_lock); return IRQ_NONE; } -- 2.8.1