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 C47B81DE4CD; Tue, 8 Oct 2024 13:05:35 +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=1728392735; cv=none; b=ArdGJ2j/6NkFbd+yV4qkAd/5gRm3F8pNWRkETkNwJqp4GuMpztB9s52s4OLSBZSQC6tL9DedPkZ7h4BJuo+sa2kfjQLx0xNK0g7XIz40aB4TEghxt+2sdH77uEJwaZ2ET7FC+1hX2tsoybzc03LlW0/B4iUUJvFh3LIsmA/0pjo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728392735; c=relaxed/simple; bh=hp1VfcAkFHtnpgBbsopyMJ2f1zrwropBUS9WIlYs4CE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nkRDt0gvjEuldOJv1/VsPBLhBp661VeR3ABguOqkd88owxUD99omx5h/1Yn1nX6As+Kcnw7vNDqy+aP61MdO45Nl4u23PpDPNVHaDeHMa+j6lut6Lg1kJnvSsf63AR06lUwUuX+TpBKsMfnAZ4mnF0vJMsFyjkbwab3R8qKpKgM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=R4NHuFrn; 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="R4NHuFrn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B3F7C4CEC7; Tue, 8 Oct 2024 13:05:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728392735; bh=hp1VfcAkFHtnpgBbsopyMJ2f1zrwropBUS9WIlYs4CE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R4NHuFrneGNPVJAE8RAGZjlThUsmt2vRn5Q8f/2Z8PAGmm7jv/rBzysDla4LBrnpO R6uCPU+Q4mWZrCYtovsIn1EnguFovMAfcucE8wUjpfX5rb7hl3bsLEaWf9Xe9Fpf8M 0ebemtTZoxZeOWD/47zok9POPi3jpv86zOYRSYMY= 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.11 503/558] gpio: davinci: fix lazy disable Date: Tue, 8 Oct 2024 14:08:53 +0200 Message-ID: <20241008115722.026749883@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241008115702.214071228@linuxfoundation.org> References: <20241008115702.214071228@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.11-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, };