From patchwork Thu Oct 27 18:57:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 9400219 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 547D860231 for ; Thu, 27 Oct 2016 18:58:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39DE02A380 for ; Thu, 27 Oct 2016 18:58:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EA952A381; Thu, 27 Oct 2016 18:58:25 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCA652A382 for ; Thu, 27 Oct 2016 18:58:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938624AbcJ0S6G (ORCPT ); Thu, 27 Oct 2016 14:58:06 -0400 Received: from mail-ua0-f193.google.com ([209.85.217.193]:32887 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938607AbcJ0S6D (ORCPT ); Thu, 27 Oct 2016 14:58:03 -0400 Received: by mail-ua0-f193.google.com with SMTP id 20so1714152uak.0 for ; Thu, 27 Oct 2016 11:58:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ULXdX72HTTAOQjelFFpqA15AOywnKaAaGmZnZGn81V8=; b=CN/itp7Bo/4nt2rzeOo0m1mTf55FAVScustgb88NzqBBaUJpn3muNB9dECyewLp41c YfKCCdxKzApTO23Lul1L6e/vviPjCfLcZfn/qtxpCihAWeG+gjzVZ2LdkesU6cyboS7F LWm9m8wpV7wP38qdudoYaL53ByI6ffDt0c8P9E2db0L011pRiYtNw762kMZfVlx/HMCM aiQlKlkm+UBihtriZQ40iRHSVR2GCvQg5RQiAi0GHQ7WIKcOW32ULUO+xa9tp2M6ng2P VBWLk1bsNmDi+uHmwLoXDMSnRmlC9ryKan/VegT1MmXSxK6/7hboNCUKW09Ob4Mj5GZw j4fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ULXdX72HTTAOQjelFFpqA15AOywnKaAaGmZnZGn81V8=; b=jApBsdgdRTOxfwCxBWzxREM2WnOwcUucgB483U7PMZWfaFImJPvF+w3Na1+Qeq9TYD gIgb1YoKAbTukkXfTwfFfL+rHXc1jWWXqyjzqmbBthn0+8sF3OcnFy5W7KoekPH8wcNu iVYNzL3RGiDiU7eKc1AvxDzAEZ65rnFHBaNr6I+tkBGoICehjhgjDWX7E6tqSHtVcAVp jjqnEUDLkN7zUEzHB1uX3I0Et1IZkdtwMDmRDCvj2rptbR0bX/WeBuC4/2OkW3XwxRzY g1BBgcRZEaVGkbUq2izkOSpiCuVAIMua1MAsSP/OPRan6eLLxS9pLlzd/gpKEDJWjzEp WiPg== X-Gm-Message-State: ABUngvdTNLmBcjc0LrfZgW9Th+/QU6azVe6jv2Pl752Tcir4fKygAIxsuUSPWzJthOOuVQ== X-Received: by 10.159.37.167 with SMTP id 36mr8375669uaf.22.1477594682747; Thu, 27 Oct 2016 11:58:02 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:75c:4d59:e1a4:67ce:bc9c]) by smtp.gmail.com with ESMTPSA id z5sm2085040vke.18.2016.10.27.11.58.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Oct 2016 11:58:02 -0700 (PDT) From: Fabio Estevam To: ulf.hansson@linaro.org Cc: kernel@pengutronix.de, linux-mmc@vger.kernel.org, stefan.wahren@i2se.com, marex@denx.de, Fabio Estevam Subject: [PATCH 2/2] mmc: mxs: Use the spinlock irq variants Date: Thu, 27 Oct 2016 16:57:52 -0200 Message-Id: <1477594672-31611-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477594672-31611-1-git-send-email-festevam@gmail.com> References: <1477594672-31611-1-git-send-email-festevam@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam Inside an interrupt handler we should use the spin_lock_irqsave()/ spin_unlock_irqrestore() variants, so fix it accordingly. Signed-off-by: Fabio Estevam Reviewed-by: Marek Vasut --- drivers/mmc/host/mxs-mmc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 44ecebd..14b7548 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -189,15 +189,16 @@ static irqreturn_t mxs_mmc_irq_handler(int irq, void *dev_id) struct mmc_command *cmd = host->cmd; struct mmc_data *data = host->data; struct mxs_ssp *ssp = &host->ssp; + unsigned long flags; u32 stat; - spin_lock(&host->lock); + spin_lock_irqsave(&host->lock, flags); stat = readl(ssp->base + HW_SSP_CTRL1(ssp)); writel(stat & MXS_MMC_IRQ_BITS, ssp->base + HW_SSP_CTRL1(ssp) + STMP_OFFSET_REG_CLR); - spin_unlock(&host->lock); + spin_unlock_irqrestore(&host->lock, flags); if ((stat & BM_SSP_CTRL1_SDIO_IRQ) && (stat & BM_SSP_CTRL1_SDIO_IRQ_EN)) mmc_signal_sdio_irq(host->mmc);