diff options
Diffstat (limited to 'sys/dev/xen')
-rw-r--r-- | sys/dev/xen/control/control.c | 4 | ||||
-rw-r--r-- | sys/dev/xen/xenpci/xenpci.c | 51 | ||||
-rw-r--r-- | sys/dev/xen/xenpci/xenpcivar.h | 6 |
3 files changed, 2 insertions, 59 deletions
diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c index 78894ba..665a5ac 100644 --- a/sys/dev/xen/control/control.c +++ b/sys/dev/xen/control/control.c @@ -287,7 +287,7 @@ xctrl_suspend() } HYPERVISOR_shared_info->arch.max_pfn = max_pfn; - gnttab_resume(); + gnttab_resume(NULL); intr_resume(suspend_cancelled != 0); local_irq_enable(); xencons_resume(); @@ -385,7 +385,7 @@ xctrl_suspend() /* * Reset grant table info. */ - gnttab_resume(); + gnttab_resume(NULL); #ifdef SMP if (smp_started && !CPU_EMPTY(&cpu_suspend_map)) { diff --git a/sys/dev/xen/xenpci/xenpci.c b/sys/dev/xen/xenpci/xenpci.c index e334051..3fdd78c 100644 --- a/sys/dev/xen/xenpci/xenpci.c +++ b/sys/dev/xen/xenpci/xenpci.c @@ -108,13 +108,6 @@ xenpci_deallocate_resources(device_t dev) scp->rid_irq, scp->res_irq); scp->res_irq = 0; } - if (scp->res_memory != 0) { - bus_deactivate_resource(dev, SYS_RES_MEMORY, - scp->rid_memory, scp->res_memory); - bus_release_resource(dev, SYS_RES_MEMORY, - scp->rid_memory, scp->res_memory); - scp->res_memory = 0; - } return (0); } @@ -134,16 +127,6 @@ xenpci_allocate_resources(device_t dev) goto errexit; } - scp->rid_memory = PCIR_BAR(1); - scp->res_memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &scp->rid_memory, RF_ACTIVE); - if (scp->res_memory == NULL) { - printf("xenpci Could not allocate memory bar.\n"); - goto errexit; - } - - scp->phys_next = rman_get_start(scp->res_memory); - return (0); errexit: @@ -153,40 +136,6 @@ errexit: } /* - * Allocate a physical address range from our mmio region. - */ -static int -xenpci_alloc_space_int(struct xenpci_softc *scp, size_t sz, - vm_paddr_t *pa) -{ - - if (scp->phys_next + sz > rman_get_end(scp->res_memory)) { - return (ENOMEM); - } - - *pa = scp->phys_next; - scp->phys_next += sz; - - return (0); -} - -/* - * Allocate a physical address range from our mmio region. - */ -int -xenpci_alloc_space(size_t sz, vm_paddr_t *pa) -{ - device_t dev = devclass_get_device(xenpci_devclass, 0); - - if (dev) { - return (xenpci_alloc_space_int(device_get_softc(dev), - sz, pa)); - } else { - return (ENOMEM); - } -} - -/* * Probe - just check device ID. */ static int diff --git a/sys/dev/xen/xenpci/xenpcivar.h b/sys/dev/xen/xenpci/xenpcivar.h index 527a291..45d1215 100644 --- a/sys/dev/xen/xenpci/xenpcivar.h +++ b/sys/dev/xen/xenpci/xenpcivar.h @@ -31,13 +31,7 @@ */ struct xenpci_softc { int rid_ioport; - int rid_memory; int rid_irq; - struct resource* res_memory; /* Resource for mem range. */ struct resource* res_irq; /* Resource for irq range. */ void *intr_cookie; - - vm_paddr_t phys_next; /* next page from mem range */ }; - -extern int xenpci_alloc_space(size_t sz, vm_paddr_t *pa); |