mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] i2c: qcom-geni: Quiesce hardware on shutdown and panic
@ 2026-08-18  5:01 Praveen Talari
  2026-08-18  5:01 ` [PATCH 1/2] i2c: qcom-geni: Add shutdown callback to quiesce hardware on reboot Praveen Talari
  2026-08-18  5:01 ` [PATCH 2/2] i2c: qcom-geni: Add panic notifier to prevent transfers during panic Praveen Talari
  0 siblings, 2 replies; 5+ messages in thread
From: Praveen Talari @ 2026-08-18  5:01 UTC (permalink / raw)
  To: konrad.dybcio, Mukesh Kumar Savaliya, Viken Dadhaniya, Andi Shyti
  Cc: chandana.chiluveru, linux-i2c, linux-arm-msm, linux-kernel,
	Praveen Talari

This series hardens the GENI I2C driver against two related VM-teardown
scenarios where an in-flight I2C DMA transfer can trigger SMMU context
faults after the VM's memory context has already been invalidated.

Patch 1 adds a shutdown callback that cancels/aborts any in-progress
GENI or GPI DMA transfer and resets the TX/RX FSMs before a normal
reboot proceeds, so the hardware is left idle rather than mid-transfer.

Patch 2 adds a panic notifier that marks the I2C adapter suspended and
performs the same cancel/abort/DMA-reset cleanup as the shutdown path,
using atomic-context-safe DMA termination since panic notifiers cannot
sleep.

Together these prevent both hardware state corruption on reboot and
SMMU faults (which can affect other VMs sharing the same SMMU instance)
during VM shutdown/crash.

Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
---
Praveen Talari (2):
      i2c: qcom-geni: Add shutdown callback to quiesce hardware on reboot
      i2c: qcom-geni: Add panic notifier to prevent transfers during panic

 drivers/i2c/busses/i2c-qcom-geni.c | 77 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 74 insertions(+), 3 deletions(-)
---
base-commit: 4477a78374a57c3809b172ad30cceabda48c47c6
change-id: 20260817-add-shutdown-and-panic-notifier-for-i2c-6723fc0f557e

Best regards,
--  
Praveen Talari <praveen.talari@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-26 18:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-18  5:01 [PATCH 0/2] i2c: qcom-geni: Quiesce hardware on shutdown and panic Praveen Talari
2026-08-18  5:01 ` [PATCH 1/2] i2c: qcom-geni: Add shutdown callback to quiesce hardware on reboot Praveen Talari
2026-10-26 18:45   ` Mukesh Savaliya
2026-08-18  5:01 ` [PATCH 2/2] i2c: qcom-geni: Add panic notifier to prevent transfers during panic Praveen Talari
2026-10-26 18:55   ` Mukesh Savaliya

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®