Re: [PATCH v4 08/15] mm: Add unsafe_follow_pfn

2020-10-29 Thread Daniel Vetter
On Thu, Oct 29, 2020 at 9:56 AM Christoph Hellwig wrote: > > > +int unsafe_follow_pfn(struct vm_area_struct *vma, unsigned long address, > > + unsigned long *pfn) > > The one tab indent here looks weird, normally tis would be two tabs > or aligned aftetthe opening brace. > > > +{ > > +#ifdef

Re: [PATCH v4 08/15] mm: Add unsafe_follow_pfn

2020-10-29 Thread Christoph Hellwig
> +int unsafe_follow_pfn(struct vm_area_struct *vma, unsigned long address, > + unsigned long *pfn) The one tab indent here looks weird, normally tis would be two tabs or aligned aftetthe opening brace. > +{ > +#ifdef CONFIG_STRICT_FOLLOW_PFN > + pr_info("unsafe follow_pfn usage

[PATCH v4 08/15] mm: Add unsafe_follow_pfn

2020-10-26 Thread Daniel Vetter
Way back it was a reasonable assumptions that iomem mappings never change the pfn range they point at. But this has changed: - gpu drivers dynamically manage their memory nowadays, invalidating ptes with unmap_mapping_range when buffers get moved - contiguous dma allocations have moved from