Hi all,
actually I try to get the preempt patch running with kernel 2.6.20 for arch ppc.
I got the Kernel running right now, but I don't know if I did the right changes.
Maybe someone can take a look and give me some hints, if I'm wrong.
The Changes I Made(diff against the preempt_rt patched kernel):
in irqflags.h:
----------------------------------------------
--- /home/develop/Download/linux-2.6.20/include/linux/irqflags.h 2008-08-06 08:55:07.000000000 +0200
+++ /mnt/cc_views/linux-basis/build/linux-base-system/smb_preempt/linux-2.6.20/include/linux/irqflags.h 2008-08-06 15:56:22.000000000 +0200
@@ -62,37 +62,7 @@
trace_hardirqs_off(); \
} while (0)
-#define local_irq_restore(flags) \
- do { \
- BUILD_CHECK_IRQ_FLAGS(flags); \
- if (raw_irqs_disabled_flags(flags)) { \
- raw_local_irq_restore(flags); \
- trace_hardirqs_off(); \
- } else { \
- trace_hardirqs_on(); \
- raw_local_irq_restore(flags); \
- } \
- } while (0)
-#else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */
-/*
- * The local_irq_*() APIs are equal to the raw_local_irq*()
- * if !TRACE_IRQFLAGS.
- */
-# define raw_local_irq_disable() local_irq_disable()
-# define raw_local_irq_enable() local_irq_enable()
-# define raw_local_irq_save(flags) \
- do { \
- BUILD_CHECK_IRQ_FLAGS(flags); \
- local_irq_save(flags); \
- } while (0)
-# define raw_local_irq_restore(flags) \
- do { \
- BUILD_CHECK_IRQ_FLAGS(flags); \
- local_irq_restore(flags); \
- } while (0)
-#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
-#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
#define safe_halt() \
do { \
trace_hardirqs_on(); \@@ -118,6 +88,41 @@
BUILD_CHECK_IRQ_FLAGS(flags); \
raw_irqs_disabled_flags(flags); \
})
-#endif /* CONFIG_X86 */
+
+#else /* !CONFIG_TRACE_IRQFLAGS_SUPPORT */
+/*
+ * The local_irq_*() APIs are equal to the raw_local_irq*()
+ * if !TRACE_IRQFLAGS.
+ */
+#define local_irq_disable() raw_local_irq_disable()
+#define local_irq_enable() raw_local_irq_enable()
+
+#define local_irq_save(flags) \
+ do { \
+ BUILD_CHECK_IRQ_FLAGS(flags); \
+ raw_local_irq_save(flags); \
+ } while (0)
+
+#define local_save_flags(flags) \
+ do { \
+ BUILD_CHECK_IRQ_FLAGS(flags); \
+ raw_local_save_flags(flags); \
+ } while (0)
+
+#define local_irq_restore(flags) \
+ do { \
+ BUILD_CHECK_IRQ_FLAGS(flags); \
+ raw_local_irq_restore(flags); \
+ } while (0)
+
+#define irqs_disabled() \
+({ \
+ unsigned long flags; \
+ \
+ raw_local_save_flags(flags); \
+ raw_irqs_disabled_flags(flags); \
+})
+
+#endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */
#endif
What Im wondering about is that only the names Changed form "local_....." to "raw_local..." and then some new defines are created where the "local_..." stuff calls the "raw_local_..." stuff. Is this the correct behaviour??
Thanks in advance,
Christian