From patchwork Fri Aug 4 17:43:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9881859 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 B7DB1602B8 for ; Fri, 4 Aug 2017 17:47:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A523A2891B for ; Fri, 4 Aug 2017 17:47:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 999A82896E; Fri, 4 Aug 2017 17:47:49 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE 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 312D12891B for ; Fri, 4 Aug 2017 17:47:49 +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=NgkrZTEzAIAbVXhrdrpCy6zlZFVCeSsFsPxYt/szbMM=; b=nwBSGI6h3XuSv+0Bl1wVHmSsoh YD7dHMZXQ/hp/m4MLUnr6/LkHSgORWQ36p8IujoArnwBp6FZtjhNOz8v1saq4cHzU2y4MOeWLjkas BRHONzRSNzVudo5ZmXER8NwUCRZY4yP+0+aYBrFXv3wTAw9G/pIBTyzQ49TmJenvkjAnM+wlmFqvT R2FP5yyF3dvHZGjyDKDuWCX9U0C6Y0KgaGvtel3pjAPztg0y6RXf30XJuvAY+/d3JSU8vgrW3V6d0 zDai8cLWqJMTK36LQziGJtReF+IVpfxyEgaNQoIEzuJ6AsyvoKBFbvOtjFUqXVMVkHHHsZODA9OdY 8sjq94+w==; 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 1ddghO-0001Zc-4B; Fri, 04 Aug 2017 17:47:46 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ddgeA-0005oW-RM for linux-arm-kernel@lists.infradead.org; Fri, 04 Aug 2017 17:44:42 +0000 Received: by mail-wm0-x233.google.com with SMTP id t201so25436408wmt.0 for ; Fri, 04 Aug 2017 10:44:06 -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=sZmBv5v/k9+o7CRk6RZUQ+pl83BsvWTxZsuM2Q6vDfg=; b=r9HGhP98oogJL+k34wTG0KXqZ8pkNxvk93oPfathNejaLXS3lvUBsK5tQa49B0EDpF wJ2eMOqbaTv0h3lf4y9OYw+yKehK0D2KnczrAmEFSytNodg+s32fMVfcuqIhun/ZczqK Q9i7i56NA4vcMRZn7xtY+hgsH/ttYQehyujZfc29wD+QahnpALVAWh913LSF80crvOox WCF+jeEFAdQceIKFBljMSXFKY28DJwKQWEkTlhg/6rp7lo3pyNoTg4pBzP+l5ti+S+ln vMVGepD7bELJreNnwX63HOaLINMTE8j24nh0UhWBzXYppyDRlvYRAWUJ9bL/oS/9fD4a HoUQ== 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=sZmBv5v/k9+o7CRk6RZUQ+pl83BsvWTxZsuM2Q6vDfg=; b=TZXXUuD2SqTu15Qw0TyxqXITc+NPbLSJ/U/xGl+t5AffIXjpcLAs1rSSc3+YrMJA6Q ZM1ZMC3poI51xZ9380Ecu2xhPq7LlFXiHcBHdGRpPu0NKdu3uvFVOs1izafMQc8RqPWI 4XRPSKys0SpV3XSKPOHr8FIOfMLklJGgT+bHrPzG92KKBzdZxgqBolu6YJPSm2nbD6Ur n0q+M+hJnB4Q+wE3E01T7txSaOXHyc88A7DuOJ5goB+cat8n8lSFi/1RdZe2OXNK8L5O 3XfUUr+CKD9n6jHCvb1oPja47rHeIrMW6YzuZcS6Zw9h0861bE6AwL4M3yTlZyMbQtvF z65g== X-Gm-Message-State: AHYfb5g2qB5im/V3jR0KRFIfMWNVpKF7K9O3J0qUDXOWD/eJ9WMqGDxl JVtNFUYEy9PhfnP4 X-Received: by 10.28.100.136 with SMTP id y130mr2223693wmb.60.1501868645128; Fri, 04 Aug 2017 10:44:05 -0700 (PDT) Received: from localhost.localdomain (cag06-3-82-243-161-21.fbx.proxad.net. [82.243.161.21]) by smtp.googlemail.com with ESMTPSA id p17sm996082wma.45.2017.08.04.10.44.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Aug 2017 10:44:04 -0700 (PDT) From: Jerome Brunet To: Ulf Hansson , Kevin Hilman , Carlo Caione Subject: [PATCH 04/14] mmc: meson-gx: use _irqsave variant of spinlock Date: Fri, 4 Aug 2017 19:43:43 +0200 Message-Id: <20170804174353.16486-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170804174353.16486-1-jbrunet@baylibre.com> References: <20170804174353.16486-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170804_104427_545210_3FAD9CA3 X-CRM114-Status: UNSURE ( 9.22 ) X-CRM114-Notice: Please train this message. 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") 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; }