mfd.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/2] mfd: loongson-se: Add multi-node support and fix miscellaneous issues
@ 2026-09-07  2:38 Qunqin Zhao
  2026-09-07  2:38 ` [PATCH v6 1/2] mfd: loongson-se: Add multi-node support Qunqin Zhao
  2026-09-07  2:38 ` [PATCH v6 2/2] mfd: loongson-se: Fix miscellaneous issues Qunqin Zhao
  0 siblings, 2 replies; 8+ messages in thread
From: Qunqin Zhao @ 2026-09-07  2:38 UTC (permalink / raw)
  To: lee; +Cc: chenhuacai, linux-kernel, loongarch, linux-crypto, mfd,
	Qunqin Zhao

From: Qunqin Zhao <zhaoqunqin@loongson.cn>

- Patch 1 introduces the multi-node platform support.

  v6: No changes
  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.

  v6:
       - Still use init_completion() in loongson_se_init_engine.
       - Serialize command submission with a new poll_lock spinlock
       - Mask the target interrupt, clear pending status, and
         reinitialize the completion under dev_lock before issuing a
         command, re-enabling the interrupt after triggering new cmd
       - Keep the original engine_init_lock scope instead of the
         broader cmd_lock mutex.
       - Reuse loongson_se_send_controller_cmd() in the STOP path and
         register the stop handler before loongson_se_init()
       - Correct the dmam_size validation formula

  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       | 105 ++++++++++++++++++++++++++++----
 include/linux/mfd/loongson-se.h |   1 +
 2 files changed, 93 insertions(+), 13 deletions(-)


base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
-- 
2.47.2


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

end of thread, other threads:[~2026-09-09 16:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07  2:38 [PATCH v6 0/2] mfd: loongson-se: Add multi-node support and fix miscellaneous issues Qunqin Zhao
2026-09-07  2:38 ` [PATCH v6 1/2] mfd: loongson-se: Add multi-node support Qunqin Zhao
2026-09-07  2:50   ` sashiko-bot
2026-09-07  2:38 ` [PATCH v6 2/2] mfd: loongson-se: Fix miscellaneous issues Qunqin Zhao
2026-09-07  2:49   ` sashiko-bot
2026-09-09 16:20     ` Lee Jones
2026-09-07 14:12   ` Huacai Chen
2026-09-08  1:29     ` Qunqin Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).