On Fri, May 05, 2017 at 10:06:06AM +0300, Amir Goldstein wrote:
> I much rather that you sort out uuid helpers in a way that will
> satisfy the filesystem
> needs (just provide the helpers don't need to convert filesystems code).
Yeah.
> IMO, you should acknowledge that the common use case for
On Fri, May 05, 2017 at 12:50:31PM +0300, Amir Goldstein wrote:
> To complete the picture for folks not cc'ed on my patches,
> xfs use case suggests there is also justification for the additional helpers:
>
> uuid_is_null() / uuid_equal()
> guid_is_null() / guid_equal()
The is_null is useful and
On Wed, Apr 25, 2018 at 11:25:11AM +0100, Russell King - ARM Linux wrote:
> > config ARM_DMA_USE_IOMMU
> > - bool
> > + def_bool y
> > select ARM_HAS_SG_CHAIN
> > select NEED_SG_DMA_LENGTH
>
> This doesn't work - as has recently been discussed with hch, we can't
> globally enable
The series seems to miss a cover letter.
Also I really think this patch original patch shouldn't be in the proper
series.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
On Wed, Apr 25, 2018 at 12:10:48PM +0200, Thierry Reding wrote:
> From: Thierry Reding
>
> The dma_iommu_detach_device() API can be used by drivers to forcibly
> detach a device from an IOMMU that architecture code might have attached
> to. This is useful for drivers that
> +void arch_iommu_detach_device(struct device *dev)
> +{
> +#ifdef CONFIG_ARM_DMA_USE_IOMMU
> + struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev);
> + const struct dma_map_ops *dma_ops;
> +
> + if (!mapping)
> + return;
> +
> +
}
> +#endif
Having this hidden in a helper would be nicer, but anything that
doesn't directly expose the dma_map_ops to a driver is fine with me.
So from the dma-mapping POV:
Acked-by: Christoph Hellwig
___
Nouveau mailing list
Nouveau@
Looks good:
Acked-by: Christoph Hellwig
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
The functionality is identical to the one currently open coded in
device-dax.
Signed-off-by: Christoph Hellwig
---
drivers/dax/dax-private.h | 4 ---
drivers/dax/device.c | 52 +--
2 files changed, 1 insertion(+), 55 deletions(-)
diff --git a/drivers
The only user of it has just been removed, and there wasn't really any need
to wrap a basic memory allocator to start with.
Signed-off-by: Christoph Hellwig
---
include/linux/hmm.h | 3 ---
mm/hmm.c| 14 --
2 files changed, 17 deletions(-)
diff --git a/include/linux
hmm_vma_alloc_locked_page is scheduled to go away, use the proper
mm function directly.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/nouveau/nouveau_dmem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c
b/drivers/gpu/drm
The dev_pagemap is a growing too many callbacks. Move them into a
separate ops structure so that they are not duplicated for multiple
instances, and an attacker can't easily overwrite them.
Signed-off-by: Christoph Hellwig
---
drivers/dax/device.c | 6 +-
drivers/nvdimm
Just use devm_memremap_pages instead of hmm_devmem_add pages to allow
killing that wrapper which doesn't provide a whole lot of benefits.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/nouveau/nouveau_dmem.c | 80 --
1 file changed, 38 insertions(+), 42 deletions
Provide an internal refcounting logic if no ->ref field is provided
in the pagemap passed into devm_memremap_pages so that callers don't
have to reinvent it poorly.
Signed-off-by: Christoph Hellwig
---
include/linux/memremap.h | 4 +++
kernel/memremap.c |
Keep the physical address allocation that hmm_add_device does with the
rest of the resource code, and allow future reuse of it without the hmm
wrapper.
Signed-off-by: Christoph Hellwig
---
include/linux/ioport.h | 2 ++
kernel/resource.c | 39 +++
mm
Passing the actual typed structure leads to more understandable code
vs the actual references.
Signed-off-by: Christoph Hellwig
---
drivers/dax/device.c | 7 +++
drivers/nvdimm/pmem.c | 6 +++---
drivers/pci/p2pdma.c | 6 +++---
include/linux/memremap.h
This code is a trivial wrapper around device model helpers, which
should have been integrated into the driver device model usage from
the start. Assuming it actually had users, which it never had since
the code was added more than 1 1/2 years ago.
Signed-off-by: Christoph Hellwig
---
include
This function has never been used since it was first added to the kernel
more than a year and a half ago, and if we ever grow a consumer of the
MEMORY_DEVICE_PUBLIC infrastructure it can easily use devm_memremap_pages
directly now that we've simplified the API for it.
Signed-off-by: Christoph
igned-off-by: Christoph Hellwig
---
mm/hmm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/hmm.c b/mm/hmm.c
index 0c62426d1257..e1dc98407e7b 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -1347,8 +1347,6 @@ static void hmm_devmem_free(struct page *page, void *data)
{
struct hmm_devmem *devm
noveau is currently using this through an odd hmm wrapper, and I plan
to switch it to the real thing later in this series.
Signed-off-by: Christoph Hellwig
---
mm/mempolicy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 01600d80ae01..f9023b5fba37
Signed-off-by: Christoph Hellwig
---
mm/Kconfig | 10 --
1 file changed, 10 deletions(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index f0c76ba47695..0d2ba7e1f43e 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -675,16 +675,6 @@ config ARCH_HAS_HMM_MIRROR
depends on (X86_64 || PPC64
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:
This replaces the hacky ->fault callback, which is currently directly
called from common code through a hmm specific data structure as an
exercise in layering violations.
Signed-off-by: Christoph Hellwig
---
include/linux/hmm.h | 6 --
include/linux/memremap.h | 6 ++
incl
Remove the clumsy hmm_devmem_page_{get,set}_drvdata helpers, and
instead just access the page directly. Also make the page data
a void pointer, and thus much easier to use.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/nouveau/nouveau_dmem.c | 18 +++--
include/linux/hmm.h
Just check if there is a ->page_free operation set and take care of the
static key enable, as well as the put using device managed resources.
Signed-off-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c | 23 +++--
include/linux/mm.h| 10
kernel/memremap.c |
The code hasn't been used since it was added to the tree, and doesn't
appear to actually be usable. Mark it as BROKEN until either a user
comes along or we finally give up on it.
Signed-off-by: Christoph Hellwig
---
mm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/Kconfig b/mm
There isn't really much value add in the hmm_devmem_add wrapper. Just
factor out a little helper to find the resource, and otherwise let the
driver implement the dev_pagemap_ops directly.
Signed-off-by: Christoph Hellwig
---
Documentation/vm/hmm.rst | 26
include/linux/hmm.h
The migrate_vma helper is only used by noveau to migrate device private
pages around. Other HMM_MIRROR users like amdgpu or infiniband don't
need it.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/nouveau/Kconfig | 1 +
mm/Kconfig | 1 -
2 files changed, 1 insertion
All the mm/hmm.c code is better keyed off HMM_MIRROR. Also let nouveau
depend on it instead of the mix of a dummy dependency symbol plus the
actually selected one. Drop various odd dependencies, as the code is
pretty portable.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/nouveau
struct dev_pagemap is always embedded into a containing structure, so
there is no need to an additional private data field.
Signed-off-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c| 2 +-
include/linux/memremap.h | 3 +--
kernel/memremap.c| 2 +-
mm/hmm.c | 9
The ZONE_DEVICE support doesn't depend on anything HMM related, just on
various bits of arch support as indicated by the architecture. Also
don't select the option from nouveau as it isn't present in many setups,
and depend on it instead.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm
On Fri, Jun 14, 2019 at 06:14:45PM -0700, Dan Williams wrote:
> On Thu, Jun 13, 2019 at 11:14 PM Christoph Hellwig wrote:
> >
> > On Thu, Jun 13, 2019 at 11:27:39AM -0700, Dan Williams wrote:
> > > It also turns out the nvdimm unit tests crash with this signature on
>
struct dev_pagemap is always embedded into a containing structure, so
there is no need to an additional private data field.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
drivers/nvdimm/pmem.c| 2 +-
include/linux/memremap.h | 3 +--
kernel/memremap.c| 2 +-
mm
Keep the physical address allocation that hmm_add_device does with the
rest of the resource code, and allow future reuse of it without the hmm
wrapper.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
Reviewed-by: John Hubbard
---
include/linux/ioport.h | 2 ++
kernel/resource.c
The dev_pagemap is a growing too many callbacks. Move them into a
separate ops structure so that they are not duplicated for multiple
instances, and an attacker can't easily overwrite them.
Signed-off-by: Christoph Hellwig
Reviewed-by: Logan Gunthorpe
Reviewed-by: Jason Gunthorpe
---
drivers
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
mm/Kconfig | 10 --
1 file changed, 10 deletions(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index f0c76ba47695..0d2ba7e1f43e 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -675,16 +675,6 @@ config ARCH_HAS_HMM_MIRROR
Provide an internal refcounting logic if no ->ref field is provided
in the pagemap passed into devm_memremap_pages so that callers don't
have to reinvent it poorly.
Signed-off-by: Christoph Hellwig
---
include/linux/memremap.h | 4 ++
kernel/memremap.c |
Remove the clumsy hmm_devmem_page_{get,set}_drvdata helpers, and
instead just access the page directly. Also make the page data
a void pointer, and thus much easier to use.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/nouveau/nouveau_dmem.c | 18 +++--
include/linux/hmm.h
The only user of it has just been removed, and there wasn't really any need
to wrap a basic memory allocator to start with.
Signed-off-by: Christoph Hellwig
---
include/linux/hmm.h | 3 ---
mm/hmm.c| 14 --
2 files changed, 17 deletions(-)
diff --git a/include/linux
The code hasn't been used since it was added to the tree, and doesn't
appear to actually be usable. Mark it as BROKEN until either a user
comes along or we finally give up on it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
mm/Kconfig | 1 +
1 file changed, 1 insertion
This replaces the hacky ->fault callback, which is currently directly
called from common code through a hmm specific data structure as an
exercise in layering violations.
Signed-off-by: Christoph Hellwig
Reviewed-by: Ralph Campbell
---
include/linux/hmm.h | 6 --
include/li
s also fixes the fact that hmm never called
dev_pagemap_put_ops and thus would leave the slow path enabled forever,
even after a device driver unload or disable.
Signed-off-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c | 23 +++--
include/linux/mm.h| 10
kernel/memr
This code is a trivial wrapper around device model helpers, which
should have been integrated into the driver device model usage from
the start. Assuming it actually had users, which it never had since
the code was added more than 1 1/2 years ago.
Signed-off-by: Christoph Hellwig
Reviewed
Add a flags field to struct dev_pagemap to replace the altmap_valid
boolean to be a little more extensible. Also add a pgmap_altmap() helper
to find the optional altmap and clean up the code using the altmap using
it.
Signed-off-by: Christoph Hellwig
---
arch/powerpc/mm/mem.c | 10
Passing the actual typed structure leads to more understandable code
vs just passing the ref member.
Reported-by: Logan Gunthorpe
Signed-off-by: Christoph Hellwig
Reviewed-by: Logan Gunthorpe
Reviewed-by: Jason Gunthorpe
Reviewed-by: Dan Williams
---
drivers/dax/device.c | 12
The ZONE_DEVICE support doesn't depend on anything HMM related, just on
various bits of arch support as indicated by the architecture. Also
don't select the option from nouveau as it isn't present in many setups,
and depend on it instead.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm
The migrate_vma helper is only used by noveau to migrate device private
pages around. Other HMM_MIRROR users like amdgpu or infiniband don't
need it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
drivers/gpu/drm/nouveau/Kconfig | 1 +
mm/Kconfig | 1
The functionality is identical to the one currently open coded in
device-dax.
Signed-off-by: Christoph Hellwig
---
drivers/dax/dax-private.h | 4
drivers/dax/device.c | 43 ---
2 files changed, 47 deletions(-)
diff --git a/drivers/dax/dax
All the mm/hmm.c code is better keyed off HMM_MIRROR. Also let nouveau
depend on it instead of the mix of a dummy dependency symbol plus the
actually selected one. Drop various odd dependencies, as the code is
pretty portable.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/nouveau
There isn't really much value add in the hmm_devmem_add wrapper and
more, as using devm_memremap_pages directly now is just as simple.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
Documentation/vm/hmm.rst | 26
include/linux/hmm.h | 129
Just use devm_memremap_pages instead of hmm_devmem_add pages to allow
killing that wrapper which doesn't provide a whole lot of benefits.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/nouveau/nouveau_dmem.c | 82 --
1 file changed, 38 insertions(+), 44 deletions
The functionality is identical to the one currently open coded in
p2pdma.c.
Signed-off-by: Christoph Hellwig
---
drivers/pci/p2pdma.c | 56
1 file changed, 4 insertions(+), 52 deletions(-)
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
hmm_vma_alloc_locked_page is scheduled to go away, use the proper
mm function directly.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
drivers/gpu/drm/nouveau/nouveau_dmem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau
igned-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
Reviewed-by: John Hubbard
---
mm/hmm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/hmm.c b/mm/hmm.c
index dc251c51803a..64e788bb1211 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -1380,8 +1380,6 @@ static void hmm_devmem_free(struct page *p
nouveau is currently using this through an odd hmm wrapper, and I plan
to switch it to the real thing later in this series.
Signed-off-by: Christoph Hellwig
Reviewed-by: John Hubbard
---
mm/mempolicy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index
Most pgmap types are only supported when certain config options are
enabled. Check for a type that is valid for the current configuration
before setting up the pagemap.
Signed-off-by: Christoph Hellwig
---
kernel/memremap.c | 27 +++
1 file changed, 27 insertions
This function has never been used since it was first added to the kernel
more than a year and a half ago, and if we ever grow a consumer of the
MEMORY_DEVICE_PUBLIC infrastructure it can easily use devm_memremap_pages
directly.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
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
On Mon, Jun 17, 2019 at 12:02:09PM -0700, Dan Williams wrote:
> Need a lead in patch that introduces MEMORY_DEVICE_DEVDAX, otherwise:
Or maybe a MEMORY_DEVICE_DEFAULT = 0 shared by fsdax and p2pdma?
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
On Mon, Jun 17, 2019 at 10:51:35AM -0700, Dan Williams wrote:
> > - struct dev_pagemap *pgmap = _pgmap;
>
> Whoops, needed to keep this line to avoid:
>
> tools/testing/nvdimm/test/iomap.c:109:11: error: ‘pgmap’ undeclared
> (first use in this function); did you mean ‘_pgmap’?
So I really
On Mon, Jun 17, 2019 at 02:08:14PM -0600, Logan Gunthorpe wrote:
> I just noticed this is missing a line to set pgmap->ops to
> pci_p2pdma_pagemap_ops. I must have gotten confused by the other users
> in my original review. Though I'm not sure how this compiles as the new
> struct is static and
On Mon, Jun 24, 2019 at 11:24:48AM -0700, Dan Williams wrote:
> I asked for this simply because it was not exported historically. In
> general I want to establish explicit export-type criteria so the
> community can spend less time debating when to use EXPORT_SYMBOL_GPL
> [1].
>
> The thought in
On Thu, Jun 20, 2019 at 09:26:48PM +0200, Michal Hocko wrote:
> On Thu 13-06-19 11:43:21, Christoph Hellwig wrote:
> > The code hasn't been used since it was added to the tree, and doesn't
> > appear to actually be usable. Mark it as BROKEN until either a user
> > comes alo
On Tue, Jun 25, 2019 at 11:44:28AM +, Jason Gunthorpe wrote:
> Which tree and what does the resolution look like?
Looks like in -mm. The current commit in linux-next is:
commit 0d23b042f26955fb35721817beb98ba7f1d9ed9f
Author: Robin Murphy
Date: Fri Jun 14 10:42:14 2019 +1000
mm:
On Thu, Jun 13, 2019 at 08:40:46PM +, Jason Gunthorpe wrote:
> > Perhaps we should pull those out and resend them through hmm.git?
>
> It could be done - but how bad is the conflict resolution?
Trivial. All but one patch just apply using git-am, and the other one
just has a few lines of
On Thu, Jun 13, 2019 at 02:16:27PM +, Jason Gunthorpe wrote:
> On Thu, Jun 13, 2019 at 11:43:03AM +0200, Christoph Hellwig wrote:
> > Hi Dan, Jérôme and Jason,
> >
> > below is a series that cleans up the dev_pagemap interface so that
> > it is more easily usa
On Thu, Jun 13, 2019 at 07:05:07PM +, Jason Gunthorpe wrote:
> Hurm, is hmm following this comment from mm_types.h?
>
> * If you allocate the page using alloc_pages(), you can use some of the
> * space in struct page for your own purposes. The five words in the main
> * union are
On Thu, Jun 13, 2019 at 07:34:31PM +, Jason Gunthorpe wrote:
> Reviewed-by: Christoph Hellwig
Really? :)
On Thu, Jun 13, 2019 at 05:22:17PM -0700, Ira Weiny wrote:
> > - dev_dax->pgmap.ref = _dax->ref;
>
> I don't think this exactly correct. pgmap.ref is a pointer to the dev_dax ref
> structure. Taking it away will cause devm_memremap_pages() to fail AFAICS.
>
> I think you need to change
On Thu, Jun 13, 2019 at 05:43:15PM -0700, Ira Weiny wrote:
> yes but the earlier patch:
>
> [PATCH 03/22] mm: remove hmm_devmem_add_resource
>
> Removes the only place type is set to MEMORY_DEVICE_PUBLIC.
>
> So I think it is ok. Frankly I was wondering if we should remove the public
> type
On Thu, Jun 13, 2019 at 06:53:15PM -0700, John Hubbard wrote:
> For those who have out of tree drivers that need migrate_vma(), but are not
> Nouveau, could we pretty please allow a way to select that independently?
No. The whole point is to not build this fairly big chunk of code in
unless we
On Mon, Jun 17, 2019 at 10:37:12AM -0700, Dan Williams wrote:
> > +struct resource *devm_request_free_mem_region(struct device *dev,
> > + struct resource *base, unsigned long size);
>
> This appears to need a 'static inline' helper stub in the
> CONFIG_DEVICE_PRIVATE=n case,
On Mon, Jun 17, 2019 at 07:40:18PM +0200, Christoph Hellwig wrote:
> On Mon, Jun 17, 2019 at 10:37:12AM -0700, Dan Williams wrote:
> > > +struct resource *devm_request_free_mem_region(struct device *dev,
> > > + struct resource *base, unsigned long size);
On Wed, Jun 19, 2019 at 03:19:23PM -0300, Jason Gunthorpe wrote:
> > Just make sure that when you backmerge v5.2-rc5 you have a clear
> > reason in the merge commit message about why you needed to do it.
> > While needless rebasing is top of the pet peeve list, second place, as
> > I found out, is
On Tue, Jun 18, 2019 at 12:47:10PM -0700, Dan Williams wrote:
> > Git tree:
> >
> > git://git.infradead.org/users/hch/misc.git hmm-devmem-cleanup.2
> >
> > Gitweb:
> >
> >
> > http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/hmm-devmem-cleanup.2
>
> Attached is my
On Fri, Jun 14, 2019 at 07:21:54PM -0700, John Hubbard wrote:
> On 6/13/19 2:43 AM, Christoph Hellwig wrote:
> > Keep the physical address allocation that hmm_add_device does with the
> > rest of the resource code, and allow future reuse of it without the hmm
> > wrapper
igned-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
Reviewed-by: John Hubbard
---
mm/hmm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/hmm.c b/mm/hmm.c
index 376159a769fb..e7dd2ab8f9ab 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -1383,8 +1383,6 @@ static void hmm_devmem_free(struct page *p
The dev_pagemap is a growing too many callbacks. Move them into a
separate ops structure so that they are not duplicated for multiple
instances, and an attacker can't easily overwrite them.
Signed-off-by: Christoph Hellwig
Reviewed-by: Logan Gunthorpe
Reviewed-by: Jason Gunthorpe
---
drivers
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
mm/Kconfig | 10 --
1 file changed, 10 deletions(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index f0c76ba47695..0d2ba7e1f43e 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -675,16 +675,6 @@ config ARCH_HAS_HMM_MIRROR
s also fixes the fact that hmm never called
dev_pagemap_put_ops and thus would leave the slow path enabled forever,
even after a device driver unload or disable.
Signed-off-by: Christoph Hellwig
---
drivers/nvdimm/pmem.c | 23 +++--
include/linux/mm.h| 10
kernel/memr
Keep the physical address allocation that hmm_add_device does with the
rest of the resource code, and allow future reuse of it without the hmm
wrapper.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
Reviewed-by: John Hubbard
---
include/linux/ioport.h | 2 ++
kernel/resource.c
This function has never been used since it was first added to the kernel
more than a year and a half ago, and if we ever grow a consumer of the
MEMORY_DEVICE_PUBLIC infrastructure it can easily use devm_memremap_pages
directly.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
-by: Christoph Hellwig
---
drivers/dax/device.c | 1 +
include/linux/memremap.h | 8
kernel/memremap.c| 22 ++
3 files changed, 31 insertions(+)
diff --git a/drivers/dax/device.c b/drivers/dax/device.c
index 8465d12fecba..79014baa782d 100644
--- a/drivers/dax
The code hasn't been used since it was added to the tree, and doesn't
appear to actually be usable.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
Acked-by: Michal Hocko
---
include/linux/hmm.h | 4 ++--
include/linux/ioport.h | 1 -
include/linux/memremap.h | 8
On Thu, Jun 27, 2019 at 04:18:22PM +, Jason Gunthorpe wrote:
> On Wed, Jun 26, 2019 at 02:27:02PM +0200, Christoph Hellwig wrote:
> > This function has never been used since it was first added to the kernel
> > more than a year and a half ago, and if we ever
On Thu, Jun 27, 2019 at 04:29:45PM +, Jason Gunthorpe wrote:
> I'ver heard there are some other use models for fault() here beyond
> migrate to ram, but we can rename it if we ever see them.
Well, it absolutely needs to migrate to some piece of addressable
and coherent memory, so ram might be
Remove the clumsy hmm_devmem_page_{get,set}_drvdata helpers, and
instead just access the page directly. Also make the page data
a void pointer, and thus much easier to use.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/nouveau/nouveau_dmem.c | 18 ++-
include/linux/hmm.h
This replaces the hacky ->fault callback, which is currently directly
called from common code through a hmm specific data structure as an
exercise in layering violations.
Signed-off-by: Christoph Hellwig
Reviewed-by: Ralph Campbell
---
include/linux/hmm.h | 6 --
include/li
Passing the actual typed structure leads to more understandable code
vs just passing the ref member.
Reported-by: Logan Gunthorpe
Signed-off-by: Christoph Hellwig
Reviewed-by: Logan Gunthorpe
Reviewed-by: Jason Gunthorpe
Reviewed-by: Dan Williams
---
drivers/dax/device.c | 12
nouveau is currently using this through an odd hmm wrapper, and I plan
to switch it to the real thing later in this series.
Signed-off-by: Christoph Hellwig
Reviewed-by: John Hubbard
---
mm/mempolicy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index
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 Linux 5.2-rc5 and has some minor
conflicts with the hmm tree that
Add a flags field to struct dev_pagemap to replace the altmap_valid
boolean to be a little more extensible. Also add a pgmap_altmap() helper
to find the optional altmap and clean up the code using the altmap using
it.
Signed-off-by: Christoph Hellwig
---
arch/powerpc/mm/mem.c | 10
struct dev_pagemap is always embedded into a containing structure, so
there is no need to an additional private data field.
Signed-off-by: Christoph Hellwig
Reviewed-by: Jason Gunthorpe
---
drivers/nvdimm/pmem.c| 2 +-
include/linux/memremap.h | 3 +--
kernel/memremap.c| 2 +-
mm
This code is a trivial wrapper around device model helpers, which
should have been integrated into the driver device model usage from
the start. Assuming it actually had users, which it never had since
the code was added more than 1 1/2 years ago.
Signed-off-by: Christoph Hellwig
Reviewed
Just use devm_memremap_pages instead of hmm_devmem_add pages to allow
killing that wrapper which doesn't provide a whole lot of benefits.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/nouveau/nouveau_dmem.c | 82 --
1 file changed, 38 insertions(+), 44 deletions
All the mm/hmm.c code is better keyed off HMM_MIRROR. Also let nouveau
depend on it instead of the mix of a dummy dependency symbol plus the
actually selected one. Drop various odd dependencies, as the code is
pretty portable.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/nouveau
The functionality is identical to the one currently open coded in
device-dax.
Signed-off-by: Christoph Hellwig
---
drivers/dax/dax-private.h | 4
drivers/dax/device.c | 43 ---
2 files changed, 47 deletions(-)
diff --git a/drivers/dax/dax
The only user of it has just been removed, and there wasn't really any need
to wrap a basic memory allocator to start with.
Signed-off-by: Christoph Hellwig
---
include/linux/hmm.h | 3 ---
mm/hmm.c| 14 --
2 files changed, 17 deletions(-)
diff --git a/include/linux
The functionality is identical to the one currently open coded in
p2pdma.c.
Signed-off-by: Christoph Hellwig
---
drivers/pci/p2pdma.c | 57
1 file changed, 4 insertions(+), 53 deletions(-)
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
Provide an internal refcounting logic if no ->ref field is provided
in the pagemap passed into devm_memremap_pages so that callers don't
have to reinvent it poorly.
Signed-off-by: Christoph Hellwig
---
include/linux/memremap.h | 4 ++
kernel/memremap.c |
1 - 100 of 514 matches
Mail list logo