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: 109452 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp2477124qge; Fri, 4 Aug 2017 10:46:51 -0700 (PDT) X-Received: by 10.84.225.134 with SMTP id u6mr3691929plj.176.1501868811401; Fri, 04 Aug 2017 10:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501868811; cv=none; d=google.com; s=arc-20160816; b=DuyMqdsbQ6nNsbbqh/Ac68RVMaWql0MT6LrgFEqp2kg8OUWllzbXPySD/T6ivVCeXx XPGSU3+/Fq2yZWyp8p8OX839jjVqomrNEENVZ/suUexlMF5OYDUkPfdzDj5Cd28XJdFK LqkwrO7PndVWRah4KhIxzDCFCJjITKY2RX68A7ZBaeMd/aCm+rubfVLyPOCIhvpse4CW 9XPYV2Y0nZw0U3pA3WP5xBUI7BVV3Q9EX4+EdFgICtCYhOL7z/zBHTOug7jHi6CUtvoV hoFtt1hF7kREd8gC5gCUSy8wxWmmN4XPDShtVW8mTz/MOqOh1h/yfKOVCNJHSITBRw/K zGIg== 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=sZmBv5v/k9+o7CRk6RZUQ+pl83BsvWTxZsuM2Q6vDfg=; b=VmwqyFO/CeOERxs2zB7OFymILx350KvvCKG067IERWz8bBIN33T3Gvxi4CZ0VyOa5c JRNuZ0r0P3sYQ3d5IrImcnHl8W0Fgll1yrsDmF+CLs/YepO3VW27azmBmAyKvUZYYVHr obhNurgsLXX38Mp4+QouTSXQHV+XlR+Q+rrQm/Npbj52yhXZ3YEU7nnRbpGd00yVeoyZ X0jmY0mpys/ooRkaOpbLyl1b89XTiPGWckq+irSHX7cZHPDM5Zt4C34/uCta1cj+zZXT 9NZh2evNH1S6xVVM0VBfBc2gPAuNq7iQ1CCBQI6uIpoHD3QtmtDYf6cDu7wjw2g54Qh1 p9cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.b=r9HGhP98; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 33si1481881plq.897.2017.08.04.10.46.51; Fri, 04 Aug 2017 10:46:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.b=r9HGhP98; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753331AbdHDRqr (ORCPT + 25 others); Fri, 4 Aug 2017 13:46:47 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:38758 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752984AbdHDRoG (ORCPT ); Fri, 4 Aug 2017 13:44:06 -0400 Received: by mail-wm0-f53.google.com with SMTP id m85so25461661wma.1 for ; Fri, 04 Aug 2017 10:44:05 -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=m/9vsee3hWN5Q3sjzKOaqHeCafG1r21/BVUFPjQ6WBQp2juaAQQgsUlzIcuPFmGW3k 4D7/vY9qgBUVwLWOebRhBkAxQaxxvNL3gM7nwrcC0EfEArCT2lFSBLLU4nswYKgaizRC O9iKSCQypzBE2AZ0aJI31auIdV1jx4ZuTukn+WkIWrp7aHW8w8CG6AfosoMcrEvvywsn s1dcri55xXuAWhhOpqv+76ZoQOSmONOd3Ka/OxefN/1q1+Ja7IOcJW8+HFix7+4rMOjP wsLk4sgWjm9HAP62HOifFdt0nTTWxKigdL0Yioq8/CyTCcC2Dl3JtN/FQ42JjNx0B5Td Wq6A== X-Gm-Message-State: AHYfb5gZKRQOf4cHRB1HcPCxSVvw97GO0C3qxiaNn7BYtObV1oC5J5Ny XnSLWhHJ8V6Mpzq2 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 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 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.4 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; }