From patchwork Mon May 10 19:46:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12249265 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C603C433ED for ; Mon, 10 May 2021 19:49:05 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A48DB613DF for ; Mon, 10 May 2021 19:49:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A48DB613DF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bU3cEyfuV39Uz8pin9s9cDyt1rSq7na01n/Tsqrqino=; b=jVgYpCwP8c7S01lHuPR8Jd41B ZzE5lc4aGtfJHnATUj2NghxnBGGrfEdVBle+tT+7Gsns0t3c/eVd5G1pAifiTJayIN32UARU3tWJ3 HZtYtR+46XCoz+wVENfb8LXFmYnPiLu+YiXIi6OVJs+gx5QWEZ2xHnlbHQaUc9NW9FTF6PqhdAVY8 BNmvsV2VC4YD9EJtITJvrMN4lshTxSiKbCX6xMNM9ENmIDiJT3CCJAIthAUTu9IyTVX91QMr9nf3G vVS17nKNrBq9y2jDvHCB8iC88MYIoIei3aloVq72of+AhgMEZaUNasMsHA76rfAtGrDppyikNaf8Y rNMTf2W0Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgBrv-00FaxW-D6; Mon, 10 May 2021 19:47:07 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgBrW-00FatE-Ss for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 19:46:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=buP75qmnMp2WS36AZ/PhTvBmVRDzbiPXTrnxj3aRe+M=; b=xrZ7NWtvAXJhOdXPHl5RfW9bS5 Q/6BIskardmmWPJTvQ/U6JS9df0BNPH0IJawP3A//BeiwGHmYPaCMSSlec6ws+7XRuuzSgOxbmajQ mJiVIb8VT5Gu1bN1bdLcehRg+6vmug2Vrc8jahyldc0aPvAb4H/pvo3oorKUYVvgNE3KpLsnofeSv vq1eUwtQUROHnhauktWjdHYg9NPA8itBedItjQNNYzSwKjpRZfxD69efNw9oHL9ePgk2tVN78vazH O7ofCFHIyq7gV9Hr67+ODtYMx7fsg/9pImUdtkFcJY85fJj5hkFqd5EBruDxBV5ak1i8QfKZhxbEM fSzOaiMw==; Received: from mga06.intel.com ([134.134.136.31]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgBrT-00959Q-TI for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 19:46:41 +0000 IronPort-SDR: nisFQDBrRft8x8rKlMGEtPocFZcu7SLKeH7DV0ebOMexSqoExBSHpZBMDMeQyxdF04BnNaQrqn n/GztHfxftmw== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="260537056" X-IronPort-AV: E=Sophos;i="5.82,288,1613462400"; d="scan'208";a="260537056" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 12:46:39 -0700 IronPort-SDR: buGZfkBkjYKxe70vzI2EcwTs2CzIQFx9sTc4F0k1O0OqkDCpdVanWV0E0+m70/ySmcH3kSXbCr 1C5kiKBllJhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,288,1613462400"; d="scan'208";a="391096812" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 10 May 2021 12:46:36 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id DEA15147; Mon, 10 May 2021 22:46:56 +0300 (EEST) From: Andy Shevchenko To: Linus Walleij , Srinivas Neeli , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Shubhrajyoti Datta , Michal Simek , Bartosz Golaszewski , Yury Norov , Rasmus Villemoes , Neeli Srinivas Subject: [PATCH v2 5/5] gpio: xilinx: No need to disable IRQs in the handler Date: Mon, 10 May 2021 22:46:33 +0300 Message-Id: <20210510194633.11943-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510194633.11943-1-andriy.shevchenko@linux.intel.com> References: <20210510194633.11943-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_124640_000159_B12B80B1 X-CRM114-Status: GOOD ( 10.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In IRQ handler interrupts are already disabled, hence no need to repeat it. Even in the threaded case, it is not a problem because IRQ framework keeps interrupt disabled there as well. Remove disabling IRQ part in the handler. Signed-off-by: Andy Shevchenko Tested-by: Neeli Srinivas --- drivers/gpio/gpio-xilinx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c index d2b7458b1d69..109b32104867 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers/gpio/gpio-xilinx.c @@ -509,14 +509,13 @@ static void xgpio_irqhandler(struct irq_desc *desc) int irq_offset; u32 status; u32 bit; - unsigned long flags; status = xgpio_readreg(chip->regs + XGPIO_IPISR_OFFSET); xgpio_writereg(chip->regs + XGPIO_IPISR_OFFSET, status); chained_irq_enter(irqchip, desc); - spin_lock_irqsave(&chip->gpio_lock, flags); + spin_lock(&chip->gpio_lock); xgpio_read_ch_all(chip, XGPIO_DATA_OFFSET, all); @@ -533,7 +532,7 @@ static void xgpio_irqhandler(struct irq_desc *desc) bitmap_copy(chip->last_irq_read, all, 64); bitmap_or(all, rising, falling, 64); - spin_unlock_irqrestore(&chip->gpio_lock, flags); + spin_unlock(&chip->gpio_lock); dev_dbg(gc->parent, "IRQ rising %*pb falling %*pb\n", 64, rising, 64, falling);