Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1772496pxu; Sat, 17 Oct 2020 00:11:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMgT2Fp04jpLhypK9n6NUuH3NBxeOfk5j4XzO65heV3sBs/wVHjK2Dmu/78K6OUUT1pkAd X-Received: by 2002:a17:906:4a4c:: with SMTP id a12mr7373746ejv.392.1602918705335; Sat, 17 Oct 2020 00:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602918705; cv=none; d=google.com; s=arc-20160816; b=Hx1NtC8hcw+VxIN9a2KaiH+AWtsAuAk3rcgvZ9afVXk7XkIHCM358mR4sfjqdDIh4H /hyneZp9f1aY5FXMJs7hkLvG/RWNT3Hml0TSbNikrZdKohYGNG8HbYEkHODOozLn0yHW le7qfZR4XFc33NoCiA4WzMMk06fCd0y9gNeyhwh58/yyZnhfGGdHqskvocENtkVKglDI NMVqQYP0ZImLyooTIGGJUOrUwGu0UFJLzKhWoDycPLxxtGG8h3zc0v5X5N8+PDMEcQNg xRMdYvpCCKI2vmRtP1w/rlwiWIONAmCT7NcqbJqz7X0F+dJ3XsZBgYAFyYiaulr23OKU lzpA== 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:to:from; bh=8D8g2Y84hErYivK8TVa/XKUV651zjvv4cT4jKL45dvU=; b=bFzntWDz1YLphIztIMf2FQ/JgTgJBadu7X1Q20lHg2YUUpiSel6Hz76nt7YK0FriZx DeBilLAMX8SmgbeasFhEQMC8/gNh1eLVm2maenqgkXU9czpPDqUy+lRlBzXeW+F5mW9u Uc0EkMEPFBgL7REJgiXLmsKVEZkt/nx+jXl6aJfL0gzgZDH65Q/7qbp2hVQtI35+vkNM gwpjU9Xgzk6HdkiP+gUb78F1cCPNshs0+1gKnks2ijlIRAFZg3bozuJUBmoVdSGqC3eg +U6YSGTA/000nf5utIJZWJNrYYxUy9lncsO1Eqrq4OOrNX5+3YrKBY9uOn8fGaALrKHL 5TVQ== 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 y19si3550350eje.569.2020.10.17.00.11.23; Sat, 17 Oct 2020 00:11:45 -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 S2409917AbgJQF2j (ORCPT + 99 others); Sat, 17 Oct 2020 01:28:39 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:15751 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2392021AbgJQF2j (ORCPT ); Sat, 17 Oct 2020 01:28:39 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3A8BEC23779967992C84; Sat, 17 Oct 2020 09:39:31 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Sat, 17 Oct 2020 09:39:28 +0800 From: Tian Tao To: , , , , Subject: [PATCH] ipmi_si: replace spin_lock_irqsave by spin_lock in hard IRQ Date: Sat, 17 Oct 2020 09:40:10 +0800 Message-ID: <1602898810-31783-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] 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. Signed-off-by: Tian Tao --- drivers/char/ipmi/ipmi_si_intf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 45546ac..97452a8 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -1116,7 +1116,6 @@ static void smi_timeout(struct timer_list *t) irqreturn_t ipmi_si_irq_handler(int irq, void *data) { struct smi_info *smi_info = data; - unsigned long flags; if (smi_info->io.si_type == SI_BT) /* We need to clear the IRQ flag for the BT interface. */ @@ -1124,14 +1123,14 @@ irqreturn_t ipmi_si_irq_handler(int irq, void *data) IPMI_BT_INTMASK_CLEAR_IRQ_BIT | IPMI_BT_INTMASK_ENABLE_IRQ_BIT); - spin_lock_irqsave(&(smi_info->si_lock), flags); + spin_lock(&(smi_info->si_lock)); smi_inc_stat(smi_info, interrupts); debug_timestamp("Interrupt"); smi_event_handler(smi_info, 0); - spin_unlock_irqrestore(&(smi_info->si_lock), flags); + spin_unlock(&(smi_info->si_lock)); return IRQ_HANDLED; } -- 2.7.4