aboutsummaryrefslogtreecommitdiff
path: root/include/asm-ia64/paravirt.h
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2008-05-19 22:13:42 +0900
committerTony Luck <tony.luck@intel.com>2008-05-27 15:10:41 -0700
commit33b39e84209b0308b572dce017df7ee9b63f086c (patch)
treee27bb8c44aa70b3172c9be846960baf7dbe98bd4 /include/asm-ia64/paravirt.h
parente51835d58a5abdf82211f36f500f666ca7ef9aee (diff)
[IA64] pvops: add hooks, pv_iosapic_ops, to paravirtualize iosapic.
add hooks to paravirtualize iosapic which is a real hardware resource. On virtualized environment it may be replaced something virtualized friendly. Define pv_iosapic_ops and add the hooks. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64/paravirt.h')
-rw-r--r--include/asm-ia64/paravirt.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/asm-ia64/paravirt.h b/include/asm-ia64/paravirt.h
index 84d74c32eb9..3a40f624e86 100644
--- a/include/asm-ia64/paravirt.h
+++ b/include/asm-ia64/paravirt.h
@@ -112,6 +112,46 @@ static inline void paravirt_post_smp_prepare_boot_cpu(void)
pv_init_ops.post_smp_prepare_boot_cpu();
}
+/******************************************************************************
+ * replacement of iosapic operations.
+ */
+
+struct pv_iosapic_ops {
+ void (*pcat_compat_init)(void);
+
+ struct irq_chip *(*get_irq_chip)(unsigned long trigger);
+
+ unsigned int (*__read)(char __iomem *iosapic, unsigned int reg);
+ void (*__write)(char __iomem *iosapic, unsigned int reg, u32 val);
+};
+
+extern struct pv_iosapic_ops pv_iosapic_ops;
+
+static inline void
+iosapic_pcat_compat_init(void)
+{
+ if (pv_iosapic_ops.pcat_compat_init)
+ pv_iosapic_ops.pcat_compat_init();
+}
+
+static inline struct irq_chip*
+iosapic_get_irq_chip(unsigned long trigger)
+{
+ return pv_iosapic_ops.get_irq_chip(trigger);
+}
+
+static inline unsigned int
+__iosapic_read(char __iomem *iosapic, unsigned int reg)
+{
+ return pv_iosapic_ops.__read(iosapic, reg);
+}
+
+static inline void
+__iosapic_write(char __iomem *iosapic, unsigned int reg, u32 val)
+{
+ return pv_iosapic_ops.__write(iosapic, reg, val);
+}
+
#endif /* !__ASSEMBLY__ */
#else