Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112024578
D29913.id87933.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
8 KB
Referenced Files
None
Subscribers
None
D29913.id87933.diff
View Options
Index: sys/x86/include/xen/xen-os.h
===================================================================
--- sys/x86/include/xen/xen-os.h
+++ sys/x86/include/xen/xen-os.h
@@ -41,6 +41,9 @@
/* If non-zero, the hypervisor has been configured to use a direct vector */
extern int xen_vector_callback_enabled;
+/* from 27c36a12f1584b53d2454dac238eeed3dedc82ba */
+extern bool xen_evtchn_needs_ack;
+
/* tunable for disabling PV disks */
extern int xen_disable_pv_disks;
Index: sys/x86/include/xen/xen_intr_x86.h
===================================================================
--- /dev/null
+++ sys/x86/include/xen/xen_intr_x86.h
@@ -0,0 +1,99 @@
+/******************************************************************************
+ * xen_intr_x86.h
+ *
+ * APIs for managing Xen event channel, virtual IRQ, and physical IRQ
+ * notifications.
+ *
+ * Copyright (c) 2004, K A Fraser
+ * Copyright (c) 2012, Spectra Logic Corporation
+ *
+ * This file may be distributed separately from the Linux kernel, or
+ * incorporated into other software packages, subject to the following license:
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this source file (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * $FreeBSD$
+ */
+#ifndef _XEN_INTR_X86_H_
+#define _XEN_INTR_X86_H_
+
+#include <xen/interface/event_channel.h>
+
+/**
+ * Allocate a local event channel port for servicing interprocessor
+ * interupts and, if successful, associate the port with the specified
+ * interrupt handler.
+ *
+ * \param cpu The cpu receiving the IPI.
+ * \param filter The interrupt filter servicing this IPI.
+ * \param irqflags Interrupt handler flags. See sys/bus.h.
+ * \param handlep Pointer to an opaque handle used to manage this
+ * registration.
+ *
+ * \returns 0 on success, otherwise an errno.
+ */
+int xen_intr_alloc_and_bind_ipi(u_int cpu,
+ driver_filter_t filter, enum intr_type irqflags,
+ xen_intr_handle_t *handlep);
+
+/**
+ * Register a physical interrupt vector and setup the interrupt source.
+ *
+ * \param vector The global vector to use.
+ * \param trig Default trigger method.
+ * \param pol Default polarity of the interrupt.
+ *
+ * \returns 0 on success, otherwise an errno.
+ */
+int xen_register_pirq(int vector, enum intr_trigger trig,
+ enum intr_polarity pol);
+
+/**
+ * Setup MSI vector interrupt(s).
+ *
+ * \param dev The device that requests the binding.
+ *
+ * \param vector Requested initial vector to bind the MSI interrupt(s) to.
+ *
+ * \param count Number of vectors to allocate.
+ *
+ * \returns 0 on success, otherwise an errno.
+ */
+int xen_register_msi(device_t dev, int vector, int count);
+
+/**
+ * Teardown a MSI vector interrupt.
+ *
+ * \param vector Requested vector to release.
+ *
+ * \returns 0 on success, otherwise an errno.
+ */
+int xen_release_msi(int vector);
+
+/**
+ * Register the IO-APIC PIRQs when running in legacy PVH Dom0 mode.
+ *
+ * \param pic PIC instance.
+ *
+ * NB: this should be removed together with the support for legacy PVH mode.
+ */
+struct pic;
+void xenpv_register_pirqs(struct pic *pic);
+
+#endif /* _XEN_INTR_X86_H_ */
Index: sys/x86/xen/pvcpu_enum.c
===================================================================
--- sys/x86/xen/pvcpu_enum.c
+++ sys/x86/xen/pvcpu_enum.c
@@ -52,6 +52,8 @@
#include <xen/interface/vcpu.h>
+#include <x86/xen/xen_intr_x86.h>
+
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/aclocal.h>
#include <contrib/dev/acpica/include/actables.h>
Index: sys/x86/xen/xen_apic.c
===================================================================
--- sys/x86/xen/xen_apic.c
+++ sys/x86/xen/xen_apic.c
@@ -54,6 +54,8 @@
#include <xen/hvm.h>
#include <xen/xen_intr.h>
+#include <x86/xen/xen_intr_x86.h>
+
#include <xen/interface/vcpu.h>
/*--------------------------------- Macros -----------------------------------*/
Index: sys/x86/xen/xen_intr.c
===================================================================
--- sys/x86/xen/xen_intr.c
+++ sys/x86/xen/xen_intr.c
@@ -59,7 +59,6 @@
#include <machine/xen/synch_bitops.h>
#include <xen/xen-os.h>
-#include <xen/hvm.h>
#include <xen/hypervisor.h>
#include <xen/xen_intr.h>
#include <xen/evtchn/evtchnvar.h>
@@ -67,6 +66,10 @@
#include <dev/xen/xenpci/xenpcivar.h>
#include <dev/pci/pcivar.h>
+#if defined(__amd64__) || defined(__i386__)
+#include <x86/xen/xen_intr_x86.h>
+#endif
+
#ifdef DDB
#include <ddb/ddb.h>
#endif
Index: sys/x86/xen/xen_msi.c
===================================================================
--- sys/x86/xen/xen_msi.c
+++ sys/x86/xen/xen_msi.c
@@ -49,6 +49,8 @@
#include <xen/xen_intr.h>
#include <xen/xen_msi.h>
+#include <x86/xen/xen_intr_x86.h>
+
static struct mtx msi_lock;
static u_int msi_last_irq;
Index: sys/x86/xen/xen_nexus.c
===================================================================
--- sys/x86/xen/xen_nexus.c
+++ sys/x86/xen/xen_nexus.c
@@ -47,6 +47,8 @@
#include <xen/xen_intr.h>
#include <xen/xen_msi.h>
+#include <x86/xen/xen_intr_x86.h>
+
#include "pcib_if.h"
/*
Index: sys/xen/hvm.h
===================================================================
--- sys/xen/hvm.h
+++ sys/xen/hvm.h
@@ -104,6 +104,5 @@
void xen_hvm_resume(bool suspend_cancelled);
extern uint32_t hvm_start_flags;
-extern bool xen_evtchn_needs_ack;
#endif /* __XEN_HVM_H__ */
Index: sys/xen/xen_intr.h
===================================================================
--- sys/xen/xen_intr.h
+++ sys/xen/xen_intr.h
@@ -135,35 +135,6 @@
driver_filter_t filter, driver_intr_t handler,
void *arg, enum intr_type irqflags, xen_intr_handle_t *handlep);
-/**
- * Allocate a local event channel port for servicing interprocessor
- * interupts and, if successful, associate the port with the specified
- * interrupt handler.
- *
- * \param cpu The cpu receiving the IPI.
- * \param filter The interrupt filter servicing this IPI.
- * \param irqflags Interrupt handler flags. See sys/bus.h.
- * \param handlep Pointer to an opaque handle used to manage this
- * registration.
- *
- * \returns 0 on success, otherwise an errno.
- */
-int xen_intr_alloc_and_bind_ipi(u_int cpu,
- driver_filter_t filter, enum intr_type irqflags,
- xen_intr_handle_t *handlep);
-
-/**
- * Register a physical interrupt vector and setup the interrupt source.
- *
- * \param vector The global vector to use.
- * \param trig Default trigger method.
- * \param pol Default polarity of the interrupt.
- *
- * \returns 0 on success, otherwise an errno.
- */
-int xen_register_pirq(int vector, enum intr_trigger trig,
- enum intr_polarity pol);
-
/**
* Unbind an interrupt handler from its interrupt source.
*
@@ -218,28 +189,6 @@
*/
evtchn_port_t xen_intr_port(xen_intr_handle_t handle);
-/**
- * Setup MSI vector interrupt(s).
- *
- * \param dev The device that requests the binding.
- *
- * \param vector Requested initial vector to bind the MSI interrupt(s) to.
- *
- * \param count Number of vectors to allocate.
- *
- * \returns 0 on success, otherwise an errno.
- */
-int xen_register_msi(device_t dev, int vector, int count);
-
-/**
- * Teardown a MSI vector interrupt.
- *
- * \param vector Requested vector to release.
- *
- * \returns 0 on success, otherwise an errno.
- */
-int xen_release_msi(int vector);
-
/**
* Bind an event channel port with a handler
*
@@ -271,14 +220,4 @@
int xen_intr_get_evtchn_from_port(evtchn_port_t port,
xen_intr_handle_t *handlep);
-/**
- * Register the IO-APIC PIRQs when running in legacy PVH Dom0 mode.
- *
- * \param pic PIC instance.
- *
- * NB: this should be removed together with the support for legacy PVH mode.
- */
-struct pic;
-void xenpv_register_pirqs(struct pic *pic);
-
#endif /* _XEN_INTR_H_ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 12, 5:50 PM (10 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17123670
Default Alt Text
D29913.id87933.diff (8 KB)
Attached To
Mode
D29913: xen/intr: move x86-only variable out of common
Attached
Detach File
Event Timeline
Log In to Comment