summaryrefslogtreecommitdiff
path: root/arch/ia64/kernel/nr-irqs.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2008-05-19 17:13:40 +0400
committerTony Luck <tony.luck@intel.com>2008-05-28 02:09:30 +0400
commit213060a4d6991a95d0b9344406d195be3464accf (patch)
treeb74ead50ae0ae8ca2cfc20df5ad2e5d04a90432d /arch/ia64/kernel/nr-irqs.c
parent4df8d22bbbb16ccfa4e10cc068135183c9e5e006 (diff)
downloadlinux-213060a4d6991a95d0b9344406d195be3464accf.tar.xz
[IA64] pvops: paravirtualize NR_IRQS
Make NR_IRQ overridable by each pv instances. Pv instance may need each own number of irqs so that NR_IRQS should be the maximum number of nr_irqs each pv instances need. Cc: Jes Sorensen <jes@sgi.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/nr-irqs.c')
-rw-r--r--arch/ia64/kernel/nr-irqs.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/ia64/kernel/nr-irqs.c b/arch/ia64/kernel/nr-irqs.c
new file mode 100644
index 000000000000..1ae049181e83
--- /dev/null
+++ b/arch/ia64/kernel/nr-irqs.c
@@ -0,0 +1,24 @@
+/*
+ * calculate
+ * NR_IRQS = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, FOO_NR_IRQS...)
+ * depending on config.
+ * This must be calculated before processing asm-offset.c.
+ */
+
+#define ASM_OFFSETS_C 1
+
+#include <linux/kbuild.h>
+#include <linux/threads.h>
+#include <asm-ia64/native/irq.h>
+
+void foo(void)
+{
+ union paravirt_nr_irqs_max {
+ char ia64_native_nr_irqs[IA64_NATIVE_NR_IRQS];
+#ifdef CONFIG_XEN
+ char xen_nr_irqs[XEN_NR_IRQS];
+#endif
+ };
+
+ DEFINE(NR_IRQS, sizeof (union paravirt_nr_irqs_max));
+}