Skip to contentSkip to conversation

add architecture specific softirq headers

PATCH New Alex Williamson 1 participant 1 message Nov 30, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add architecture specific softirq headers

We have a need for a couple architecture specific softirqs for
handling collection of system firmware error records on ia64. Rather than add error prone architecture #ifdefs to xen/softirq.h, I propose extending the generic header to include an architecture specific header as in the attached patch. Thoughts? Thanks,

Alex

---

xen/include/xen/softirq.h +11 -1
diff -r d1b0a5adaeab xen/include/xen/softirq.h
@@ -9,7 +9,17 @@
 #define NMI_SOFTIRQ                       4
 #define PAGE_SCRUB_SOFTIRQ                5
 #define TRACE_SOFTIRQ                     6
-#define NR_SOFTIRQS                       7
+
+#define NR_COMMON_SOFTIRQS                7
+
+#include <asm/softirq.h>
+
+#ifndef NR_ARCH_SOFTIRQS
+#warning No architecture defined NR_ARCH_SOFTIRQS, update asm/softirq.h
+#define NR_ARCH_SOFTIRQS                  0
+#endif
+
+#define NR_SOFTIRQS   (NR_COMMON_SOFTIRQS + NR_ARCH_SOFTIRQS)
 
 #ifndef __ASSEMBLY__
 
xen/include/asm-ia64/softirq.h new file +14 -0
diff -r d1b0a5adaeab xen/include/asm-ia64/softirq.h
@@ -0,0 +1,14 @@
+#ifndef __ASM_SOFTIRQ_H__
+#define __ASM_SOFTIRQ_H__
+
+/*
+ * This header only provides architecture specific softirqs.
+ * It should not be included except through xen/softirqs.h
+ */
+#if !defined(NR_COMMON_SOFTIRQS) || defined(NR_SOFTIRQS)
+#error asm/softirq.h should only be included from xen/softirq.h
+#endif
+
+#define NR_ARCH_SOFTIRQS    0
+
+#endif /* __ASM_SOFTIRQ_H__ */
xen/include/asm-powerpc/softirq.h new file +14 -0
diff -r d1b0a5adaeab xen/include/asm-powerpc/softirq.h
@@ -0,0 +1,14 @@
+#ifndef __ASM_SOFTIRQ_H__
+#define __ASM_SOFTIRQ_H__
+
+/*
+ * This header only provides architecture specific softirqs.
+ * It should not be included except through xen/softirqs.h
+ */
+#if !defined(NR_COMMON_SOFTIRQS) || defined(NR_SOFTIRQS)
+#error asm/softirq.h should only be included from xen/softirq.h
+#endif
+
+#define NR_ARCH_SOFTIRQS    0
+
+#endif /* __ASM_SOFTIRQ_H__ */
xen/include/asm-x86/softirq.h new file +14 -0
diff -r d1b0a5adaeab xen/include/asm-x86/softirq.h
@@ -0,0 +1,14 @@
+#ifndef __ASM_SOFTIRQ_H__
+#define __ASM_SOFTIRQ_H__
+
+/*
+ * This header only provides architecture specific softirqs.
+ * It should not be included except through xen/softirqs.h
+ */
+#if !defined(NR_COMMON_SOFTIRQS) || defined(NR_SOFTIRQS)
+#error asm/softirq.h should only be included from xen/softirq.h
+#endif
+
+#define NR_ARCH_SOFTIRQS    0
+
+#endif /* __ASM_SOFTIRQ_H__ */

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel