Re: [PATCH] proc_sysctl: clamp sizes using table->maxlen

2021-02-16 Thread Christoph Hellwig
On Mon, Feb 15, 2021 at 09:53:05AM -0500, Alex Xu (Hello71) wrote: > Since maxlen is already exposed, we can allocate approximately the right > amount directly, fixing up those drivers which set a bogus maxlen. These > drivers were located based on those which had copy_x_user replaced in >

Re: [PATCH 0/2] block: avoid to drop & re-add partitions if partitions aren't changed

2021-02-16 Thread Christoph Hellwig
On Mon, Feb 15, 2021 at 12:03:41PM +0800, Ming Lei wrote: > Hello, I think this is a fundamentally bad idea. We should not keep the parsed partition state around forever just to work around some buggy user space software.

Re: [PATCH 34/33] netfs: Use in_interrupt() not in_softirq()

2021-02-16 Thread Christoph Hellwig
On Mon, Feb 15, 2021 at 10:46:23PM +, David Howells wrote: > The in_softirq() in netfs_rreq_terminated() works fine for the cache being > on a normal disk, as the completion handlers may get called in softirq > context, but for an NVMe drive, the completion handler may get called in > IRQ

Re: [PATCH 2/2] quota: wire up quotactl_path

2021-02-11 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 1/2] quota: Add mountpath based quota support

2021-02-11 Thread Christoph Hellwig
ere? Otherwise this looks good: Reviewed-by: Christoph Hellwig

Re: add a new dma_alloc_noncontiguous API v2

2021-02-11 Thread Christoph Hellwig
On Thu, Feb 11, 2021 at 10:08:18AM +0100, Ricardo Ribalda wrote: > Hi Christoph > > What are your merge plans for the uvc change? > http://git.infradead.org/users/hch/dma-mapping.git/commit/3dc47131f8aacc2093f68a9971d24c754e435520 > > Are you going to remove the patch on your Merge request and

Re: [PATCH 8/9] vfio/pci: use x86 naming instead of igd

2021-02-11 Thread Christoph Hellwig
On Wed, Feb 03, 2021 at 09:54:48AM -0400, Jason Gunthorpe wrote: > If people are accepting that these device-specific drivers are > required then we need to come to a community consensus to decide what > direction to pursue: > > * Do we embrace the driver core and use it to load VFIO modules like

Re: [PATCH 8/9] vfio/pci: use x86 naming instead of igd

2021-02-11 Thread Christoph Hellwig
On Tue, Feb 02, 2021 at 04:59:23PM -0700, Alex Williamson wrote: > vfio-pci-igd support knows very little about the device, we're > effectively just exposing a firmware table and some of the host bridge > config space (read-only). So the idea that the host kernel needs to > have updated i915

Re: [PATCH 8/9] vfio/pci: use x86 naming instead of igd

2021-02-11 Thread Christoph Hellwig
On Thu, Feb 04, 2021 at 11:12:49AM +0200, Max Gurtovoy wrote: > But the PCI function (the bounded BDF) is GPU function or NVLINK function ? > > If it's NVLINK function then we should fail probing in the host vfio-pci > driver. > > if its a GPU function so it shouldn't been called nvlink2

Re: [PATCH v2 0/9] Introduce vfio-pci-core subsystem

2021-02-11 Thread Christoph Hellwig
On Wed, Feb 10, 2021 at 09:34:52AM -0400, Jason Gunthorpe wrote: > > I'm a bit confused about the change from v1 to v2, especially about > > how to inject module specific operations. From live migration p.o.v > > it may requires two hook points at least for some devices (e.g. i40e > > in original

Re: [PATCH 3/3] dma-contiguous: Type cast MAX_ORDER as unsigned int

2021-02-11 Thread Christoph Hellwig
~ > ./include/linux/minmax.h:58:19: note: in expansion of macro > ‘__careful_cmp’ > #define max(x, y) __careful_cmp(x, y, >) >^ > kernel/dma/contiguous.c:402:35: note: in expansion of macro ‘max’ > phys_addr_t align = PAGE_SIZE << ma

Re: [PATCH 2/3] arm64/hugetlb: Enable HUGETLB_PAGE_SIZE_VARIABLE

2021-02-11 Thread Christoph Hellwig
On Thu, Feb 11, 2021 at 11:52:10AM +0530, Anshuman Khandual wrote: > MAX_ORDER which invariably depends on FORCE_MAX_ZONEORDER can be a variable > for a given page size, depending on whether TRANSPARENT_HUGEPAGE is enabled > or not. In certain page size and THP combinations HUGETLB_PAGE_ORDER can

Re: [PATCH 1/3] mm/page_alloc: Fix pageblock_order when HUGETLB_PAGE_ORDER >= MAX_ORDER

2021-02-11 Thread Christoph Hellwig
> - if (HPAGE_SHIFT > PAGE_SHIFT) > + if ((HPAGE_SHIFT > PAGE_SHIFT) && (HUGETLB_PAGE_ORDER < MAX_ORDER)) No need for the braces.

Re: [PATCH 0/9] Add support for SVM atomics in Nouveau

2021-02-11 Thread Christoph Hellwig
On Wed, Feb 10, 2021 at 01:59:13PM -0400, Jason Gunthorpe wrote: > Really what you want to do here is leave the CPU page in the VMA and > the page tables where it started and deny CPU access to the page. Then > all the proper machinery will continue to work. > > IMHO "migration" is the wrong idea

Re: [PATCH 1/2] Revert "MIPS: kernel: {ftrace,kgdb}: Set correct address limit for cache flushes"

2021-02-10 Thread Christoph Hellwig
ng > for EVA mode, too. So no need to do set_fs(KERNEL_DS) here. > > Signed-off-by: Thomas Bogendoerfer Looks good, Reviewed-by: Christoph Hellwig ... it might be time to kill off the remaining set_fs() users in mips code as well ...

Re: [RFC][PATCH] kprobes: Remove kprobe::fault_handler

2021-02-10 Thread Christoph Hellwig
> > If just plain bad. Those other handlers are ran from non-preemptible > context and had better use _nofault() functions. Also, there is no > upstream usage of this. > > Signed-off-by: Peter Zijlstra (Intel) Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH V2 4/8] mm/highmem: Add VM_BUG_ON() to mem*_page() calls

2021-02-10 Thread Christoph Hellwig
On Wed, Feb 10, 2021 at 08:29:01AM -0800, Ira Weiny wrote: > On Wed, Feb 10, 2021 at 12:55:02PM +0000, Christoph Hellwig wrote: > > On Tue, Feb 09, 2021 at 10:22:17PM -0800, ira.we...@intel.com wrote: > > > From: Ira Weiny > > > > > > Add VM_BUG_ON boun

Re: [PATCH v3 10/11] xfs: Implement ->corrupted_range() for XFS

2021-02-10 Thread Christoph Hellwig
> + if (XFS_RMAP_NON_INODE_OWNER(rec->rm_owner) || > + (rec->rm_flags & (XFS_RMAP_ATTR_FORK | XFS_RMAP_BMBT_BLOCK))) { > + // TODO check and try to fix metadata > + rc = -EFSCORRUPTED; > + xfs_force_shutdown(cur->bc_mp, SHUTDOWN_CORRUPT_META);

Re: [PATCH v3 06/11] mm, pmem: Implement ->memory_failure() in pmem driver

2021-02-10 Thread Christoph Hellwig
> +static int pmem_pagemap_memory_failure(struct dev_pagemap *pgmap, > + unsigned long pfn, int flags) > +{ > + struct pmem_device *pdev; > + struct gendisk *disk; > + loff_t disk_offset; > + int rc = 0; > + unsigned long size = page_size(pfn_to_page(pfn)); > + > +

Re: [PATCH v3 05/11] mm, fsdax: Refactor memory-failure handler for dax mapping

2021-02-10 Thread Christoph Hellwig
> +extern int mf_dax_mapping_kill_procs(struct address_space *mapping, pgoff_t > index, int flags); No nee for the extern, please avoid the overly long line. > @@ -120,6 +121,13 @@ static int hwpoison_filter_dev(struct page *p) > if (PageSlab(p)) > return -EINVAL; > > +

Re: [PATCH v3 02/11] blk: Introduce ->corrupted_range() for block device

2021-02-10 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 06:55:21PM +0800, Shiyang Ruan wrote: > In fsdax mode, the memory failure happens on block device. So, it is > needed to introduce an interface for block devices. Each kind of block > device can handle the memory failure in ther own ways. As told before: DAX operations

Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure()

2021-02-10 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 06:55:20PM +0800, Shiyang Ruan wrote: > When memory-failure occurs, we call this function which is implemented > by each kind of devices. For the fsdax case, pmem device driver > implements it. Pmem device driver will find out the block device where > the error page

Re: [PATCH 5/7] fsdax: Dedup file range to use a compare function

2021-02-10 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 05:46:13PM +0800, Ruan Shiyang wrote: > > > On 2021/2/9 下午5:34, Christoph Hellwig wrote: >> On Tue, Feb 09, 2021 at 05:15:13PM +0800, Ruan Shiyang wrote: >>> The dax dedupe comparison need the iomap_ops pointer as argument, so my >>> unde

Re: [PATCH v3 11/11] fs/dax: Remove useless functions

2021-02-10 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 06:55:30PM +0800, Shiyang Ruan wrote: > Since owner tarcking is triggerred by pmem device, these functions are s/tarcking/tracking/ > useless. So remove them. Note that this patch does not apply for me when applying your two series on top of 5.11-rc5.

Re: [PATCH V2 8/8] btrfs: convert to zero_user()

2021-02-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH V2 7/8] btrfs: use copy_highpage() instead of 2 kmaps()

2021-02-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH V2 6/8] btrfs: use memcpy_[to|from]_page() and kmap_local_page()

2021-02-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH V2 5/8] iov_iter: Remove memzero_page() in favor of zero_user()

2021-02-10 Thread Christoph Hellwig
r() Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH V2 4/8] mm/highmem: Add VM_BUG_ON() to mem*_page() calls

2021-02-10 Thread Christoph Hellwig
ser().[1][2] s/VM_BUG_ON/BUG_ON/g ? Otherwise looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH V2 2/8] mm/highmem: Convert memcpy_[to|from]_page() to kmap_local_page()

2021-02-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH V2 3/8] mm/highmem: Introduce memcpy_page(), memmove_page(), and memset_page()

2021-02-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH V2 1/8] mm/highmem: Lift memcpy_[to|from]_page to core

2021-02-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH] module: potential uninitialized return in module_kallsyms_on_each_symbol()

2021-02-10 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

[PATCH 5/6] MIPS: remove CONFIG_DMA_MAYBE_COHERENT

2021-02-10 Thread Christoph Hellwig
CONFIG_DMA_MAYBE_COHERENT just guards two early init options now. Just enable them unconditionally for CONFIG_DMA_NONCOHERENT. Signed-off-by: Christoph Hellwig --- arch/mips/Kconfig| 8 ++-- arch/mips/kernel/setup.c | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff

[PATCH 6/6] MIPS: remove CONFIG_DMA_PERDEV_COHERENT

2021-02-10 Thread Christoph Hellwig
Just select DMA_NONCOHERENT and ARCH_HAS_SETUP_DMA_OPS from the MIPS_GENERIC platform instead. Signed-off-by: Christoph Hellwig Reviewed-by: Huacai Chen --- arch/mips/Kconfig | 3 ++- arch/mips/mm/dma-noncoherent.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff

[PATCH 4/6] driver core: lift dma_default_coherent into common code

2021-02-10 Thread Christoph Hellwig
the ->dma_coherent field to this default the amount of arch hooks required for this behavior can be greatly reduced. Signed-off-by: Christoph Hellwig Acked-by: Greg Kroah-Hartman --- arch/mips/Kconfig | 1 - arch/mips/alchemy/common/setup.c | 2 +- arch/mips/include/asm/

[PATCH 1/6] MIPS/malta: simplify plat_setup_iocoherency

2021-02-10 Thread Christoph Hellwig
a bit. Signed-off-by: Christoph Hellwig --- arch/mips/mti-malta/malta-setup.c | 32 +-- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c index e1fb8b5349447e..4caff9e3b45637 100644

[PATCH 2/6] MIPS/alchemy: factor out the DMA coherent setup

2021-02-10 Thread Christoph Hellwig
Factor out a alchemy_dma_coherent helper that determines if the platform is DMA coherent. Also stop initializing the hw_coherentio variable, given that is only ever set to a non-zero value by the malta setup code. Signed-off-by: Christoph Hellwig --- arch/mips/alchemy/common/setup.c | 33

[PATCH 3/6] MIPS: refactor the runtime coherent vs noncoherent DMA indicators

2021-02-10 Thread Christoph Hellwig
Replace the global coherentio enum, and the hw_coherentio (fake) boolean variables with a single boolean dma_default_coherent flag. Signed-off-by: Christoph Hellwig --- arch/mips/alchemy/common/setup.c | 3 +-- arch/mips/include/asm/dma-coherence.h | 24 arch/mips

MIPS noncoherent DMA cleanups v2

2021-02-10 Thread Christoph Hellwig
Hi Thomas, this series cleans up some of the mips (maybe) noncoherent support. It also remove the need for the special header only provided by mips. Changes since v1: - fix a bisection issue due to a missing brace - simplify the parameter parsing given that it happens after plat_mem_init

Re: [PATCH 4/6] MIPS: refactor the maybe coherent DMA indicators

2021-02-10 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 02:12:37PM +0100, Thomas Bogendoerfer wrote: > > +#ifdef CONFIG_DMA_MAYBE_COHERENT > > +extern bool dma_default_coherent; > > static inline bool dev_is_dma_coherent(struct device *dev) > > { > > - return coherentio == IO_COHERENCE_ENABLED || > > - (coherentio

Re: [PATCH v2] nvme: Add 48-bit DMA address quirk for Amazon NVMe controllers

2021-02-09 Thread Christoph Hellwig
On Wed, Feb 10, 2021 at 01:39:42AM +0100, Filippo Sironi wrote: > Amazon NVMe controllers do not support 64-bit DMA addresses; they are > limited to 48-bit DMA addresses. Let's add a quirk to ensure that we > make use of 48-bit DMA addresses to avoid misbehavior. This should probably say some,

Re: [PATCH v2 01/14] x86/fault: Fix AMD erratum #91 errata fixup for user code

2021-02-09 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: add a new dma_alloc_noncontiguous API v2

2021-02-09 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 03:46:13PM +0100, Ricardo Ribalda wrote: > Hi Christoph > > I have tested it in both arm and x86, since there are not significant > changes with the previous version I did not do a performance test. I'll take this as a Tested-by.

Re: linux-next: build failure after merge of the modules tree

2021-02-09 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 04:16:20PM +0100, Jessica Yu wrote: > Hmm, these errors don't look like it's related to that particular commit. I > was > able to reproduce these weird autoksym errors even without any modules-next > patches applied, and on a clean v5.11-rc7 tree. I OTOH can't reproduce

Re: DMA direct mapping fix for 5.4 and earlier stable branches

2021-02-09 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 12:45:11PM +, Robin Murphy wrote: > It's not a bug, it's a fundamental design failure. dma_get_sgtable() has > only ever sort-of-worked for DMA buffers that come from CMA or regular page > allocations. In particular, a "no-map" DMA pool is not backed by kernel >

Re: DMA direct mapping fix for 5.4 and earlier stable branches

2021-02-09 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 10:23:12AM +0100, Greg KH wrote: > > From the view point of ZeroCopy using DMABUF, is 5.4 not > > mature enough, and is 5.10 enough mature ? > > This is the most important point for judging migration. > > How do you judge "mature"? > > And again, if a feature isn't

Re: [PATCH 5/7] fsdax: Dedup file range to use a compare function

2021-02-09 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 05:15:13PM +0800, Ruan Shiyang wrote: > The dax dedupe comparison need the iomap_ops pointer as argument, so my > understanding is that we don't modify the argument list of > generic_remap_file_range_prep(), but move its code into > __generic_remap_file_range_prep()

Re: [PATCH 1/2] quota: Add mountpath based quota support

2021-02-09 Thread Christoph Hellwig
On Thu, Feb 04, 2021 at 01:53:50PM +0100, Jan Kara wrote: > Now quota data stored in a normal file is a setup we try to deprecate > anyway so another option is to just leave quotactl_path() only for those > setups where quota metadata is managed by the filesystem so we don't need > to pass quota

Re: [PATCH v4 01/14] swiotlb: Remove external access to io_tlb_start

2021-02-09 Thread Christoph Hellwig
On Tue, Feb 09, 2021 at 02:21:18PM +0800, Claire Chang wrote: > This can be dropped if Christoph's swiotlb cleanups are landed. > https://lore.kernel.org/linux-iommu/20210207160934.2955931-1-...@lst.de/T/#m7124f29b6076d462101fcff6433295157621da09 > FYI, I've also started looking into additional

Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path

2021-02-09 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 12:14:49PM -0500, Konrad Rzeszutek Wilk wrote: > > ring buffer or whatever because you know I/O will be copied anyway > > and none of all the hard work higher layers do to make the I/O suitable > > for a normal device apply. > > I lost you here. Sorry, are you saying have

Re: add a new dma_alloc_noncontiguous API v2

2021-02-09 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 08:33:50PM +0900, Tomasz Figa wrote: > Sorry for the delay. The whole series looks very good to me. Thanks a lot. > > Reviewed-by: Tomasz Figa Thanks. Ricardo, do the uvcvideo changes look good to you? I'd like to queue the series up for this merge window.

Re: [PATCH 0/2] KVM: do not assume PTE is writable after follow_pfn

2021-02-09 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 07:26:25PM -0400, Jason Gunthorpe wrote: > > > page_mkclean() has some technique to make the notifier have the right > > > size without becoming entangled in the PTL locks.. > > > > Right. I guess it's because dax doesn't have "struct page*" on the > > back, so it > > It

Re: [PATCH 1/2] mm: provide a sane PTE walking API for modules

2021-02-09 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 07:18:56PM +0100, Paolo Bonzini wrote: > Fair enough. I would expect that pretty much everyone using follow_pfn will > at least want to switch to this one (as it's less bad and not impossible to > use correctly), but I'll squash this in: Daniel looked into them, so he

Re: [PATCH v2 12/12] arm64: kasan: export MTE symbols for KASAN tests

2021-02-08 Thread Christoph Hellwig
On Fri, Feb 05, 2021 at 04:39:13PM +0100, Andrey Konovalov wrote: > Export mte_enable_kernel_sync() and mte_set_report_once() to fix: > > ERROR: modpost: "mte_enable_kernel_sync" [lib/test_kasan.ko] undefined! > ERROR: modpost: "mte_set_report_once" [lib/test_kasan.ko] undefined! Please put this

Re: [PATCH] kbuild: simplify access to the kernel's version

2021-02-08 Thread Christoph Hellwig
On Sun, Feb 07, 2021 at 11:13:52AM -0500, Sasha Levin wrote: > + (u8)(LINUX_VERSION_MAJOR), (u8)(LINUX_VERSION_PATCHLEVEL), > + (u16)(LINUX_VERSION_SUBLEVEL)); No need for the casts and braces. Otherwise this looks good, but please also kill off KERNEL_VERSION and

Re: [PATCH 1/2] mm: provide a sane PTE walking API for modules

2021-02-08 Thread Christoph Hellwig
> +int follow_invalidate_pte(struct mm_struct *mm, unsigned long address, > + struct mmu_notifier_range *range, pte_t **ptepp, > pmd_t **pmdpp, > + spinlock_t **ptlp); This adds a very pointless overy long line. > +/** > + * follow_pte - look up PTE

Re: [PATCH 5/6] driver core: lift dma_default_coherent into common code

2021-02-08 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 04:57:33PM +0100, Maciej W. Rozycki wrote: > > diff --git a/arch/mips/mti-malta/malta-setup.c > > b/arch/mips/mti-malta/malta-setup.c > > index e98cc977a735b2..f8c9663e7faa10 100644 > > --- a/arch/mips/mti-malta/malta-setup.c > > +++ b/arch/mips/mti-malta/malta-setup.c > >

Re: [PATCH 6/7] fs/xfs: Handle CoW for fsdax write() path

2021-02-08 Thread Christoph Hellwig
> --- a/fs/xfs/xfs_bmap_util.c > +++ b/fs/xfs/xfs_bmap_util.c > @@ -977,10 +977,14 @@ xfs_free_file_space( > if (offset + len > XFS_ISIZE(ip)) > len = XFS_ISIZE(ip) - offset; > error = iomap_zero_range(VFS_I(ip), offset, len, NULL, > -

Re: [PATCH 5/7] fsdax: Dedup file range to use a compare function

2021-02-08 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 01:09:22AM +0800, Shiyang Ruan wrote: > With dax we cannot deal with readpage() etc. So, we create a > funciton callback to perform the file data comparison and pass s/funciton/function/g > +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) This should use the existing min or

Re: [PATCH 4/7] fsdax: Replace mmap entry in case of CoW

2021-02-08 Thread Christoph Hellwig
> static void *dax_insert_entry(struct xa_state *xas, > struct address_space *mapping, struct vm_fault *vmf, > - void *entry, pfn_t pfn, unsigned long flags, bool dirty) > + void *entry, pfn_t pfn, unsigned long flags, bool insert_flags) > { > void

Re: [PATCH 3/7] fsdax: Copy data before write

2021-02-08 Thread Christoph Hellwig
> switch (iomap.type) { > case IOMAP_MAPPED: > +cow: > if (iomap.flags & IOMAP_F_NEW) { > count_vm_event(PGMAJFAULT); > count_memcg_event_mm(vma->vm_mm, PGMAJFAULT); > major = VM_FAULT_MAJOR; >

Re: [PATCH 2/7] fsdax: Introduce dax_copy_edges() for CoW

2021-02-08 Thread Christoph Hellwig
On Mon, Feb 08, 2021 at 01:09:19AM +0800, Shiyang Ruan wrote: > dax_copy_edges() is a helper functions performs a copy from one part of > the device to another for data not page aligned. The function looks good to me, but adding a static function without a user is not very bisection friendly.

Re: [PATCH 1/7] fsdax: Output address in dax_iomap_pfn() and rename it

2021-02-08 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

[PATCH 3/6] MIPS: move the {no,}nocoherentio options to the malta setup code

2021-02-08 Thread Christoph Hellwig
an effect for alchemy. Signed-off-by: Christoph Hellwig --- arch/mips/kernel/setup.c | 16 arch/mips/mti-malta/malta-setup.c | 16 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index

[PATCH 6/6] MIPS: remove CONFIG_DMA_PERDEV_COHERENT

2021-02-08 Thread Christoph Hellwig
Just select DMA_NONCOHERENT and ARCH_HAS_SETUP_DMA_OPS from the MIPS_GENERIC platform instead. Signed-off-by: Christoph Hellwig --- arch/mips/Kconfig | 8 ++-- arch/mips/mm/dma-noncoherent.c | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/arch/mips

[PATCH 1/6] MIPS/malta: simplify plat_setup_iocoherency

2021-02-08 Thread Christoph Hellwig
Merge plat_enable_iocoherency into plat_setup_iocoherency to simplify the code a bit. Signed-off-by: Christoph Hellwig --- arch/mips/mti-malta/malta-setup.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti

[PATCH 5/6] driver core: lift dma_default_coherent into common code

2021-02-08 Thread Christoph Hellwig
the ->dma_coherent field to this default the amount of arch hooks required for this behavior can be greatly reduced. Signed-off-by: Christoph Hellwig --- arch/mips/Kconfig | 9 ++--- arch/mips/alchemy/common/setup.c | 2 +- arch/mips/include/asm/dma-coherence.h |

[PATCH 4/6] MIPS: refactor the maybe coherent DMA indicators

2021-02-08 Thread Christoph Hellwig
Replace the global coherentio enum, and the hw_coherentio (fake) boolean variables with a single boolean dma_default_coherent flag. Only the malta setup code needs two additional local boolean variables to preserved the command line overrides. Signed-off-by: Christoph Hellwig --- arch/mips

[PATCH 2/6] MIPS/alchemy: factor out the DMA coherent setup

2021-02-08 Thread Christoph Hellwig
Factor out a alchemy_dma_coherent helper that determines if the platform is DMA coherent. Also stop initializing the hw_coherentio variable, given that is only ever set to a non-zero value by the malta setup code. Signed-off-by: Christoph Hellwig --- arch/mips/alchemy/common/setup.c | 33

MIPS noncoherent DMA cleanups

2021-02-08 Thread Christoph Hellwig
Hi Thomas, this series cleans up some of the mips (maybe) noncoherent support. It also remove the need for the special header only provided by mips.

Re: add a new dma_alloc_noncontiguous API v2

2021-02-07 Thread Christoph Hellwig
Any comments? On Tue, Feb 02, 2021 at 10:51:03AM +0100, Christoph Hellwig wrote: > Hi all, > > this series adds the new noncontiguous DMA allocation API requested by > various media driver maintainers. > > Changes since v1: > - document that fl

[GIT PULL] dma-mapping fix for 5.11

2021-02-07 Thread Christoph Hellwig
The following changes since commit dd86e7fa07a3ec33c92c957ea7b642c4702516a0: Merge tag 'pci-v5.11-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci (2021-02-04 16:05:40 -0800) are available in the Git repository at: git://git.infradead.org/users/hch/dma-mapping.git

Re: [PATCH RFC v1 5/6] xen-swiotlb: convert variables to arrays

2021-02-07 Thread Christoph Hellwig
On Thu, Feb 04, 2021 at 09:40:23AM +0100, Christoph Hellwig wrote: > So one thing that has been on my mind for a while: I'd really like > to kill the separate dma ops in Xen swiotlb. If we compare xen-swiotlb > to swiotlb the main difference seems to be: > > - additional reason

Re: [PATCH v2] dma-mapping: benchmark: pretend DMA is transmitting

2021-02-05 Thread Christoph Hellwig
On Fri, Feb 05, 2021 at 10:52:37AM +, Song Bao Hua (Barry Song) wrote: > I assume there is no need to keep the same size with 5.11-rc, so > could change the struct to: > > struct map_benchmark { > __u64 avg_map_100ns; /* average map latency in 100ns */ > __u64 map_stddev; /*

Re: [PATCH] mmc: block: use REQ_HIPRI flag to complete request directly in own complete workqueue

2021-02-05 Thread Christoph Hellwig
On Fri, Feb 05, 2021 at 03:24:06PM +0100, Ulf Hansson wrote: > On Thu, 21 Jan 2021 at 09:13, Liu Xiang wrote: > > > > After commit "40d09b53bfc557af7481b9d80f060a7ac9c7d314", request is > > completed in softirq. This may cause the system to suffer bad preemptoff > > time. > > The mmc driver has

Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path

2021-02-05 Thread Christoph Hellwig
On Wed, Feb 03, 2021 at 02:36:38PM -0500, Konrad Rzeszutek Wilk wrote: > > So what? If you guys want to provide a new capability you'll have to do > > work. And designing a new protocol based around the fact that the > > hardware/hypervisor is not trusted and a copy is always required makes > >

Re: [PATCH v3 1/2] dma-mapping: benchmark: use u8 for reserved field in uAPI structure

2021-02-05 Thread Christoph Hellwig
Thanks, applied.

Re: [PATCH v2] dma-mapping: benchmark: pretend DMA is transmitting

2021-02-05 Thread Christoph Hellwig
On Fri, Feb 05, 2021 at 10:32:26AM +, Song Bao Hua (Barry Song) wrote: > I can keep the struct size unchanged by changing the struct to > > struct map_benchmark { > __u64 avg_map_100ns; /* average map latency in 100ns */ > __u64 map_stddev; /* standard deviation of map latency */

Re: [PATCH net-next v1 1/6] lan743x: boost performance on cpu archs w/o dma cache snooping

2021-02-05 Thread Christoph Hellwig
This is a pattern we've seen in a few other net driver, so we should be ok. It just is rather hairy and needs a good justification, which seems to be given here.

Re: [PATCH v2] dma-mapping: benchmark: pretend DMA is transmitting

2021-02-05 Thread Christoph Hellwig
On Fri, Feb 05, 2021 at 03:00:35PM +1300, Barry Song wrote: > + __u32 dma_trans_ns; /* time for DMA transmission in ns */ > __u64 expansion[10];/* For future use */ We need to keep the struct size, so the expansion field needs to shrink by the equivalent amount of data that is added

Re: [PATCH 2/2] block: avoid to drop & re-add partitions if partitions aren't changed

2021-02-04 Thread Christoph Hellwig
On Fri, Feb 05, 2021 at 10:17:08AM +0800, Ming Lei wrote: > block ioctl(BLKRRPART) always drops current partitions and adds > partitions again, even though there isn't any change in partitions table. > > ioctl(BLKRRPART) may be called by systemd-udevd and some disk utilities > frequently. Err,

Re: [PATCH RFC v1 5/6] xen-swiotlb: convert variables to arrays

2021-02-04 Thread Christoph Hellwig
So one thing that has been on my mind for a while: I'd really like to kill the separate dma ops in Xen swiotlb. If we compare xen-swiotlb to swiotlb the main difference seems to be: - additional reasons to bounce I/O vs the plain DMA capable - the possibility to do a hypercall on arm/arm64 -

Re: [PATCH 1/2] quota: Add mountpath based quota support

2021-02-03 Thread Christoph Hellwig
On Tue, Feb 02, 2021 at 07:02:41PM +0100, Jan Kara wrote: > Hum, let me think out loud. The path we pass to Q_QUOTAON is a path to > quota file - unless the filesystem stores quota in hidden files in which > case this argument is just ignored. You're right we could require that > specifically for

Re: [PATCH RFC v1 2/6] swiotlb: convert variables to arrays

2021-02-03 Thread Christoph Hellwig
On Wed, Feb 03, 2021 at 03:37:05PM -0800, Dongli Zhang wrote: > This patch converts several swiotlb related variables to arrays, in > order to maintain stat/status for different swiotlb buffers. Here are > variables involved: > > - io_tlb_start and io_tlb_end > - io_tlb_nslabs and io_tlb_used > -

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-03 Thread Christoph Hellwig
On Wed, Feb 03, 2021 at 01:23:31PM -0800, Dan Williams wrote: > > I'd prefer to keep the helpers for now as I do find them helpful, and so far > > nobody else who has touched the code has complained. If you feel strongly, I > > will change it. > > After seeing the options, I think I'd prefer to

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-03 Thread Christoph Hellwig
On Tue, Feb 02, 2021 at 10:24:18AM -0800, Ben Widawsky wrote: > > > + /* Cap 4000h - CXL_CAP_CAP_ID_MEMDEV */ > > > + struct { > > > + void __iomem *regs; > > > + } mem; > > > > This style looks massively obsfucated. For one the comments look like > > absolute gibberish, but also what is

Re: [PATCH 02/14] cxl/mem: Map memory device registers

2021-02-03 Thread Christoph Hellwig
On Tue, Feb 02, 2021 at 10:31:51AM -0800, Ben Widawsky wrote: > > > + if (reg_type == CXL_REGLOC_RBI_MEMDEV) { > > > + rc = 0; > > > + cxlm = cxl_mem_create(pdev, reg_lo, reg_hi); > > > + if (!cxlm) > > > + rc =

Re: [PATCH] nvme: convert sysfs sprintf/snprintf family to sysfs_emit

2021-02-03 Thread Christoph Hellwig
Thanks, applied to nvme-5.12.

Re: [PATCH V2 3/3] Adding device_dma_parameters->offset_preserve_mask to NVMe driver.

2021-02-03 Thread Christoph Hellwig
Please try with this extra patch: --- >From 212764c3c15ce859e6f55d2146f450ea4ca6fdb9 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 3 Feb 2021 14:27:13 +0100 Subject: nvme-pci: fix 2nd PRP setup in nvme_setup_prp_simple Use the dma address instead of the bio_vec off

Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path

2021-02-03 Thread Christoph Hellwig
On Mon, Jan 18, 2021 at 12:44:58PM +0100, Martin Radev wrote: > Your comment makes sense but then that would require the cooperation > of these vendors and the cloud providers to agree on something meaningful. > I am also not sure whether the end result would be better than hardening > this

Re: [PATCH] nvme: Add 48-bit DMA address quirk

2021-02-03 Thread Christoph Hellwig
On Wed, Feb 03, 2021 at 12:22:31PM +0100, Filippo Sironi wrote: > To avoid issues, it is easier to apply the quirk to all Amazon NVMe > controllers for now till the new lines of controllers with the fix comes > out. At that point, we'll be able to restrict the application to the known > bad

Re: [PATCH] nvme: Add 48-bit DMA address quirk

2021-02-03 Thread Christoph Hellwig
On Wed, Feb 03, 2021 at 12:12:31PM +0100, Filippo Sironi wrote: > I don't disagree on the first part of your sentence, this is a big > oversight. But it is not what your commit log suggests. > On the other hand, those controllers are out there and are in use by a lot > of customers. We can

Re: [PATCH 02/13] drm: remove drm_fb_helper_modinit

2021-02-03 Thread Christoph Hellwig
On Wed, Feb 03, 2021 at 11:34:50AM +0100, Daniel Vetter wrote: > On Thu, Jan 28, 2021 at 07:14:10PM +0100, Christoph Hellwig wrote: > > drm_fb_helper_modinit has a lot of boilerplate for what is not very > > simple functionality. Just open code it in the only caller using

Re: [PATCH] nvme: Add 48-bit DMA address quirk

2021-02-03 Thread Christoph Hellwig
On Wed, Feb 03, 2021 at 10:43:38AM +0100, Filippo Sironi wrote: > Certain NVMe controllers don't support 64-bit DMA addresses. Instead, > they are limited to 48-bit DMA addresses. Let's add a quirk to use them > properly. WTF? This is such a grave NVMe spec compiance bug that I do not think we

Re: [PATCH 10/13] module: pass struct find_symbol_args to find_symbol

2021-02-03 Thread Christoph Hellwig
FYI, this is the updated version: --- >From 664ca3378deac7530fe8fc15fe73d583ddf2 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 20 Jan 2021 14:58:27 +0100 Subject: module: pass struct find_symbol_args to find_symbol Simplify the calling convention by pass

Re: [PATCH 0/3] iommu/vt-d: Add support for ACPI/SATC table

2021-02-03 Thread Christoph Hellwig
On Tue, Feb 02, 2021 at 12:40:54PM +0800, Lu Baolu wrote: > Intel platform VT-d (v3.2) comes with a new type of DMAR subtable > SATC. The SATC table includes a list of SoC integrated devices > that require SATC. OS software can use this table to enable ATS > only for the devices in the list. This

Re: [PATCH 8/9] vfio/pci: use x86 naming instead of igd

2021-02-02 Thread Christoph Hellwig
On Tue, Feb 02, 2021 at 02:50:17PM -0400, Jason Gunthorpe wrote: > For uAPI compatability vfio_pci.ko would need some > request_module()/symbol_get() trick to pass control over to the device > specific module. Err, don't go there. Please do the DRIVER_EXPLICIT_BIND_ONLY thing first, which avoids

Re: [PATCH 06/14] cxl/mem: Add basic IOCTL interface

2021-02-02 Thread Christoph Hellwig
> +#if defined(__cplusplus) > +extern "C" { > +#endif This has no business in a kernel header.

Re: [PATCH 05/14] cxl/mem: Register CXL memX devices

2021-02-02 Thread Christoph Hellwig
> diff --git a/drivers/base/core.c b/drivers/base/core.c > index 25e08e5f40bd..33432a4cbe23 100644 > --- a/drivers/base/core.c > +++ b/drivers/base/core.c > @@ -3179,6 +3179,20 @@ struct device *get_device(struct device *dev) > } > EXPORT_SYMBOL_GPL(get_device); > > +/** > + *

<    1   2   3   4   5   6   7   8   9   10   >