mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@codeconstruct.com.au>
To: Billy Tsai <billy_tsai@aspeedtech.com>,
	Linus Walleij <linusw@kernel.org>,
	 Bartosz Golaszewski	 <brgl@kernel.org>,
	Joel Stanley <joel@jms.id.au>,
	Ryan Chen	 <ryan_chen@aspeedtech.com>
Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	 stable@vger.kernel.org, Aaron Antone <aae@amazon.com>
Subject: Re: [PATCH 1/2] gpio: aspeed: Clear only the acked line's G4 interrupt status
Date: Thu, 05 Nov 2026 15:48:25 +1030	[thread overview]
Message-ID: <3c6f78a78dcea12e97b62f8a65c0248f023bbc64.camel@codeconstruct.com.au> (raw)
In-Reply-To: <20261104-gpio-aspeed-irq-status-v1-1-9805645f856d@aspeedtech.com>

On Wed, 2026-11-04 at 11:58 +0800, Billy Tsai wrote:
> The G4 interrupt status registers are write-1-to-clear: writing 0 to a
> bit has no effect and writing 1 clears that line's status flag.
> aspeed_gpio_irq_ack() clears a line's status through
> aspeed_g4_reg_bit_set(), which reads the bank's status register, sets
> the line's bit and writes the whole value back. That write clears every
> interrupt pending in the 32-line bank, not just the acked one.
> 
> aspeed_gpio_irq_handler() reads each bank's status register once and
> dispatches the lines that were set. If another line in the same bank
> latches an edge after that read and before an ack in the bank, the ack
> clears its status and the handler is never called for it, so the edge
> is lost.
> 
> Write only the line's own bit when clearing the interrupt status on G4.
> 
> Fixes: 79fc9a2fcc45 ("gpio: aspeed: Create llops to handle hardware access")
> Cc: stable@vger.kernel.org
> Reported-by: Aaron Antone <aae@amazon.com>
> Suggested-by: Aaron Antone <aae@amazon.com>

Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au>
Tested-by: Andrew Jeffery <andrew@codeconstruct.com.au>

  reply	other threads:[~2026-11-05  5:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  3:58 [PATCH 0/2] gpio: aspeed: Fix lost interrupts from write-1-to-clear status bits Billy Tsai
2026-11-04  3:58 ` [PATCH 1/2] gpio: aspeed: Clear only the acked line's G4 interrupt status Billy Tsai
2026-11-05  5:18   ` Andrew Jeffery [this message]
2026-11-04  3:58 ` [PATCH 2/2] gpio: aspeed: Preserve the pending G7 interrupt status on control writes Billy Tsai
2026-11-05  5:19   ` Andrew Jeffery
2026-11-05  9:13 ` [PATCH 0/2] gpio: aspeed: Fix lost interrupts from write-1-to-clear status bits Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c6f78a78dcea12e97b62f8a65c0248f023bbc64.camel@codeconstruct.com.au \
    --to=andrew@codeconstruct.com.au \
    --cc=aae@amazon.com \
    --cc=billy_tsai@aspeedtech.com \
    --cc=brgl@kernel.org \
    --cc=joel@jms.id.au \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ryan_chen@aspeedtech.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®