Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3950357pxb; Tue, 10 Nov 2020 04:28:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKOOABxnVJWgep6sZOP1vFNxMFFoymh8eeCt97dInlY/bviPs0GjChpvJCkfU8rwSOx22X X-Received: by 2002:a17:906:3813:: with SMTP id v19mr7239176ejc.462.1605011317132; Tue, 10 Nov 2020 04:28:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605011317; cv=none; d=google.com; s=arc-20160816; b=oafXkV+02WePh+pVZpE9RPonWtCi3GiJjpLwXjwksiTTPq/f9n1xUaxQ7rlcF0eG4G gffGUub3SPgi9/LE0jRCvkinFvgE0DmoeGcjPbKNmto8gwTr0lM0/fK38Xj5swNRgIi9 tql0T6GzrTmxvbcBWmZxVT72UbUtWkVNHoDjeG9UsVkgmkr6WQ/zT8WZdqsAugezrXn6 PwCN3Lt/MpwDql3MxLroH9REx35yW3LV3ctvnwfYfo2HzoIv3iW+zmujbp6T3Jm1D5mi FnXgcK6lxVkBoNz6r+dE4i58IBLPtx1OPRehMOAPdDg19iHE1HEnivHUGl0gS0U4N1yM KsVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1gsnklr3mYZvBcAXWrQJZvljO/2f2xo3pLHWaomWfKM=; b=I7cHCi/zqMEDmDxBH3SpkxatRB15Pstz3jCRSYI+h9qXNcpuJ+yWJJDjVVjsCliVsl mXmrQYAqKdyYbyYs5CNuOzv5D8EKyvEJE/P7B1xJVEYbuRWeka4A/aROS0trr5cjwnEz M/5mfUcaK7FlDRZoUkXwWTcP8CC53M3VCYgbnfLsTLmiOfcWcOwLIJcjB7I6mK1cNZ6W DmCE++lxE7/3QFdBBFBpDnyBwH7Kc48NnhUVW/0Vi99JD4cg0MFAglMadvXDsic5hHOo QylzMf5MDwbK5POSmK4eYOdqTiSs+j6DC0ByJgRs7zqjk/pAEn2kDSHU9fcEaXcp9lg/ ynfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AsreJSV5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si5068330ejm.476.2020.11.10.04.28.06; Tue, 10 Nov 2020 04:28:37 -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; dkim=pass header.i=@linaro.org header.s=google header.b=AsreJSV5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730018AbgKJM0m (ORCPT + 99 others); Tue, 10 Nov 2020 07:26:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726690AbgKJM0m (ORCPT ); Tue, 10 Nov 2020 07:26:42 -0500 Received: from mail-vk1-xa42.google.com (mail-vk1-xa42.google.com [IPv6:2607:f8b0:4864:20::a42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B928C0613D1 for ; Tue, 10 Nov 2020 04:26:42 -0800 (PST) Received: by mail-vk1-xa42.google.com with SMTP id m6so129789vkl.2 for ; Tue, 10 Nov 2020 04:26:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1gsnklr3mYZvBcAXWrQJZvljO/2f2xo3pLHWaomWfKM=; b=AsreJSV5v2zViOmWEF5BArd1fuqP1AHcftElNgRdDEhKheqMyX+7CjEaNTVKlG7dSr F0OWpyQkcM32nEJbiSC0zKvOAe4ICSU5qBw0u/tunZe/W50wSQtzZdMW4psl48Vd1Vtz 3jdLPN5kPtI30oaQtIKB9JzRK7scZUONYgRqPd7tkAYgQCvqp69/Q33ydZJkA47ctevM 6rGHhBFq4lnkoCjbwoCwZ/jWYCgkAjbDMCvc+Nv3zoJnJBNmIC2Asdl+QjqLe8eHPwWI Nsc4MnkA9wXM5XM5HFCOXl29o1nVTGCLjGkRe5RB+eHtxvYlj5gE5dr49VQx0Treg5Z7 ROjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1gsnklr3mYZvBcAXWrQJZvljO/2f2xo3pLHWaomWfKM=; b=g6zSn6wZ0sD0ZfB6tilU0S3jawaCHaHANKPPKrGfQTsAvdy16mIiqi8T5LeRf+blfb FrJThoyR51PyBJAPMv3+C3QnRgN++5wd5L9uzOiFHJJDt9QkQeBZWMbRQTdRU/g92vaT JNc3U1Yz4rtZrzLZHldGVuvI836cdcso3ZBhA2g5qzB8FZIO8eGIYahJYRecU91dJRj3 C6LyxA6cH40r1ZSc//kLMTl8bTwlkK4GjFOCFz2jjwCXEWH5CEJ2p1F/UwacvynH7Iqc eidwmuHSeAN+3V0PVH+AxZ3X4bCe91qVhzHVSfyhB7wABuI3ElnzVNxUs5JV19aWZ1j9 nSDg== X-Gm-Message-State: AOAM532T+hZst+UgtSx7V+yvFXeX7MSKWKVDbGMGGk933UnLBDR8DS8g 78tRoLku9x/odXZk/7zqlBUugjfNSEruv/0GdUxeJA== X-Received: by 2002:a05:6122:10eb:: with SMTP id m11mr10060860vko.8.1605011201227; Tue, 10 Nov 2020 04:26:41 -0800 (PST) MIME-Version: 1.0 References: <1604627813-59785-1-git-send-email-tiantao6@hisilicon.com> In-Reply-To: <1604627813-59785-1-git-send-email-tiantao6@hisilicon.com> From: Ulf Hansson Date: Tue, 10 Nov 2020 13:26:04 +0100 Message-ID: Subject: Re: [PATCH] mmc: dw_mmc: replace spin_lock_irqsave by spin_lock in hard IRQ To: Tian Tao Cc: Jaehoon Chung , Philipp Zabel , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Nov 2020 at 02:56, Tian Tao wrote: > > 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 Applied for next, thanks! Kind regards Uffe > --- > drivers/mmc/host/dw_mmc.c | 17 ++++++++--------- > 1 file changed, 8 insertions(+), 9 deletions(-) > > diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c > index 43c5795..a524443 100644 > --- a/drivers/mmc/host/dw_mmc.c > +++ b/drivers/mmc/host/dw_mmc.c > @@ -2617,7 +2617,6 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) > struct dw_mci *host = dev_id; > u32 pending; > struct dw_mci_slot *slot = host->slot; > - unsigned long irqflags; > > pending = mci_readl(host, MINTSTS); /* read-only mask reg */ > > @@ -2632,15 +2631,15 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) > * Hold the lock; we know cmd11_timer can't be kicked > * off after the lock is released, so safe to delete. > */ > - spin_lock_irqsave(&host->irq_lock, irqflags); > + spin_lock(&host->irq_lock); > dw_mci_cmd_interrupt(host, pending); > - spin_unlock_irqrestore(&host->irq_lock, irqflags); > + spin_unlock(&host->irq_lock); > > del_timer(&host->cmd11_timer); > } > > if (pending & DW_MCI_CMD_ERROR_FLAGS) { > - spin_lock_irqsave(&host->irq_lock, irqflags); > + spin_lock(&host->irq_lock); > > del_timer(&host->cto_timer); > mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS); > @@ -2648,7 +2647,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) > smp_wmb(); /* drain writebuffer */ > set_bit(EVENT_CMD_COMPLETE, &host->pending_events); > > - spin_unlock_irqrestore(&host->irq_lock, irqflags); > + spin_unlock(&host->irq_lock); > } > > if (pending & DW_MCI_DATA_ERROR_FLAGS) { > @@ -2661,7 +2660,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) > } > > if (pending & SDMMC_INT_DATA_OVER) { > - spin_lock_irqsave(&host->irq_lock, irqflags); > + spin_lock(&host->irq_lock); > > del_timer(&host->dto_timer); > > @@ -2676,7 +2675,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) > set_bit(EVENT_DATA_COMPLETE, &host->pending_events); > tasklet_schedule(&host->tasklet); > > - spin_unlock_irqrestore(&host->irq_lock, irqflags); > + spin_unlock(&host->irq_lock); > } > > if (pending & SDMMC_INT_RXDR) { > @@ -2692,12 +2691,12 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) > } > > if (pending & SDMMC_INT_CMD_DONE) { > - spin_lock_irqsave(&host->irq_lock, irqflags); > + spin_lock(&host->irq_lock); > > mci_writel(host, RINTSTS, SDMMC_INT_CMD_DONE); > dw_mci_cmd_interrupt(host, pending); > > - spin_unlock_irqrestore(&host->irq_lock, irqflags); > + spin_unlock(&host->irq_lock); > } > > if (pending & SDMMC_INT_CD) { > -- > 2.7.4 >