Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp528357pxf; Thu, 8 Apr 2021 07:58:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoSXGGQIYma7DB9COBrrQ8lPhnpseXbuM+Eq5VTvNCPzALYrZHCMnVte5dIhiHaT9/Odiy X-Received: by 2002:a63:48d:: with SMTP id 135mr8551236pge.148.1617893922698; Thu, 08 Apr 2021 07:58:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617893922; cv=none; d=google.com; s=arc-20160816; b=AFZcsppOY9z0Y8qcl6uyDmfp4GoFrOwjyt8Eb4f9+AFx777as4Dq8aDdx3dpz4DRgS ah68osNHXMSSaHn1zaNOXRqFiBflebNssan6f8hwTuGpUisLepDGR527wZ/BLCfG1Hu/ AiOxoxremg+iO+ribT5VNal3T2jUQvC2X6jCU0+OYEg4CdmqKE5bRkG/G3s2IcRN/cxk 1WdHS6iR5Vzr2rE3kDeKOwC7qEbiYPUNx5o+Rat4YqL1gcYtvc7N5w9gaw+ve1MfbNqo 7nKIHiPVR7SD8a5F8WEYjC/bQwndr6AHJm8TuimSpX2KBXQ4Mcdj/0CD8YcrCEo5tWyt LTRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=25w0lwpq9Zocjb5TfcrS9kqDIYXspBMYBhoAh3b4rp8=; b=Nb8CRB4MODhShNNET61nXrBOwmoHN5EHxASEQ0tQjdPpDKmqvnt+CLCO2D2s4OCPRZ EgirjoixNNhsLNc9+G3gDlQAA1fNzsw45fowtNSPzoyyRVqTrrGt1mNbezmoB+9mTDtB YVYlm6H+fVKweyp3diXNVR84LpkbgLBtnCLhTxtsoPbGEK7RRfUa4NEjCViJNIm6T6fD BhiLnO5mNSaCam8z8FHaLA78aBvEgUwVSQB0WakIHLo/zgLVmu46507DqCbVHafH3cXn iz6Ht1soXmIsibh2yI9idnQPd8LqkM86N+Sf98CtZ+ObFcK6dj1U9FlffiFxKZlPXAf3 CDEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mh17si9230294pjb.90.2021.04.08.07.58.30; Thu, 08 Apr 2021 07:58:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232027AbhDHO4V (ORCPT + 99 others); Thu, 8 Apr 2021 10:56:21 -0400 Received: from mga05.intel.com ([192.55.52.43]:31802 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231975AbhDHO4H (ORCPT ); Thu, 8 Apr 2021 10:56:07 -0400 IronPort-SDR: W0sc57qQeO0RSCXTYjmmQj8c6UiyL/zO4tl5o0pZAbfyIEa0+CatHKqn8ULlJmL6/H1t1BrYHX TTcCFBN2ZcuQ== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="278832346" X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="278832346" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 07:55:55 -0700 IronPort-SDR: Rukh+CthRp+DiW2Y3EEQRTplqQgfqFUKtmgr9AltKMll3WKloKL2Jkwu96Y1O/IVf3LE2HHdJL x/ro+J+BOZ2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="419172789" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 08 Apr 2021 07:55:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 333CE619; Thu, 8 Apr 2021 17:56:05 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Shubhrajyoti Datta , Srinivas Neeli , Michal Simek , Linus Walleij , Bartosz Golaszewski , Yury Norov , Rasmus Villemoes , Syed Nayyar Waris , vilhelm.gray@gmail.com Subject: [PATCH v1 5/5] gpio: xilinx: No need to disable IRQs in the handler Date: Thu, 8 Apr 2021 17:56:01 +0300 Message-Id: <20210408145601.68651-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210408145601.68651-1-andriy.shevchenko@linux.intel.com> References: <20210408145601.68651-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- 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 98d90b4c4d2b..d5a08dcdd677 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers/gpio/gpio-xilinx.c @@ -503,14 +503,13 @@ static void xgpio_irqhandler(struct irq_desc *desc) DECLARE_BITMAP(all, 64); 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); @@ -527,7 +526,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); -- 2.30.2