[PATCH v2] irqchip: gic-v3-its: irq_pipeline: fix OOB context in-band lock warning for ITS lock using hard spinlocks instead of hybrid spinlocks

linz <[email protected]> Mon, 13 Jul 2026 18:42:33 +0800 (CST)
Newsgroups dev.linux.lists.xenomai
Message-ID <[email protected]>
Thank you for your feedback


The gic-v3 IRQ chip is already marked with IRQCHIP_PIPELINE_SAFE. The its_irq_chip is not marked with IRQCHIP_PIPELINE_SAFE. I added the flag and tested, but it did not have any effect.

Meanwhile, I read the code related to IRQCHIP_PIPELINE_SAFE. If the gic-v3 IRQ chip is not marked with IRQCHIP_PIPELINE_SAFE, a call trace like the following would be reported:
MSI domain irqchip XXX is not pipeline-safe! or irqchip XXX is not pipeline-safe!
However, I did not see any such message in my logs.

Based on Florian's suggestion, I revisited the Xenomai 4 documentation regarding hybrid_spinlock_t and hard_spinlock_t. 
I agree with Florian's point that hybrid_spinlock_t should be limited to struct irq_desc and IRQ chips, and that hard_spinlock_t is more appropriate for the ITS node lock.

I changed the lock to hard_spinlock_t and tested it. The call trace no longer appears and the system works fine.

The patch is as follows. Please help review it:

From e0cbc9316af331bf007c86e1fcab0ef8699b05c9 Mon Sep 17 00:00:00 2001
From: zhanglin1040 <[email protected]>
Date: Mon, 13 Jul 2026 17:53:44 +0800
Subject: [PATCH] irqchip: gic-v3-its: irq_pipeline: fix OOB context in-band
 lock warning for ITS lock using hard spinlocks instead of hybrid spinlocks

---
 drivers/irqchip/irq-gic-v3-its.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 0e57735eac..3f2b02b8f4 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -94,7 +94,7 @@ struct its_device;
  * list.
  */
 struct its_node {
-    raw_spinlock_t        lock;
+    hard_spinlock_t        lock;
     struct mutex        dev_alloc_lock;
     struct list_head    entry;
     void __iomem        *base;
-- 
2.34.1