search for: devm_request_mem_region

Displaying 20 results from an estimated 22 matches for "devm_request_mem_region".

2019 Dec 22
1
[PATCH] virtio-mmio: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource, devm_request_mem_region and devm_ioremap. Signed-off-by: Yangtao Li <tiny.windzz at gmail.com> --- drivers/virtio/virtio_mmio.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index e09edb5c5e06..97d5725fd9a2 100644 --...
2019 Dec 23
0
[PATCH] virtio-mmio: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource, devm_request_mem_region and devm_ioremap. Signed-off-by: Yangtao Li <tiny.windzz at gmail.com> --- drivers/virtio/virtio_mmio.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index e09edb5c5e06..97d5725fd9a2 100644 --...
2019 Jun 13
0
[PATCH 06/22] mm: factor out a devm_request_free_mem_region helper
...FT); + end = min_t(unsigned long, base->end, (1UL << MAX_PHYSMEM_BITS) - 1); + addr = end - size + 1UL; + + for (; addr > size && addr >= base->start; addr -= size) { + if (region_intersects(addr, size, 0, IORES_DESC_NONE) != + REGION_DISJOINT) + continue; + + res = devm_request_mem_region(dev, addr, size, dev_name(dev)); + if (!res) + return ERR_PTR(-ENOMEM); + res->desc = IORES_DESC_DEVICE_PRIVATE_MEMORY; + return res; + } + + return ERR_PTR(-ERANGE); +} +EXPORT_SYMBOL_GPL(devm_request_free_mem_region); +#endif /* CONFIG_DEVICE_PRIVATE */ + static int __init strict_iomem(c...
2019 Jun 17
0
[PATCH 06/25] mm: factor out a devm_request_free_mem_region helper
...FT); + end = min_t(unsigned long, base->end, (1UL << MAX_PHYSMEM_BITS) - 1); + addr = end - size + 1UL; + + for (; addr > size && addr >= base->start; addr -= size) { + if (region_intersects(addr, size, 0, IORES_DESC_NONE) != + REGION_DISJOINT) + continue; + + res = devm_request_mem_region(dev, addr, size, dev_name(dev)); + if (!res) + return ERR_PTR(-ENOMEM); + res->desc = IORES_DESC_DEVICE_PRIVATE_MEMORY; + return res; + } + + return ERR_PTR(-ERANGE); +} +EXPORT_SYMBOL_GPL(devm_request_free_mem_region); +#endif /* CONFIG_DEVICE_PRIVATE */ + static int __init strict_iomem(c...
2019 Jun 15
1
[PATCH 06/22] mm: factor out a devm_request_free_mem_region helper
...gt;end, (1UL << MAX_PHYSMEM_BITS) - 1); > + addr = end - size + 1UL; > + > + for (; addr > size && addr >= base->start; addr -= size) { > + if (region_intersects(addr, size, 0, IORES_DESC_NONE) != > + REGION_DISJOINT) > + continue; > + > + res = devm_request_mem_region(dev, addr, size, dev_name(dev)); > + if (!res) > + return ERR_PTR(-ENOMEM); > + res->desc = IORES_DESC_DEVICE_PRIVATE_MEMORY; > + return res; > + } > + > + return ERR_PTR(-ERANGE); > +} > +EXPORT_SYMBOL_GPL(devm_request_free_mem_region); > +#endif /* CONFIG_DEV...
2019 Dec 23
7
[PATCH 1/6] iommu/omap: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz at gmail.com> --- drivers/iommu/omap-iommu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index be551cc34be4..297c1be7ecb0 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -1175,7 +1175,6
2019 Dec 23
7
[PATCH 1/6] iommu/omap: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz at gmail.com> --- drivers/iommu/omap-iommu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index be551cc34be4..297c1be7ecb0 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -1175,7 +1175,6
2020 Sep 16
0
[PATCH] kernel/resource: make iomem_resource implicit in release_mem_region_adjustable()
On 16.09.20 12:02, Wei Yang wrote: > On Wed, Sep 16, 2020 at 09:30:41AM +0200, David Hildenbrand wrote: >> "mem" in the name already indicates the root, similar to >> release_mem_region() and devm_request_mem_region(). Make it implicit. >> The only single caller always passes iomem_resource, other parents are >> not applicable. >> > > Looks good to me. > > Reviewed-by: Wei Yang <richard.weiyang at linux.alibaba.com> > Thanks for the review! -- Thanks, David / dhilde...
2020 Sep 16
0
[PATCH] kernel/resource: make iomem_resource implicit in release_mem_region_adjustable()
...020 at 12:03:20PM +0200, David Hildenbrand wrote: >> On 16.09.20 12:02, Wei Yang wrote: >>> On Wed, Sep 16, 2020 at 09:30:41AM +0200, David Hildenbrand wrote: >>>> "mem" in the name already indicates the root, similar to >>>> release_mem_region() and devm_request_mem_region(). Make it implicit. >>>> The only single caller always passes iomem_resource, other parents are >>>> not applicable. >>>> >>> >>> Looks good to me. >>> >>> Reviewed-by: Wei Yang <richard.weiyang at linux.alibaba.com> &gt...
2019 Jun 13
1
[PATCH 06/22] mm: factor out a devm_request_free_mem_region helper
...nd - size + 1UL; > + for (; addr > size && addr >= base->start; addr -= size) { > + if (region_intersects(addr, size, 0, IORES_DESC_NONE) != > + REGION_DISJOINT) > + continue; The FIXME about the algorithm cost seems justified though, yikes. > + > + res = devm_request_mem_region(dev, addr, size, dev_name(dev)); > + if (!res) > + return ERR_PTR(-ENOMEM); > + res->desc = IORES_DESC_DEVICE_PRIVATE_MEMORY; I wonder if IORES_DESC_DEVICE_PRIVATE_MEMORY should be a function argument? Not really any substantive remark, so Reviewed-by: Jason Gunthorpe <jgg at...
2017 Dec 12
0
[PATCHv2] virtio_mmio: fix devm cleanup
...CONFIG_DEBUG_DEVRES const char *name; size_t size; #endif }; struct devres { struct devres_node node; /* -- 3 pointers */ unsigned long long data[]; /* guarantee ull alignment */ }; 1) devm_request_mem_region -> __devm_request_region dr = devres_alloc(devm_region_release, sizeof(struct region_devres), "devm_region_release" will call __release_region to release resource 2) devm_kzalloc -> devm_kmalloc dr = alloc_dr(devm_kmalloc_release, size, gfp, dev_to_node(dev)); "devm_kmalloc_...
2020 Sep 11
13
[PATCH v4 0/8] selective merging of system ram resources
Some add_memory*() users add memory in small, contiguous memory blocks. Examples include virtio-mem, hyper-v balloon, and the XEN balloon. This can quickly result in a lot of memory resources, whereby the actual resource boundaries are not of interest (e.g., it might be relevant for DIMMs, exposed via /proc/iomem to user space). We really want to merge added resources in this scenario where
2020 Sep 11
13
[PATCH v4 0/8] selective merging of system ram resources
Some add_memory*() users add memory in small, contiguous memory blocks. Examples include virtio-mem, hyper-v balloon, and the XEN balloon. This can quickly result in a lot of memory resources, whereby the actual resource boundaries are not of interest (e.g., it might be relevant for DIMMs, exposed via /proc/iomem to user space). We really want to merge added resources in this scenario where
2017 Dec 12
4
[PATCHv2] virtio_mmio: fix devm cleanup
Recent rework of the virtio_mmio probe/remove paths balanced a devm_ioremap() with an iounmap() rather than its devm variant. This ends up corrupting the devm datastructures, and results in the following boot-time splat on arm64 under QEMU 2.9.0: [ 3.450397] ------------[ cut here ]------------ [ 3.453822] Trying to vfree() nonexistent vm area (00000000c05b4844) [ 3.460534] WARNING: CPU:
2017 Dec 12
4
[PATCHv2] virtio_mmio: fix devm cleanup
Recent rework of the virtio_mmio probe/remove paths balanced a devm_ioremap() with an iounmap() rather than its devm variant. This ends up corrupting the devm datastructures, and results in the following boot-time splat on arm64 under QEMU 2.9.0: [ 3.450397] ------------[ cut here ]------------ [ 3.453822] Trying to vfree() nonexistent vm area (00000000c05b4844) [ 3.460534] WARNING: CPU:
2019 Jun 13
57
dev_pagemap related cleanups
Hi Dan, Jérôme and Jason, below is a series that cleans up the dev_pagemap interface so that it is more easily usable, which removes the need to wrap it in hmm and thus allowing to kill a lot of code Diffstat: 22 files changed, 245 insertions(+), 802 deletions(-) Git tree: git://git.infradead.org/users/hch/misc.git hmm-devmem-cleanup Gitweb:
2011 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote: > No, that's it I think. Please send a diff for the documentation, since > I'm updating the LyX master and I've already applied your previous > version. Here it goes (below). Also do you think you would be able to merge the driver (corresponding v4 patch follows) in the 3.2 merge window that seems to have just opened?
2011 Oct 27
1
[PATCH v3] virtio: Add platform bus driver for memory mapped virtio device
On Mon, 2011-10-24 at 03:33 +0100, Rusty Russell wrote: > No, that's it I think. Please send a diff for the documentation, since > I'm updating the LyX master and I've already applied your previous > version. Here it goes (below). Also do you think you would be able to merge the driver (corresponding v4 patch follows) in the 3.2 merge window that seems to have just opened?
2019 Jun 17
34
dev_pagemap related cleanups v2
Hi Dan, Jérôme and Jason, below is a series that cleans up the dev_pagemap interface so that it is more easily usable, which removes the need to wrap it in hmm and thus allowing to kill a lot of code Note: this series is on top of the rdma/hmm branch + the dev_pagemap releas fix series from Dan that went into 5.2-rc5. Git tree: git://git.infradead.org/users/hch/misc.git
2018 Sep 01
17
[PATCH v3 00/13] remove_conflicting_framebuffers() cleanup
This series cleans up duplicated code for replacing firmware FB driver with proper DRI driver and adds handover support to Tegra driver. This is a sligtly updated version of a series sent on 24 Nov 2017. --- v2: - rebased on current drm-next - dropped staging/sm750fb changes - added kernel docs for DRM helpers v3: - move kerneldoc to fbdev, where functions are implemented - split kerneldoc