search for: release_resource

Displaying 20 results from an estimated 21 matches for "release_resource".

2015 Jun 16
2
[PATCH] virtio-pci: alloc only resources actually used.
...) + goto err_reserve; + err = -EINVAL; vp_dev->common = map_capability(pci_dev, common, sizeof(struct virtio_pci_common_cfg), 4, @@ -714,6 +749,15 @@ err_map_notify: err_map_isr: pci_iounmap(pci_dev, vp_dev->common); err_map_common: +err_reserve: + if (vp_dev->res_common) + release_resource(vp_dev->res_common); + if (vp_dev->res_isr) + release_resource(vp_dev->res_isr); + if (vp_dev->res_notify) + release_resource(vp_dev->res_notify); + if (vp_dev->res_device) + release_resource(vp_dev->res_device); return err; } @@ -727,4 +771,10 @@ void virtio_pci_modern...
2015 Jun 16
2
[PATCH] virtio-pci: alloc only resources actually used.
...) + goto err_reserve; + err = -EINVAL; vp_dev->common = map_capability(pci_dev, common, sizeof(struct virtio_pci_common_cfg), 4, @@ -714,6 +749,15 @@ err_map_notify: err_map_isr: pci_iounmap(pci_dev, vp_dev->common); err_map_common: +err_reserve: + if (vp_dev->res_common) + release_resource(vp_dev->res_common); + if (vp_dev->res_isr) + release_resource(vp_dev->res_isr); + if (vp_dev->res_notify) + release_resource(vp_dev->res_notify); + if (vp_dev->res_device) + release_resource(vp_dev->res_device); return err; } @@ -727,4 +771,10 @@ void virtio_pci_modern...
2015 Jun 18
2
[PATCH v2] virtio-pci: alloc only resources actually used.
...) + goto err_reserve; + err = -EINVAL; vp_dev->common = map_capability(pci_dev, common, sizeof(struct virtio_pci_common_cfg), 4, @@ -714,6 +763,15 @@ err_map_notify: err_map_isr: pci_iounmap(pci_dev, vp_dev->common); err_map_common: +err_reserve: + if (vp_dev->res_common) + release_resource(vp_dev->res_common); + if (vp_dev->res_isr) + release_resource(vp_dev->res_isr); + if (vp_dev->res_notify) + release_resource(vp_dev->res_notify); + if (vp_dev->res_device) + release_resource(vp_dev->res_device); return err; } @@ -727,4 +785,10 @@ void virtio_pci_modern...
2015 Jun 18
2
[PATCH v2] virtio-pci: alloc only resources actually used.
...) + goto err_reserve; + err = -EINVAL; vp_dev->common = map_capability(pci_dev, common, sizeof(struct virtio_pci_common_cfg), 4, @@ -714,6 +763,15 @@ err_map_notify: err_map_isr: pci_iounmap(pci_dev, vp_dev->common); err_map_common: +err_reserve: + if (vp_dev->res_common) + release_resource(vp_dev->res_common); + if (vp_dev->res_isr) + release_resource(vp_dev->res_isr); + if (vp_dev->res_notify) + release_resource(vp_dev->res_notify); + if (vp_dev->res_device) + release_resource(vp_dev->res_device); return err; } @@ -727,4 +785,10 @@ void virtio_pci_modern...
2015 Jun 16
0
[PATCH] virtio-pci: alloc only resources actually used.
...to validate the capability structure. With request_capability called earlier, they are now done too late. > @@ -714,6 +749,15 @@ err_map_notify: > err_map_isr: > pci_iounmap(pci_dev, vp_dev->common); > err_map_common: > +err_reserve: > + if (vp_dev->res_common) > + release_resource(vp_dev->res_common); > + if (vp_dev->res_isr) > + release_resource(vp_dev->res_isr); > + if (vp_dev->res_notify) > + release_resource(vp_dev->res_notify); > + if (vp_dev->res_device) > + release_resource(vp_dev->res_device); > return err; > } >...
2015 Jun 18
0
[PATCH v2] virtio-pci: alloc only resources actually used.
...; vp_dev->common = map_capability(pci_dev, common, > sizeof(struct virtio_pci_common_cfg), 4, > @@ -714,6 +763,15 @@ err_map_notify: > err_map_isr: > pci_iounmap(pci_dev, vp_dev->common); > err_map_common: > +err_reserve: > + if (vp_dev->res_common) > + release_resource(vp_dev->res_common); > + if (vp_dev->res_isr) > + release_resource(vp_dev->res_isr); > + if (vp_dev->res_notify) > + release_resource(vp_dev->res_notify); > + if (vp_dev->res_device) > + release_resource(vp_dev->res_device); > return err; > } >...
2007 Jun 06
0
[PATCH] paravirt: fix error handling in paravirt_disable_iospace
...ravirt.c +++ b/arch/i386/kernel/paravirt.c @@ -254,8 +254,11 @@ int paravirt_disable_iospace(void) int ret; ret = request_resource(&ioport_resource, &reserve_ioports); - if (ret == 0) + if (ret == 0) { ret = request_resource(&iomem_resource, &reserve_iomem); + if (ret) + release_resource(&reserve_ioports); + } return ret; }
2020 Apr 30
0
[PATCH v2 3/3] device-dax: Add system ram (add_memory()) with MHP_NO_FIRMWARE_MEMMAP
...robe(struct device *dev) new_res->flags = IORESOURCE_SYSTEM_RAM; new_res->name = dev_name(dev); - rc = add_memory(numa_node, new_res->start, resource_size(new_res), 0); + rc = add_memory(numa_node, new_res->start, resource_size(new_res), + MHP_NO_FIRMWARE_MEMMAP); if (rc) { release_resource(new_res); kfree(new_res); -- 2.25.3
2020 Apr 30
5
[PATCH v2 0/3] mm/memory_hotplug: Allow to not create firmware memmap entries
This is the follow up of [1]: [PATCH v1 0/3] mm/memory_hotplug: Make virtio-mem play nicely with kexec-tools I realized that this is not only helpful for virtio-mem, but also for dax/kmem - it's a fix for that use case (see patch #3) of persistent memory. Also, while testing, I discovered that kexec-tools will *not* add dax/kmem memory (anything not directly under the root when parsing
2007 Dec 20
6
[PATCH 0/15] adjust pvops to accomodate its x86_64 variant
Hi folks, With this series, the bulk of the work of pvops64 is done. Here, I integrate most of the paravirt.c and paravirt.h files, making them applicable to both architectures. CONFIG_PARAVIRT is _not_ present yet. Basically, this code is missing page table integration (patches currently being worked on by Jeremy). Enjoy
2007 Dec 20
6
[PATCH 0/15] adjust pvops to accomodate its x86_64 variant
Hi folks, With this series, the bulk of the work of pvops64 is done. Here, I integrate most of the paravirt.c and paravirt.h files, making them applicable to both architectures. CONFIG_PARAVIRT is _not_ present yet. Basically, this code is missing page table integration (patches currently being worked on by Jeremy). Enjoy
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
..."); + return err; + } + + pci_update_base(pf, pci_bar_unknown, res, reg); + } + + return 0; +} + +static void iov_free_res(struct pci_dev *pf) +{ + int i; + struct resource *res; + + for (i = 0; i < PCI_IOV_NUM_BAR; i++) { + res = pf->iov->resource + i; + if (res->parent) + release_resource(res); + } +} + +static void iov_set_vfe(struct pci_dev *pf, int enable) +{ + u16 reg; + + pci_read_config_word(pf, pf->iov->cap + PCI_IOV_CTRL, &reg); + + if (enable) { + reg |= (PCI_IOV_CTRL_VFE | PCI_IOV_CTRL_MSE); + + if (pci_ari_fwd_enabled(pf)) + reg |= PCI_IOV_CTRL_ARI; + else...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
..."); + return err; + } + + pci_update_base(pf, pci_bar_unknown, res, reg); + } + + return 0; +} + +static void iov_free_res(struct pci_dev *pf) +{ + int i; + struct resource *res; + + for (i = 0; i < PCI_IOV_NUM_BAR; i++) { + res = pf->iov->resource + i; + if (res->parent) + release_resource(res); + } +} + +static void iov_set_vfe(struct pci_dev *pf, int enable) +{ + u16 reg; + + pci_read_config_word(pf, pf->iov->cap + PCI_IOV_CTRL, &reg); + + if (enable) { + reg |= (PCI_IOV_CTRL_VFE | PCI_IOV_CTRL_MSE); + + if (pci_ari_fwd_enabled(pf)) + reg |= PCI_IOV_CTRL_ARI; + else...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
..."); + return err; + } + + pci_update_base(pf, pci_bar_unknown, res, reg); + } + + return 0; +} + +static void iov_free_res(struct pci_dev *pf) +{ + int i; + struct resource *res; + + for (i = 0; i < PCI_IOV_NUM_BAR; i++) { + res = pf->iov->resource + i; + if (res->parent) + release_resource(res); + } +} + +static void iov_set_vfe(struct pci_dev *pf, int enable) +{ + u16 reg; + + pci_read_config_word(pf, pf->iov->cap + PCI_IOV_CTRL, &reg); + + if (enable) { + reg |= (PCI_IOV_CTRL_VFE | PCI_IOV_CTRL_MSE); + + if (pci_ari_fwd_enabled(pf)) + reg |= PCI_IOV_CTRL_ARI; + else...
2020 Apr 29
4
[PATCH v1 0/3] mm/memory_hotplug: Make virtio-mem play nicely with kexec-tools
This series is based on [1]: [PATCH v2 00/10] virtio-mem: paravirtualized memory That will hopefull get picked up soon, rebased to -next. The following patches were reverted from -next [2]: [PATCH 0/3] kexec/memory_hotplug: Prevent removal and accidental use As discussed in that thread, they should be reverted from -next already. In theory, if people agree, we could take the first two patches
2008 Sep 01
2
[PATCH 3/4 v2] PCI: support SR-IOV capability
...PCI device + */ +void pci_iov_release(struct pci_dev *dev) +{ + int i; + struct resource *res; + struct pci_dev *tmp; + struct pci_bus *bus; + + if (!dev->iov) + return; + + for (i = 0; i < PCI_IOV_NUM_BAR; i++) { + res = dev->resource + PCI_IOV_RESOURCES + i; + if (res->parent) + release_resource(res); + } + + mutex_lock(&iov_lock); + down_read(&pci_bus_sem); + list_for_each_entry(tmp, &dev->bus->devices, bus_list) + if (tmp->iov) { + up_read(&pci_bus_sem); + goto done; + } + up_read(&pci_bus_sem); + + for (i = 1; i <= dev->iov->maxbus; i++) { +...
2008 Sep 01
2
[PATCH 3/4 v2] PCI: support SR-IOV capability
...PCI device + */ +void pci_iov_release(struct pci_dev *dev) +{ + int i; + struct resource *res; + struct pci_dev *tmp; + struct pci_bus *bus; + + if (!dev->iov) + return; + + for (i = 0; i < PCI_IOV_NUM_BAR; i++) { + res = dev->resource + PCI_IOV_RESOURCES + i; + if (res->parent) + release_resource(res); + } + + mutex_lock(&iov_lock); + down_read(&pci_bus_sem); + list_for_each_entry(tmp, &dev->bus->devices, bus_list) + if (tmp->iov) { + up_read(&pci_bus_sem); + goto done; + } + up_read(&pci_bus_sem); + + for (i = 1; i <= dev->iov->maxbus; i++) { +...
2008 Sep 01
2
[PATCH 3/4 v2] PCI: support SR-IOV capability
...PCI device + */ +void pci_iov_release(struct pci_dev *dev) +{ + int i; + struct resource *res; + struct pci_dev *tmp; + struct pci_bus *bus; + + if (!dev->iov) + return; + + for (i = 0; i < PCI_IOV_NUM_BAR; i++) { + res = dev->resource + PCI_IOV_RESOURCES + i; + if (res->parent) + release_resource(res); + } + + mutex_lock(&iov_lock); + down_read(&pci_bus_sem); + list_for_each_entry(tmp, &dev->bus->devices, bus_list) + if (tmp->iov) { + up_read(&pci_bus_sem); + goto done; + } + up_read(&pci_bus_sem); + + for (i = 1; i <= dev->iov->maxbus; i++) { +...
2020 May 07
17
[PATCH v4 00/15] virtio-mem: paravirtualized memory
This series is based on v5.7-rc4. The patches are located at: https://github.com/davidhildenbrand/linux.git virtio-mem-v4 This is basically a resend of v3 [1], now based on v5.7-rc4 and restested. One patch was reshuffled and two ACKs I missed to add were added. The rebase did not require any modifications to patches. Details about virtio-mem can be found in the cover letter of v2 [2]. A
2020 May 07
20
[PATCH v3 00/15] virtio-mem: paravirtualized memory
This series is based on latest linux-next. The patches are located at: https://github.com/davidhildenbrand/linux.git virtio-mem-v3 Patch #1 - #10 where contained in v2 and only contain minor modifications (mostly smaller fixes). The remaining patches are new and contain smaller optimizations. Details about virtio-mem can be found in the cover letter of v2 [1]. A basic QEMU implementation was