mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sahaj Chaudhari <sahaj123.sc@gmail.com>
To: linusw@kernel.org, brgl@kernel.org
Cc: Sahaj Chaudhari <sahaj123.sc@gmail.com>,
	j-keerthy@ti.com, nsekhar@ti.com, prabhakar.csengg@gmail.com,
	avinashphilip@ti.com, sujithkv@ti.com,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] gpio: davinci: fix probe-time IRQ setup
Date: Tue, 10 Nov 2026 01:19:08 +0530	[thread overview]
Message-ID: <20261109194910.2282454-1-sahaj123.sc@gmail.com> (raw)

This series fixes two independent probe-time bugs in the DaVinci GPIO
driver:

1. A file-global MMIO base can be overwritten by overlapping controller
   probes, causing BINTEN setup to target the wrong controller.
2. Per-bank IRQ data is allocated as chained handlers are installed. A
   later allocation failure can leave handlers pointing to devm-managed
   data freed during probe unwind.

The first patch derives BINTEN from the current controller's mapped bank.
The second allocates all IRQ data before installing any handlers.

---
Testing:
- ARM64 W=1 Image builds passed for both patches.
- On AM642, a forced asynchronous-probe interleave made the baseline
  compute the wrong BINTEN target. The test redirected the unsafe baseline
  write before it reached hardware; the fixed path selected the expected
  target and verified readback 0x3f.
- With targeted probe allocation failure, the baseline left one chained
  handler installed; it was detached safely before devm cleanup. The fixed
  path left no handlers installed and reprobed normally.

The private baseline and fixed kernels showed unexplained
TAINT_MACHINE_CHECK bit 16. No BUG/Oops/WARNING/call trace/SError was
captured; the cause remains unknown, so this is not a clean hardware-health
claim.

GitHub Copilot CLI assisted with investigating the bugs and drafting the
fixes. The submitter reviewed the code and personally ran both board tests.

Sahaj Chaudhari (2):
  gpio: davinci: use controller-specific MMIO for BINTEN
  gpio: davinci: allocate bank IRQ data before installing handlers

 drivers/gpio/gpio-davinci.c | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

base-commit: 4fc2c9ab68f4324bea62cb5a43e93392225f1d11

-- 
2.43.0


             reply	other threads:[~2026-11-09 19:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 19:49 Sahaj Chaudhari [this message]
2026-11-09 19:49 ` [PATCH 1/2] gpio: davinci: use controller-specific MMIO for BINTEN Sahaj Chaudhari
2026-11-17 21:19   ` Linus Walleij
2026-11-09 19:49 ` [PATCH 2/2] gpio: davinci: allocate bank IRQ data before installing handlers Sahaj Chaudhari
2026-11-17 21:20   ` Linus Walleij
2026-11-17  8:22 ` [PATCH 0/2] gpio: davinci: fix probe-time IRQ setup 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=20261109194910.2282454-1-sahaj123.sc@gmail.com \
    --to=sahaj123.sc@gmail.com \
    --cc=avinashphilip@ti.com \
    --cc=brgl@kernel.org \
    --cc=j-keerthy@ti.com \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=sujithkv@ti.com \
    /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®