From ac3ede5371af34b0a89fa72b7a5bb706457b99ad Mon Sep 17 00:00:00 2001 From: Roger Pau Monné Date: Wed, 12 May 2021 12:17:53 +0200 Subject: x86/xen: remove PVHv1 code PVHv1 was officially removed from Xen in 4.9, so just axe the related code from FreeBSD. Note FreeBSD supports PVHv2, which is the replacement for PVHv1. Sponsored by: Citrix Systems R&D Reviewed by: kib, Elliott Mitchell Differential Revision: https://reviews.freebsd.org/D30228 --- sys/xen/evtchn/evtchnvar.h | 1 - sys/xen/xen_intr.h | 44 -------------------------------------------- sys/xen/xen_msi.h | 39 --------------------------------------- sys/xen/xen_pci.h | 37 ------------------------------------- 4 files changed, 121 deletions(-) delete mode 100644 sys/xen/xen_msi.h delete mode 100644 sys/xen/xen_pci.h (limited to 'sys/xen') diff --git a/sys/xen/evtchn/evtchnvar.h b/sys/xen/evtchn/evtchnvar.h index 8008d23297d3..c7c38df34a00 100644 --- a/sys/xen/evtchn/evtchnvar.h +++ b/sys/xen/evtchn/evtchnvar.h @@ -39,7 +39,6 @@ enum evtchn_type { EVTCHN_TYPE_UNBOUND, - EVTCHN_TYPE_PIRQ, EVTCHN_TYPE_VIRQ, EVTCHN_TYPE_IPI, EVTCHN_TYPE_PORT, diff --git a/sys/xen/xen_intr.h b/sys/xen/xen_intr.h index 74570267364d..6725fa9e0399 100644 --- a/sys/xen/xen_intr.h +++ b/sys/xen/xen_intr.h @@ -152,18 +152,6 @@ 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 +206,6 @@ void xen_intr_signal(xen_intr_handle_t handle); */ 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 +237,4 @@ int xen_intr_add_handler(const char *name, driver_filter_t filter, 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_ */ diff --git a/sys/xen/xen_msi.h b/sys/xen/xen_msi.h deleted file mode 100644 index 2817878fc71b..000000000000 --- a/sys/xen/xen_msi.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2014 Roger Pau Monné - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef __XEN_MSI_H__ -#define __XEN_MSI_H__ - -void xen_msi_init(void); -int xen_msi_map(int irq, uint64_t *addr, uint32_t *data); -int xen_msi_alloc(device_t dev, int count, int maxcount, int *irqs); -int xen_msi_release(int *irqs, int count); -int xen_msix_alloc(device_t dev, int *irq); -int xen_msix_release(int irq); - -#endif /* !__XEN_MSI_H__ */ diff --git a/sys/xen/xen_pci.h b/sys/xen/xen_pci.h deleted file mode 100644 index f19168e0598d..000000000000 --- a/sys/xen/xen_pci.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2014 Roger Pau Monné - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef __XEN_PCI_H__ -#define __XEN_PCI_H__ - -void xen_pci_enable_msi_method(device_t dev, device_t child, uint64_t address, - uint16_t data); -void xen_pci_disable_msi_method(device_t dev, device_t child); -void xen_pci_child_added_method(device_t dev, device_t child); - -#endif /* !__XEN_PCI_H__ */ -- cgit v1.3