From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 030241C2443; Tue, 8 Oct 2024 12:34:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728390887; cv=none; b=lCyt5fc6C5cqFdU9KX/0Heg6duJ2q/dCYlejaVWC3DzsGoXeewD0Y/Y2Zw6KgfZ2L6ggYyzh+kx83vtLxx/2oT9D/5fKH64r2MS5NhCeFd6OoIEl2G4DL2i4zpfN8v2k32nrG+N5Jpi8nFYzxGMww9x7Hq3PyGB9gVqhmtt7W4Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728390887; c=relaxed/simple; bh=1gnKiGdpbQ5xMeOJkptLuVP4D3aLlC7SrKUgL0W2kZI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l+kJc71PUc699mqHpb3Othh5fKUkz0PVwc5J6q3spFynYhptzAD3qB34p3popClmlB5od0uUy3lTLezLxrb6Cc6iwIMQRH/cNssniHhHe+bPt95MlU5gB6X55C6BjWxyCr5nRJqy1Cdae0C5AGQapJzZxNROaZ4jxS+PqL33eGw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YvcJe/cE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="YvcJe/cE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 627BFC4CEC7; Tue, 8 Oct 2024 12:34:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728390886; bh=1gnKiGdpbQ5xMeOJkptLuVP4D3aLlC7SrKUgL0W2kZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YvcJe/cEgaQG0LO6VkvvP02BxLbed0rT2jdEPoSfdW9PNGeKteflTL6AJw9UOsdpB 2KR/paN2YqkQyGrnRvpb4eXXs7KtGlfCjpbnWmV7UGsWqKqt5fm98uMfQ1lpgzD5Sd PYHeMFo/QlOMEIxmEM3zE719G+bzryFAzagk+epo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Emanuele Ghidoli , Parth Pancholi , Keerthy , Bartosz Golaszewski Subject: [PATCH 6.10 422/482] gpio: davinci: fix lazy disable Date: Tue, 8 Oct 2024 14:08:05 +0200 Message-ID: <20241008115705.011321432@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241008115648.280954295@linuxfoundation.org> References: <20241008115648.280954295@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Emanuele Ghidoli commit 3360d41f4ac490282fddc3ccc0b58679aa5c065d upstream. On a few platforms such as TI's AM69 device, disable_irq() fails to keep track of the interrupts that happen between disable_irq() and enable_irq() and those interrupts are missed. Use the ->irq_unmask() and ->irq_mask() methods instead of ->irq_enable() and ->irq_disable() to correctly keep track of edges when disable_irq is called. This solves the issue of disable_irq() not working as expected on such platforms. Fixes: 23265442b02b ("ARM: davinci: irq_data conversion.") Signed-off-by: Emanuele Ghidoli Signed-off-by: Parth Pancholi Acked-by: Keerthy Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240828133207.493961-1-parth105105@gmail.com Signed-off-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman --- drivers/gpio/gpio-davinci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -289,7 +289,7 @@ static int davinci_gpio_probe(struct pla * serve as EDMA event triggers. */ -static void gpio_irq_disable(struct irq_data *d) +static void gpio_irq_mask(struct irq_data *d) { struct davinci_gpio_regs __iomem *g = irq2regs(d); uintptr_t mask = (uintptr_t)irq_data_get_irq_handler_data(d); @@ -298,7 +298,7 @@ static void gpio_irq_disable(struct irq_ writel_relaxed(mask, &g->clr_rising); } -static void gpio_irq_enable(struct irq_data *d) +static void gpio_irq_unmask(struct irq_data *d) { struct davinci_gpio_regs __iomem *g = irq2regs(d); uintptr_t mask = (uintptr_t)irq_data_get_irq_handler_data(d); @@ -324,8 +324,8 @@ static int gpio_irq_type(struct irq_data static struct irq_chip gpio_irqchip = { .name = "GPIO", - .irq_enable = gpio_irq_enable, - .irq_disable = gpio_irq_disable, + .irq_unmask = gpio_irq_unmask, + .irq_mask = gpio_irq_mask, .irq_set_type = gpio_irq_type, .flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_SKIP_SET_WAKE, };