From patchwork Mon Aug 21 16:02:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9913201 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8D550602A0 for ; Mon, 21 Aug 2017 16:07:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82EED287CF for ; Mon, 21 Aug 2017 16:07:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77751287CE; Mon, 21 Aug 2017 16:07:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EA96E287CB for ; Mon, 21 Aug 2017 16:07:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=rqlJcApiewzmx7Qs9c36l45Sv7nSQAAJealKNDuYuKM=; b=Zo2SnUIQYUumDP9r2xm8DnTmZE nDLT2M5FNU0eZAN+x6QjMGzMZH1FuFdM4lp6DorwIVzk0jqTgdqmwYIS+2Y9f6aI1tXjj2cFGLqM2 MnANZbPf4M3+hb5OYFViRfeR688YnqsE4zeoT8G9etXYBrz/Fs2h1u7KZSrk4tHK70xAM/IZEozzZ BUWQ1XIlqwh/8APNUktwz2GM13esjQ/gJcd2rGC4f0DCUV/NITaHfD0WA4t7zaBxu98aqemukwpg1 fxG5FzggET/66blmbVK7WXrw5fiKF2KuDXh5wfD8gEDQ2rEUgDZnmZN8rDMOM00nGkNhVeUge9mrC F9gp9yNQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1djpEB-0004fn-BG; Mon, 21 Aug 2017 16:06:59 +0000 Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1djpAp-0001Ez-A1 for linux-arm-kernel@lists.infradead.org; Mon, 21 Aug 2017 16:03:37 +0000 Received: by mail-wr0-x22d.google.com with SMTP id f8so66997952wrf.3 for ; Mon, 21 Aug 2017 09:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=e/mkEh6vKb3w27VkaFQj3TwBFoTzGLL2dmtRmcksRPQ=; b=CY6ueAc7BrXQM3F4Ra0uWtNwubq01psnaT2P/baIPZ2e5mHcku9+TpFxw52MlPyy6M HBQZq6HqJP4ZgGyqqZrf11drU+xEpMJBgyPmpbZG7mWWC/TkIjgNnzTPPJAUGpRIEDvd qvDufflpDX9DVTAfopGd5bEwoGHshIHteBNL13Dz5CCdbmBVato/6olfhpXgP+AMHoEY hC7613hIM4Af7K3cJp5gPeP42cNh1UxymjCMK/8q11T42NtosBQ50SaTKgBzJ6+Tuqy+ 6vH2QBfaYWA7QigsoXQ2Cpb1Z0LryQjDWJf9QxUD9hQXlGMblQnP6X9spvhdhxyZXEcm uckw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=e/mkEh6vKb3w27VkaFQj3TwBFoTzGLL2dmtRmcksRPQ=; b=bq0qeCF42IfiH29uvTANGp38g5dJIbISRTPA0qo2Gnc6tVwXvBn6Iq0k3Naq07PM7L Mk1n7/xDZOTMkAsgytQD+fb1BqCdLl09n6UIjlufiGVQjlPZ2M39FttQub1a/Qw4WNbT adzS2KF9pukVyXIgozGWVZbDQ8/L/Rd408miiRvLpBiGMftyXSaqgzctpQiD1GbDNn8/ 9qw9Gfer9EIJk6AcVAkRwWnAHiXFTZuqqiPhjmS69YYOr77eBhhPJtAuWmKFHs5MBxBN cuC4kUgDBe8CVhf4tdX5m+585u76071g8Ewv7iOgxzgQ26WKZcZNsmCMZMs9QEWh0KXQ nC1w== X-Gm-Message-State: AHYfb5gqmP6iYIsZ7yWhSHdnsTSrS4WA7Kot1HdP5fctZwM/5Xt4Ulfb fTzaU4xVX1D7iqvS X-Received: by 10.223.179.83 with SMTP id k19mr507430wrd.232.1503331389568; Mon, 21 Aug 2017 09:03:09 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id 63sm8120063wra.30.2017.08.21.09.03.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Aug 2017 09:03:09 -0700 (PDT) From: Jerome Brunet To: Ulf Hansson , Kevin Hilman , Carlo Caione Subject: [PATCH v2 04/16] mmc: meson-gx: use _irqsave variant of spinlock Date: Mon, 21 Aug 2017 18:02:49 +0200 Message-Id: <20170821160301.21899-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170821160301.21899-1-jbrunet@baylibre.com> References: <20170821160301.21899-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170821_090331_627822_E2693067 X-CRM114-Status: GOOD ( 10.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP spinlock used in interrupt handler should use the _irqsave variant Fixes: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms") Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet --- drivers/mmc/host/meson-gx-mmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 8a74a048db88..a399fbd415f4 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -727,6 +727,7 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) struct mmc_command *cmd; struct mmc_data *data; u32 irq_en, status, raw_status; + unsigned long flag; irqreturn_t ret = IRQ_HANDLED; if (WARN_ON(!host)) @@ -739,7 +740,7 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) data = cmd->data; - spin_lock(&host->lock); + spin_lock_irqsave(&host->lock, flag); irq_en = readl(host->regs + SD_EMMC_IRQ_EN); raw_status = readl(host->regs + SD_EMMC_STATUS); status = raw_status & irq_en; @@ -806,7 +807,7 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) if (ret == IRQ_HANDLED) meson_mmc_request_done(host->mmc, cmd->mrq); - spin_unlock(&host->lock); + spin_unlock_irqrestore(&host->lock, flag); return ret; }