All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-evl 7.2 compilation without SMP
@ 2026-10-13  7:06 Martínek Petr
  2026-11-11  9:11 ` Philippe Gerum
  2026-11-11 11:53 ` linux-evl 7.2 OOB GPIO NULL dereference in lineevent_create Martínek Petr
  0 siblings, 2 replies; 4+ messages in thread
From: Martínek Petr @ 2026-10-13  7:06 UTC (permalink / raw)
  To: xenomai@lists.linux.dev

It is not possible to compile linux-evl 7.2 without SMP due to bad port of
include/linux/spinlock_api_up.h code and kernel/irq/pipeline.c
pipeline_percpu_data being inside define for SMP, while being used without it.
Included are patches to fix compilation.

Signed-off-by: Petr Martínek <petr.martinek@elvac.eu>
---
diff -Naur a/include/linux/spinlock_api_up.h b/include/linux/spinlock_api_up.h
--- a/include/linux/spinlock_api_up.h	2026-09-23 08:39:20.000000000 +0200
+++ b/include/linux/spinlock_api_up.h	2026-10-08 14:21:40.410814000 +0200
@@ -62,22 +62,22 @@
   do { local_irq_restore(flags); __UNLOCK(lock, ##__VA_ARGS__); } while (0)
 
 #define __HARD_LOCK(lock) \
-  do { ___LOCK_##__VA_ARGS__(lock); } while (0)
+  do { ___LOCK_(lock); } while (0)
 
 #define __HARD_LOCK_IRQ(lock) \
-  do { hard_local_irq_disable(); __HARD_LOCK(lock, ##__VA_ARGS__); } while (0)
+  do { hard_local_irq_disable(); __HARD_LOCK(lock); } while (0)
 
 #define __HARD_LOCK_IRQSAVE(lock, flags) \
-  do { flags = hard_local_irq_save(); __HARD_LOCK(lock, ##__VA_ARGS__); } while (0)
+  do { flags = hard_local_irq_save(); __HARD_LOCK(lock); } while (0)
 
 #define __HARD_UNLOCK(lock) \
-  do { ___UNLOCK_##__VA_ARGS__(lock); } while (0)
+  do { ___UNLOCK_(lock); } while (0)
 
 #define __HARD_UNLOCK_IRQ(lock) \
-  do { hard_local_irq_enable(); __HARD_UNLOCK(lock, ##__VA_ARGS__); } while (0)
+  do { hard_local_irq_enable(); __HARD_UNLOCK(lock); } while (0)
 
 #define __HARD_UNLOCK_IRQRESTORE(lock, flags) \
-  do { hard_local_irq_restore(flags); __HARD_UNLOCK(lock, ##__VA_ARGS__); } while (0)
+  do { hard_local_irq_restore(flags); __HARD_UNLOCK(lock); } while (0)
 
 #define _raw_spin_lock(lock)			__LOCK(lock)
 #define _raw_spin_lock_nested(lock, subclass)	__LOCK(lock)
diff -Naur a/kernel/irq/pipeline.c b/kernel/irq/pipeline.c
--- a/kernel/irq/pipeline.c	2026-09-23 08:39:20.000000000 +0200
+++ b/kernel/irq/pipeline.c	2026-10-08 14:30:08.315420000 +0200
@@ -75,6 +75,9 @@
 	unsigned long flat[IRQ_FLAT_MAPSZ];
 };
 
+struct pipeline_percpu_data { };
+static DEFINE_PER_CPU(struct pipeline_percpu_data, pipeline_percpu_data);
+
 #ifdef CONFIG_SMP
 
 static struct irq_event_map bootup_irq_map __initdata;
@@ -92,9 +95,6 @@
 	},
 };
 
-struct pipeline_percpu_data { };
-static DEFINE_PER_CPU(struct pipeline_percpu_data, pipeline_percpu_data);
-
 static irqreturn_t smp_call_function_ipi_handler(int irq, void *dev_id)
 {
 	smp_flush_oob_call_function_queue();

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

end of thread, other threads:[~2026-11-12 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13  7:06 linux-evl 7.2 compilation without SMP Martínek Petr
2026-11-11  9:11 ` Philippe Gerum
2026-11-11 11:53 ` linux-evl 7.2 OOB GPIO NULL dereference in lineevent_create Martínek Petr
2026-11-12 14:20   ` Philippe Gerum

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.