[PATCH v5 0/2] mfd: loongson-se: Add multi-node support and fix miscellaneous issues

Qunqin Zhao <[email protected]> Thu, 30 Jul 2026 16:26:06 +0800
Newsgroups dev.linux.lists.loongarch,org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
- Patch 1 introduces the multi-node platform support.

  v5: Clear pending interrupts with S2LINT_CL before requesting IRQs,
      and move S2LINT_EN to after all interrupt handlers are registered.
  v4: Safely handling shared interrupt handler returns.
  v3: Using shared interrupts (IRQF_SHARED) instead of manually
      iterating through all devices to check for interrupts.

- Patch 2 focuses on structural and error-path hardening for the
  pre-existing baseline code. This includes resolving critical issues
  discovered by the Sashiko Automation system such as: completion
  race conditions, missing engine completion initialization, spinlock
  held with interrupts disabled for up to 10 ms, EPROBE_DEFER
  handling, DMA buffer overflow validation, interrupt cleanup on
  probe failure, and device removal ordering.

  v5: Fix all issues reported by Sashiko analysis:
       - Initialize engine completions in probe to avoid NULL deref
       - Use cmd_lock mutex for command serialization, drop spin_lock_irq
       - Add reinit_completion to controller and engine command paths
       - Fix EPROBE_DEFER handling in platform_irq_count()
       - Validate dmam_size against minimum required size
       - Disable IRQs in probe error path after init failure
       - Add loongson_se_stop() devres cleanup with proper ordering
       - Use non-interruptible wait for STOP command
  v4: new patch

Qunqin Zhao (2):
  mfd: loongson-se: Add multi-node support
  mfd: loongson-se: Fix miscellaneous issues

 drivers/mfd/loongson-se.c       | 102 +++++++++++++++++++++++++-------
 include/linux/mfd/loongson-se.h |   1 +
 2 files changed, 80 insertions(+), 23 deletions(-)


base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482

-- 
2.47.3