All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] dmaengine: ste_dma40: Fix probe and allocation bugs
@ 2026-08-20 13:14 Linus Walleij
  2026-08-20 13:14 ` [PATCH v2 01/13] dmaengine: ste_dma40: Fix failed start cleanup Linus Walleij
                   ` (12 more replies)
  0 siblings, 13 replies; 24+ messages in thread
From: Linus Walleij @ 2026-08-20 13:14 UTC (permalink / raw)
  To: Vinod Koul, Frank Li; +Cc: dmaengine, phone-devel, Linus Walleij, sashiko-bot

This series fixes thirteen pre-existing DMA40 bugs found while reviewing the
Ux500 LCLA SRAM power-domain conversion.

The fixes cover failed hardware-start cleanup, IRQ handling while runtime
suspended, hardware initialization before DMAengine registration,
DMAengine registration unwinding, LCLA allocation and probe error
unwinding, runtime PM and IRQ registration, device tree memcpy channel
parsing and validation, validation of logical channel and event-group
indexes derived from dev_type before writing into lookup_log_chans or
touching phy_res, and duplicate DMAengine debugfs names when several
DMAengine devices share the same parent device.

The method taken is: whenever Sashiko complains: fix the bug it complains
about if possible.

This has been boot tested on the Samsung Skomer device.

Signed-off-by: Linus Walleij <linusw@kernel.org>
---
Changes in v2:
- In patch 1, complete the failed-start descriptor through the normal
  tasklet path and drop the runtime PM reference instead of freeing the
  submitted descriptor directly.
- Add an IRQ fix to avoid register access when DMA40 is runtime suspended.
- Add a probe ordering fix so DMA40 hardware is initialized before DMAengine
  devices are registered.
- Add a probe unwind fix so DMAengine registrations are released before
  freeing IRQ and LCLA resources.
- Add an LCLA allocation fix so __get_free_pages() and free_pages() use an
  allocation order instead of a raw page count.
- Add a probe unwind fix so ESRAM LCLA mappings are not released with
  free_pages().
- Add a device tree parsing fix so memcpy-channels cannot overflow the
  memcpy channel array.
- Add a dev_type bounds fix so derived event groups cannot overflow phy_res
  or the priority/realtime register window.
- Add validation for fallback memcpy configurations so memcpy-channels
  entries cannot bypass the dev_type bounds checks.
- Add a DMAengine debugfs naming fix so drivers registering several
  DMAengine devices for one parent device do not trigger duplicate-name
  warnings.
- Link to v1: https://lore.kernel.org/r/20260820-dma40-fixes-v1-0-5e14815ad689@kernel.org

---
Linus Walleij (13):
      dmaengine: ste_dma40: Fix failed start cleanup
      dmaengine: ste_dma40: Check runtime PM in IRQ
      dmaengine: ste_dma40: Init hardware before registration
      dmaengine: ste_dma40: Fix DMA registration unwind
      dmaengine: ste_dma40: Fix LCLA allocation order
      dmaengine: ste_dma40: Fix probe LCLA free
      dmaengine: ste_dma40: Fix probe runtime PM disable
      dmaengine: ste_dma40: Fix probe IRQ leak
      dmaengine: ste_dma40: Fix memcpy channel parsing
      dmaengine: ste_dma40: Fix logical channel bounds check
      dmaengine: ste_dma40: Fix event group bounds
      dmaengine: ste_dma40: Validate memcpy configuration
      dmaengine: Use unique debugfs names

 drivers/dma/dmaengine.c |  21 +++++++-
 drivers/dma/ste_dma40.c | 126 ++++++++++++++++++++++++++++++++++++------------
 2 files changed, 113 insertions(+), 34 deletions(-)
---
base-commit: 0d995da5fb97e8c312834575604d4423eb6225b7
change-id: 20260820-dma40-fixes-b99af66002bf

Best regards,
-- 
Linus Walleij <linusw@kernel.org>


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

end of thread, other threads:[~2026-08-20 13:37 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 13:14 [PATCH v2 00/13] dmaengine: ste_dma40: Fix probe and allocation bugs Linus Walleij
2026-08-20 13:14 ` [PATCH v2 01/13] dmaengine: ste_dma40: Fix failed start cleanup Linus Walleij
2026-08-20 13:30   ` sashiko-bot
2026-08-20 13:14 ` [PATCH v2 02/13] dmaengine: ste_dma40: Check runtime PM in IRQ Linus Walleij
2026-08-20 13:31   ` sashiko-bot
2026-08-20 13:14 ` [PATCH v2 03/13] dmaengine: ste_dma40: Init hardware before registration Linus Walleij
2026-08-20 13:14 ` [PATCH v2 04/13] dmaengine: ste_dma40: Fix DMA registration unwind Linus Walleij
2026-08-20 13:30   ` sashiko-bot
2026-08-20 13:14 ` [PATCH v2 05/13] dmaengine: ste_dma40: Fix LCLA allocation order Linus Walleij
2026-08-20 13:29   ` sashiko-bot
2026-08-20 13:15 ` [PATCH v2 06/13] dmaengine: ste_dma40: Fix probe LCLA free Linus Walleij
2026-08-20 13:15 ` [PATCH v2 07/13] dmaengine: ste_dma40: Fix probe runtime PM disable Linus Walleij
2026-08-20 13:29   ` sashiko-bot
2026-08-20 13:15 ` [PATCH v2 08/13] dmaengine: ste_dma40: Fix probe IRQ leak Linus Walleij
2026-08-20 13:29   ` sashiko-bot
2026-08-20 13:15 ` [PATCH v2 09/13] dmaengine: ste_dma40: Fix memcpy channel parsing Linus Walleij
2026-08-20 13:29   ` sashiko-bot
2026-08-20 13:15 ` [PATCH v2 10/13] dmaengine: ste_dma40: Fix logical channel bounds check Linus Walleij
2026-08-20 13:32   ` sashiko-bot
2026-08-20 13:15 ` [PATCH v2 11/13] dmaengine: ste_dma40: Fix event group bounds Linus Walleij
2026-08-20 13:34   ` sashiko-bot
2026-08-20 13:15 ` [PATCH v2 12/13] dmaengine: ste_dma40: Validate memcpy configuration Linus Walleij
2026-08-20 13:37   ` sashiko-bot
2026-08-20 13:15 ` [PATCH v2 13/13] dmaengine: Use unique debugfs names Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.