Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3469423pxu; Mon, 19 Oct 2020 12:55:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyW4aY8WP3M2wIlR+7s83ubBpOgA/kbuwpsq+uBeqK4Tx2vuI/im6Gjx6O1FpmnNMza9wN X-Received: by 2002:a50:fb13:: with SMTP id d19mr1497321edq.215.1603137344051; Mon, 19 Oct 2020 12:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603137344; cv=none; d=google.com; s=arc-20160816; b=ikpviD53eNkCqe1QMSZILRb4Lfe4imu843RkjG1C4V+c8xPdSF36ATA+6VXYUBPMDL gj3GSMDe7ltzgnKkZXRLjd6PP7L9b1UpuG1B5CTQyGZZxJixJvI6Lf72WSGM7VrNsugA WrW3pQ/FoTMhMDNF1vOjLSJ8MIGzEbDtK5nPXqOAuh3LCzcVrUz4+H2KMWAT4/ZitrhG LH2E5k6mcOCzWFvbPVzeIAzZ+TlfmCrVaFKRpyO7Rx/7dYfzTPr4o0Ku1lg3EJvkLeZX CP0ZuqqmnC5RM8buVO27ToPe5yMmRe7zSxeEai9qKCkKfZsHJrIZX8KKO4edK56EzzjT sndQ== 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=ElhkkMlt8o4olm8EO6ekkhrW2x8KxaJLJAP7pXC9B2k=; b=jSyHBHh5eZqMyRUUXiRXX3Np9yRZbI/skJcqXUnnsJ76DfXJpF348C5TMstCD0QRjP zBr/M6q/L+KEDqkkecZR3GuOh8QgIeXS3RcsGanljo5O8keVcVXAIlZQvYLRDYqvoU3i jX+HbWJWZeVjLNSzqe22+pDNI3AFQt2M/HCWRNw5Fyu8J8rM27+RILSweQ2RF+IgNhuI fffnUWbrd2eeFbJw/gM+YfXIH+O65d55g7twg6QYq5YiQbZI+dlUWy/nGjUZAVNByTxm 8pMb+bcGv/MN8cXXa+eHGWnF5v4fd0DEutVlZItDroEBYWr87swm+BH066IqcCbWMp9c jh+Q== 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 y19si702476eje.569.2020.10.19.12.55.21; Mon, 19 Oct 2020 12:55:44 -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 S1730041AbgJSAmf (ORCPT + 99 others); Sun, 18 Oct 2020 20:42:35 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:41496 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726219AbgJSAmf (ORCPT ); Sun, 18 Oct 2020 20:42:35 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 7656D88266D34F4C0099; Mon, 19 Oct 2020 08:42:32 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.487.0; Mon, 19 Oct 2020 08:42:28 +0800 From: Tian Tao To: , , , , , , , Subject: [PATCH] mmc: mediatek: replace spin_lock_irqsave by spin_lock in hard IRQ Date: Mon, 19 Oct 2020 08:43:13 +0800 Message-ID: <1603068193-44688-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 The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/mmc/host/mtk-sd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index a704745..fb3e419 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -1536,13 +1536,12 @@ static irqreturn_t msdc_irq(int irq, void *dev_id) struct mmc_host *mmc = mmc_from_priv(host); while (true) { - unsigned long flags; struct mmc_request *mrq; struct mmc_command *cmd; struct mmc_data *data; u32 events, event_mask; - spin_lock_irqsave(&host->lock, flags); + spin_lock(&host->lock); events = readl(host->base + MSDC_INT); event_mask = readl(host->base + MSDC_INTEN); if ((events & event_mask) & MSDC_INT_SDIOIRQ) @@ -1553,7 +1552,7 @@ static irqreturn_t msdc_irq(int irq, void *dev_id) mrq = host->mrq; cmd = host->cmd; data = host->data; - spin_unlock_irqrestore(&host->lock, flags); + spin_unlock(&host->lock); if ((events & event_mask) & MSDC_INT_SDIOIRQ) sdio_signal_irq(mmc); -- 2.7.4