xen-ia64-devel
[Xen-ia64-devel] [PATCH 11/15] ia64/pv_ops: 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.
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
include/asm-ia64/irq.h | 10 ++++++-
include/asm-ia64/paravirt_irq.h | 49 +++++++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 2 deletions(-)
create mode 100644 include/asm-ia64/paravirt_irq.h
diff --git a/include/asm-ia64/irq.h b/include/asm-ia64/irq.h
index a66d268..0463427 100644
--- a/include/asm-ia64/irq.h
+++ b/include/asm-ia64/irq.h
@@ -17,9 +17,15 @@
#define NR_VECTORS 256
#if (NR_VECTORS + 32 * NR_CPUS) < 1024
-#define NR_IRQS (NR_VECTORS + 32 * NR_CPUS)
+#define IA64_NATIVE_NR_IRQS (NR_VECTORS + 32 * NR_CPUS)
#else
-#define NR_IRQS 1024
+#define IA64_NATIVE_NR_IRQS 1024
+#endif
+
+#ifdef CONFIG_PARAVIRT
+#include <asm/paravirt_irq.h>
+#else
+#define NR_IRQS IA64_NATIVE_NR_IRQS
#endif
static __inline__ int
diff --git a/include/asm-ia64/paravirt_irq.h b/include/asm-ia64/paravirt_irq.h
new file mode 100644
index 0000000..7dedf2a
--- /dev/null
+++ b/include/asm-ia64/paravirt_irq.h
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * include/asm-ia64/paravirt_irq.h
+ *
+ * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp>
+ * VA Linux Systems Japan K.K.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef __ASM_PARAVIRT_IRQ_H
+#define __ASM_PARAVIRT_IRQ_H
+
+#ifdef CONFIG_PARAVIRT
+
+/* Determine the maximal NR_IRQ which each pv instances require.
+ * i.e. NR_IRQS = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, ...)
+ */
+
+#define NR_IRQS 1
+
+#if IA64_NATIVE_NR_IRQS > NR_IRQS
+#undef NR_IRQS
+#define NR_IRQS IA64_NATIVE_NR_IRQS
+#endif
+
+#ifdef CONFIG_XEN
+#include <asm/xen/irq.h>
+#if XEN_NR_IRQS > NR_IRQS
+#undef NR_IRQS
+#define NR_IRQS XEN_NR_IRQS
+#endif
+#endif /* CONFIG_XEN */
+
+#endif /* CONFIG_PARAVIRT */
+
+#endif /* __ASM_PARAVIRT_IRQ_H */
--
1.5.3
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
[Xen-ia64-devel] [PATCH 01/15] ia64: preparation: remove extern in irq_ia64.c, Isaku Yamahata
[Xen-ia64-devel] [PATCH 06/15] ia64/pv_ops: preparation for paravirtulization of hand written assembly code., Isaku Yamahata
[Xen-ia64-devel] [PATCH 05/15] ia64/pv_ops: introduce pv_cpu_ops to paravirtualize privileged instructions., Isaku Yamahata
[Xen-ia64-devel] [PATCH 14/15] ia64/pv_ops: add hooks, pv_irq_ops, to paravirtualized irq related operations., Isaku Yamahata
[Xen-ia64-devel] [PATCH 08/15] ia64/pv_ops: paravirtualize minstate.h., Isaku Yamahata
[Xen-ia64-devel] [PATCH 11/15] ia64/pv_ops: paravirtualize NR_IRQS,
Isaku Yamahata <=
[Xen-ia64-devel] [PATCH 15/15] ia64/pv_ops: add to hooks, pv_time_ops, for steal time accounting., Isaku Yamahata
[Xen-ia64-devel] [PATCH 12/15] ia64/pv_ops: define initialization hooks, pv_init_ops, for paravirtualized environment., Isaku Yamahata
|
|
|