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: 110586 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1494252qge; Mon, 21 Aug 2017 09:10:15 -0700 (PDT) X-Received: by 10.99.174.70 with SMTP id e6mr13563875pgp.246.1503331815136; Mon, 21 Aug 2017 09:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503331815; cv=none; d=google.com; s=arc-20160816; b=JKinYpJvvleCjAkpK5MTV5D+YtjwAHEPT1rwx/3JbNy5aeaYzei/vCF9SlR2LPqA4D qvudzo5E6FGfvqu5G4oOO+dEKkRVBSoWrUAk0i/yL33+opIjiRn3zyvBV6Ryc6qb+dwY zIxD3bcp9RxoedOrfpKVKoZu+9aRzD5PcohhacyUMR1tqc9iVEXIFNlScHxQv+QRvb/J u32zPlO+e6ctDinVdr9pQrDAxsp+jTq9U0PRaeJj9RiO1Zsuu4Ex/kmmpqNTu7Jc/QSA FvYxZKSbxS3WFrfmjodPtc3k+blwsHFAYOsjYG1VHwTR63DaYrZ+BuGSv6Nhx8U0trFl eg1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=FJHs18Z4CXNKBBP3Uvk/e6a8XiMIWbTkvXDY9cLr9c4=; b=U71rypuP8C0NbACHKIMLAkTgT2yggqklYCnfhpoRzH/SZP32CW3U2wwHgPWdZCn3Ei lva7Oeau6xPlMRPneI+bhA2rU9fjmK2rkQrnUUJ0f5avyBAPggT+/cgnJRS8RzDjilvu xkgpfCcWKANCi/H23YLmfw1kN+QsnsHbm+3vrAuA6Ce+1D59rbydW7v9Z5JbBiI4Czt4 kNitAdtKzFeNGw1LfJbgyY2uRU3/Dx5/26j4e2fyEIg4slCFqKs0l7Ewsq5vy9mXrU8Z GI7bGd8lpJCi4GyuT7T48JjfCgVjK4MHwlr0enOFBzyEQBMN/4/2Vxi88Mzf1O65xF7i itBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=CY6ueAc7; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si7022226plf.66.2017.08.21.09.10.14; Mon, 21 Aug 2017 09:10:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=CY6ueAc7; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754305AbdHUQKN (ORCPT + 6 others); Mon, 21 Aug 2017 12:10:13 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:36621 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754421AbdHUQDK (ORCPT ); Mon, 21 Aug 2017 12:03:10 -0400 Received: by mail-wr0-f180.google.com with SMTP id f8so66997947wrf.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=Nr93DR42KFA/c95QMYTjSlVB0ZlAImIhtDikkiJIL2vRdp8QY0y1UETwhNKnVfliif 4p4SLvLtHA1nQEQnUQ9/Fmn9H2UfQ8eW1Er7Bgs9123754JDzFijxyeyUT8f+j14PNWS cTQpU7ENVj8TbtgPJyg+I2EQXyDLdMBJH0wXGR1OPr+MB/8ATE3K5m+WvTSXMnm0umAI nJ8Y7+U52sIglWmFiGFzuXc6/IenzZ6jviC+hit94Q6lcVjF2PIBLo8MJgjEaBH62eNU +PGapO7vG+50vuRhbaEWT2K47i8fM3NeYCAWsSws71rjqvnwqs1g6xAihFDL6ZNsfRu8 Yrzw== X-Gm-Message-State: AHYfb5i8ysc19qI9CnEEzOiB7KNdzvx8KRXC/H+7EuxduhDdIvf9O1UP 5m4hmVtlISZMXY6Y 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 Cc: Jerome Brunet , linux-mmc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org 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(-) -- 2.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }