Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-08 Thread Christoph Hellwig
On Sat, Dec 08, 2018 at 12:47:30PM -0500, Jerome Glisse wrote: > Most of the user of GUP are well behave (everything under driver/gpu and > so is mellanox driver and many other) ie they abide by mmu notifier > invalidation call backs. They are a handfull of device driver that thought > they could

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-08 Thread Christoph Hellwig
On Sat, Dec 08, 2018 at 10:09:26AM -0800, Dan Williams wrote: > Another fix that may put pressure 'struct page' is resolving the > untenable situation of dax being incompatible with reflink, i.e. > reflink currently requires page-cache pages. Dave has talked about > silently establishing

Re: use generic DMA mapping code in powerpc V4

2018-12-08 Thread Christoph Hellwig
On Sun, Dec 02, 2018 at 05:11:02PM +1100, Benjamin Herrenschmidt wrote: > Talking of which ... Christoph, not sure if we can do something about > this at the DMA API level or keep hacks but some adapters such as the > nVidia GPUs have a HW hack we can use to work around their limitations > in that

Re: [PATCH 1/2] mm: introduce put_user_page*(), placeholder versions

2018-12-08 Thread Christoph Hellwig
On Sat, Dec 08, 2018 at 11:33:53AM -0500, Jerome Glisse wrote: > Patchset to use HMM inside nouveau have already been posted, some > of the bits have already made upstream and more are line up for > next merge window. Even with that it is a relative fringe feature compared to making something

Re: [PATCH v2 3/8] dma-debug: Refactor dma_debug_entry allocation

2018-12-06 Thread Christoph Hellwig
On Thu, Dec 06, 2018 at 06:10:47PM +, Robin Murphy wrote: > AFAICS the tmp list wasn't about locking as much as meaning that if > kzalloc() failed at any point, we can free the partial allocation and back > out without disturbing free_entries at all - that still makes sense to me > up until

Re: [PATCH 2/3] kbuild: generate asm-generic wrappers if mandatory headers are missing

2018-12-06 Thread Christoph Hellwig
On Wed, Dec 05, 2018 at 08:28:05PM +0900, Masahiro Yamada wrote: > Some time ago, Sam pointed out a certain degree of overwrap between > generic-y and mandatory-y. (https://lkml.org/lkml/2017/7/10/121) > > I a bit tweaked the meaning of mandatory-y; now it defines the minimum > set of ASM headers

Re: [PATCH 2/2] arch: switch the default on ARCH_HAS_SG_CHAIN

2018-12-06 Thread Christoph Hellwig
I've picked this up for the dma-mapping for-next tree.

[PATCH 1/5] swiotlb: remove SWIOTLB_MAP_ERROR

2018-12-04 Thread Christoph Hellwig
We can use DMA_MAPPING_ERROR instead, which already maps to the same value. Signed-off-by: Christoph Hellwig --- drivers/xen/swiotlb-xen.c | 4 ++-- include/linux/swiotlb.h | 3 --- kernel/dma/swiotlb.c | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/xen

[PATCH 3/5] dma-direct: improve addressability error reporting

2018-12-04 Thread Christoph Hellwig
in a helper. Signed-off-by: Christoph Hellwig --- kernel/dma/direct.c | 36 +++- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c index 308f88a750c8..edb24f94ea1e 100644 --- a/kernel/dma/direct.c +++ b/kernel

[PATCH 5/5] dma-direct: merge swiotlb_dma_ops into the dma_direct code

2018-12-04 Thread Christoph Hellwig
buffering functions and thus share the guts of the mapping implementation. This also simplified the dma-mapping setup on a few architectures where we don't have to differenciate which implementation to use. Signed-off-by: Christoph Hellwig --- arch/arm64/mm/dma-mapping.c | 2 +- arch

merge swiotlb support into dma_direct_ops

2018-12-04 Thread Christoph Hellwig
Hi Konrad and others, can you review this series? It merges the swiotlb support into the DMA direct ops so that we don't have to duplicate the dma mapping logic in multiple places. Note that this is based on the dma_mapping_error series for which I'd still like to collect a few more reviews, so

Re: [PATCH v3, RFC] iommu/io-pgtable-arm-v7s: Use page_frag to request DMA32 memory

2018-12-04 Thread Christoph Hellwig
On Tue, Dec 04, 2018 at 04:23:00PM +0800, Nicolas Boichat wrote: > IOMMUs using ARMv7 short-descriptor format require page tables > (level 1 and 2) to be allocated within the first 4GB of RAM, even > on 64-bit systems. > > For level 1/2 tables, ensure GFP_DMA32 is used if CONFIG_ZONE_DMA32 > is

Re: [PATCH] dma-debug: Kconfig for PREALLOC_DMA_DEBUG_ENTRIES

2018-12-03 Thread Christoph Hellwig
On Mon, Dec 03, 2018 at 11:56:11AM +, John Garry wrote: > On 01/12/2018 16:36, Christoph Hellwig wrote: >> On Fri, Nov 30, 2018 at 07:39:50PM +, Robin Murphy wrote: >>> I was assuming the point was to also add something like >>> >>> default 131072 i

Re: XFS patches for stable

2018-12-02 Thread Christoph Hellwig
As someone who has done xfs stable backports for a while I really don't think the autoselection is helpful at all. Someone who is vaguely familiar with the code needs to manually select the commits and QA them, which takes a fair amount of time, but just needs some manual help if it should work

Re: [PATCH v2] fs: fix lost error code in dio_complete

2018-11-30 Thread Christoph Hellwig
Al, Jens, can someone pick this up, please? On Fri, Nov 30, 2018 at 10:02:22AM +0100, Maximilian Heyne wrote: > On 11/8/18 7:58 PM, Maximilian Heyne wrote: >> commit e259221763a40403d5bb232209998e8c45804ab8 ("fs: simplify the >> generic_write_sync prototype") reworked callers of

Re: [PATCH 04/13] blkcg: introduce common blkg association logic

2018-11-30 Thread Christoph Hellwig
> EXPORT_SYMBOL_GPL(bio_associate_blkcg); > > /** > - * bio_associate_blkg - associate a bio with the a blkg > + * bio_has_queue - required check for blkg association > + * @bio: target bio > + * > + * A blkg represents the relationship between a blkcg and a request_queue. > + * If there is no

Re: [PATCH v3 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg*

2018-11-29 Thread Christoph Hellwig
On Thu, Nov 29, 2018 at 09:24:17AM -0800, Tomasz Figa wrote: > Whether the cache maintenance operation needs to actually do anything > or not is a function of `dev`. We can have some devices that are > coherent with CPU caches, and some that are not, on the same system. Yes, but that part is not

Re: [LKP] [block] 9d037ad707: BUG:unable_to_handle_kernel

2018-11-29 Thread Christoph Hellwig
On Thu, Nov 29, 2018 at 05:20:31PM +0800, kernel test robot wrote: > FYI, we noticed the following commit (built with gcc-7): > > commit: 9d037ad707ed6069fbea4e38e6ee37e027b13f1d ("block: remove > req->timeout_list") > https://git.kernel.org/cgit/linux/kernel/git/axboe/linux-block.git mq-perf

Re: use generic DMA mapping code in powerpc V4

2018-11-29 Thread Christoph Hellwig
On Wed, Nov 28, 2018 at 10:05:19PM +1100, Michael Ellerman wrote: > Is the plan that you take these via the dma-mapping tree or that they go > via powerpc? In principle either way is fine with me. If it goes through the powerpc tree we might run into a few minor conflicts with the dma-mapping

Re: [PATCH v6 3/6] m68k: coldfire: Add clk_get_optional() function

2018-11-29 Thread Christoph Hellwig
On Thu, Nov 29, 2018 at 09:54:37PM +1000, Greg Ungerer wrote: > Hi Phil, > > On 17/11/18 12:59 am, Phil Edworthy wrote: > > clk_get_optional() returns NULL if not found instead of -ENOENT, > > otherwise the behaviour is the same as clk_get(). > > > > Signed-off-by: Phil Edworthy > > Acked-by:

Re: [PATCH v3 1/1] drm: msm: Replace dma_map_sg with dma_sync_sg*

2018-11-29 Thread Christoph Hellwig
On Thu, Nov 29, 2018 at 07:33:15PM +0530, Vivek Gautam wrote: > dma_map_sg() expects a DMA domain. However, the drm devices > have been traditionally using unmanaged iommu domain which > is non-dma type. Using dma mapping APIs with that domain is bad. > > Replace dma_map_sg() calls with

Re: [PATCH] sis5513: fix potential use after free

2018-11-27 Thread Christoph Hellwig
condition check. > > Signed-off-by: Pan Bian Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH] ata: read ->revision before dropping pci_device reference

2018-11-27 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH] nios2: remove unneeded HAS_DMA define

2018-11-26 Thread Christoph Hellwig
On Mon, Nov 26, 2018 at 04:42:10PM +0900, Masahiro Yamada wrote: > kernel/dma/Kconfig globally defines HAS_DMA as follows: > > config HAS_DMA > bool > depends on !NO_DMA > default y > > Signed-off-by: Masahiro Yamada Looks good, thanks!

Re: [PATCH] pcmcia: remove per-arch PCMCIA config entry

2018-11-26 Thread Christoph Hellwig
> > I will queue this up to my kbuild tree > along with Christoph's clean-up patch set. Thanks a lot, not sure how I missed those. Reviewed-by: Christoph Hellwig

Re: linux-next: build warning after merge of the btrfs-kdave tree

2018-11-25 Thread Christoph Hellwig
On Mon, Nov 26, 2018 at 11:06:29AM +1100, Stephen Rothwell wrote: > Introduced by commit > > cf8cddd38bab3 ("btrfs: don't abuse REQ_OP_* flags for btrfs_map_block") > > exposed by my new use of -Wimplicit-fallthrough > > I am not sure why this has only turned up now (as opposed to earlier >

Re: [PATCH] s390: Remove obsolete bust_spinlock() implementation

2018-11-22 Thread Christoph Hellwig
Please remove the weak attribute from the generic implementation as well now that the last override is gone.

[PATCH 13/24] alpha: remove the mapping_error dma_map_ops method

2018-11-22 Thread Christoph Hellwig
Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig --- arch/alpha/kernel/pci_iommu.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/alpha/kernel/pci_iommu.c

[PATCH 23/24] xen-swiotlb: remove the mapping_error dma_map_ops method

2018-11-22 Thread Christoph Hellwig
Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig --- drivers/xen/swiotlb-xen.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers

[PATCH 21/24] iommu/vt-d: remove the mapping_error dma_map_ops method

2018-11-22 Thread Christoph Hellwig
Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let the core dma-mapping code handle the rest. Signed-off-by: Christoph Hellwig --- drivers/iommu/intel-iommu.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b

Re: [PATCH v2 0/3] iommu/io-pgtable-arm-v7s: Use DMA32 zone for page tables

2018-11-22 Thread Christoph Hellwig
On Wed, Nov 21, 2018 at 10:26:26PM +, Robin Murphy wrote: > TBH, if this DMA32 stuff is going to be contentious we could possibly just > rip out the offending kmem_cache - it seemed like good practice for the > use-case, but provided kzalloc(SZ_1K, gfp | GFP_DMA32) can be relied upon to > give

Re: [PATCH 2/6] lib/lzo: enable 64-bit CTZ on Arm

2018-11-21 Thread Christoph Hellwig
> #define LZO_USE_CTZ321 > #elif defined(__i386__) || defined(__powerpc__) > #define LZO_USE_CTZ321 > -#elif defined(__arm__) && (__LINUX_ARM_ARCH__ >= 5) > +#elif defined(__arm__) > +#if (__LINUX_ARM_ARCH__ >= 5) > #define LZO_USE_CTZ321 > #endif > +#if

Re: [PATCH V11 03/19] block: introduce bio_for_each_bvec()

2018-11-21 Thread Christoph Hellwig
On Wed, Nov 21, 2018 at 05:10:25PM +0100, Christoph Hellwig wrote: > No - I think we can always use the code without any segment in > bvec_iter_advance. Because bvec_iter_advance only operates on the > iteractor, the generation of an actual single-page or multi-page > bvec is left t

Re: [PATCH V10 09/19] block: introduce bio_bvecs()

2018-11-20 Thread Christoph Hellwig
On Mon, Nov 19, 2018 at 04:49:27PM -0800, Sagi Grimberg wrote: > >> The only user in your final tree seems to be the loop driver, and >> even that one only uses the helper for read/write bios. >> >> I think something like this would be much simpler in the end: > > The recently submitted nvme-tcp

Re: [PATCH 06/10] swiotlb: use swiotlb_map_page in swiotlb_map_sg_attrs

2018-11-20 Thread Christoph Hellwig
On Mon, Nov 19, 2018 at 03:22:13PM -0800, John Stultz wrote: > > + sg->dma_address = dma_addr; > > sg_dma_len(sg) = sg->length; > > } > > I know Robin has already replied with more detailed info, but just to > close the loop as I'm finally home, applying this

Re: [PATCH 2/2] arch: switch the default on ARCH_HAS_SG_CHAIN

2018-11-19 Thread Christoph Hellwig
On Fri, Nov 16, 2018 at 08:52:14AM -0800, Palmer Dabbelt wrote: > As far as I can tell, it looks like m68k, mips, and powerpc mention an > IOMMU in their ports, don't set ARCH_HAS_SG_CHAIN, and with this patch set > won't set ARCH_NO_SG_CHAIN. m68k has no iommu, and not operations that operate

Re: [RFC] remove the ->mapping_error method from dma_map_ops

2018-11-19 Thread Christoph Hellwig
On Fri, Nov 09, 2018 at 03:12:34PM -0800, David Miller wrote: > But patch #2 on the other hand, not so much. > > I hate seeing values returned by reference, it adds cost especially > on cpus where all argments and return values fit in registers (we end > up forcing a stack slot and memory

Re: [PATCH 1/2] dma-mapping: remove ->mapping_error

2018-11-19 Thread Christoph Hellwig
On Fri, Nov 09, 2018 at 02:41:18PM +, Robin Murphy wrote: >> - >> #define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28)) >> #define LOOP_TIMEOUT 10 >> @@ -2339,7 +2337,7 @@ static dma_addr_t __map_single(struct device *dev, >> paddr &= PAGE_MASK; >> address =

Re: nvme: allow ANA support to be independent of native multipathing

2018-11-19 Thread Christoph Hellwig
On Fri, Nov 16, 2018 at 02:28:02PM -0500, Mike Snitzer wrote: > You rejected the idea of allowing fine-grained control over whether > native NVMe multipathing is enabled or not on a per-namespace basis. > All we have is the coarse-grained nvme_core.multipath=N knob. Now > you're forecasting

Re: [PATCH V10 08/19] btrfs: move bio_pages_all() to btrfs

2018-11-19 Thread Christoph Hellwig
On Mon, Nov 19, 2018 at 04:19:24PM +0800, Ming Lei wrote: > On Fri, Nov 16, 2018 at 02:38:45PM +0100, Christoph Hellwig wrote: > > On Thu, Nov 15, 2018 at 04:52:55PM +0800, Ming Lei wrote: > > > BTRFS is the only user of this helper, so move this helper into > > >

Re: [PATCH 1/4] PCI / ACPI: Identify external PCI devices

2018-11-16 Thread Christoph Hellwig
On Thu, Nov 15, 2018 at 09:10:26PM +0200, Mika Westerberg wrote: > FireWire is kind of different but there are connectors such as > ExpressCard and NVMe (over U.2 connector) which carry PCIe and are > relatively easy to access without need for a screwdriver. AFAIK some > eGPUs are also using some

Re: [PATCH v2 1/2] pci: prevent sk hynix nvme from entering D3

2018-11-15 Thread Christoph Hellwig
On Thu, Nov 15, 2018 at 11:30:15AM -0600, Bjorn Helgaas wrote: > > But I guess you have to do this anyway just to add the vendor/device > ID to the driver, so maybe this isn't a big deal to you. If you can > do a quirk like this in the driver, it would be invisible to me and I > wouldn't care.

[PATCH 8/9] rapidio: consolidate RAPIDIO config entry in drivers/rapidio

2018-11-15 Thread Christoph Hellwig
for every architecture instead of a limited subset. Signed-off-by: Christoph Hellwig Acked-by: Thomas Gleixner --- arch/mips/Kconfig | 15 +-- arch/powerpc/Kconfig| 14 +- arch/powerpc/platforms/85xx/Kconfig | 8 arch/powerpc

[PATCH 7/9] pcmcia: allow PCMCIA support independent of the architecture

2018-11-15 Thread Christoph Hellwig
There is nothing architecture specific in the PCMCIA core, so allow building it everywhere. The actual host controllers will depend on ISA, PCI or a specific SOC. Signed-off-by: Christoph Hellwig Acked-by: Dominik Brodowski Acked-by: Thomas Gleixner --- arch/alpha/Kconfig | 2 -- arch

[PATCH 4/9] PCI: consolidate PCI config entry in drivers/pci

2018-11-15 Thread Christoph Hellwig
There is no good reason to duplicate the PCI menu in every architecture. Instead provide a selectable HAVE_PCI symbol that indicates availability of PCI support, and a FORCE_PCI symbol to for PCI on and the handle the rest in drivers/pci. Signed-off-by: Christoph Hellwig Reviewed-by: Palmer

Re: [PATCH] xfs: Remove noinline from #define STATIC

2018-11-15 Thread Christoph Hellwig
On Tue, Nov 13, 2018 at 04:26:51PM +1100, Dave Chinner wrote: > That's just as bad as removing them all, if not worse. > > If you are writing new code or reworking existing code, then we'll > consider the usage of STATIC/static in the context of that work. > Otherwise, we leave it alone. > > It

Re: Re-run features-refresh.sh

2018-11-15 Thread Christoph Hellwig
FYI, we really should kill ARCH_SG_CHAIN in its current form. See my series here, which could use a review or two: https://lkml.org/lkml/2018/11/9/958

Re: [PATCH v3 3/3] MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur

2018-11-14 Thread Christoph Hellwig
ms. > + * > + * Copyright (c) 2018 Maciej W. Rozycki > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * as published by the Free Software Foundation; either version > + * 2 of the License, or (at your option) any later version. > + */ Ok, so you have the SPDX tag, but also the duplicate license text, which is what confused me earlier. This should just be: // SPDX-License-Identifier: GPL-2.0+ /* * DMA support for Broadcom SiByte platforms. * * Copyright (c) 2018 Maciej W. Rozycki */ With that looks good to me: Reviewed-by: Christoph Hellwig

Re: [PATCH v3 2/3] MIPS: SiByte: Enable ZONE_DMA32 for LittleSur

2018-11-14 Thread Christoph Hellwig
ZONE_DMA32 for LittleSur. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v3 1/3] MIPS: SiByte: Set 32-bit bus mask for BCM1250 PCI

2018-11-14 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [RFC PATCH 01/13] arm: Fix mutual exclusion in arch_gettimeoffset

2018-11-12 Thread Christoph Hellwig
On Mon, Nov 12, 2018 at 03:12:39PM +1100, Finn Thain wrote: > Implementations of arch_gettimeoffset are generally not re-entrant > and assume that interrupts have been disabled. Unfortunately this > pre-condition got broken in v2.6.32. > > Fixes: 5cfc8ee0bb51 ("ARM: convert arm to

Re: [PATCH -next] sysv: return 'err' instead of 0 in __sysv_write_inode

2018-11-10 Thread Christoph Hellwig
Looks fine: Reviewed-by: Christoph Hellwig Al, can you queue it up?

Re: [PATCH 2/4] irqchip: sifive-plic: More flexible plic_irq_toggle()

2018-11-09 Thread Christoph Hellwig
> - > struct plic_handler { > boolpresent; > - int ctxid; > void __iomem*hart_base; > raw_spinlock_t enable_lock; > void __iomem*enable_base; > }; > -static DEFINE_PER_CPU(struct plic_handler,

Re: [PATCH 1/4] irqchip: sifive-plic: Pre-compute context hart base and enable base

2018-11-09 Thread Christoph Hellwig
On Mon, Oct 22, 2018 at 05:15:14PM +0530, Anup Patel wrote: > This patch does following optimizations: > 1. Pre-compute hart base for each context handler > 2. Pre-compute enable base for each context handler Why? > 3. Have enable lock for each context handler instead > of global

Re: RFC: userspace exception fixups

2018-11-08 Thread Christoph Hellwig
On Thu, Nov 08, 2018 at 12:05:42PM -0800, Andy Lutomirski wrote: > This whole thing is a mess. I'm starting to think that the cleanest > solution would be to provide a way to just tell the kernel that > certain RIP values have exception fixups. The bay far cleanest solution would be to say that

Re: [PATCH] jffs2: implement mount option to configure endianness

2018-11-08 Thread Christoph Hellwig
On Wed, Nov 07, 2018 at 06:41:47PM +, Joakim Tjernlund wrote: > > Certainly not. I'm not sure which architectures do have Spectre V2 > > mitigations which make indirect branches expensive now... perhaps there is > > no intersection with the cases where we really care about JFFS2 being > >

Re: [PATCH v2] nvme: create 'paths' entries for hidden controllers

2018-11-08 Thread Christoph Hellwig
On Thu, Nov 01, 2018 at 08:29:55PM -0300, Thadeu Lima de Souza Cascardo wrote: > When using initramfs-tools with only the necessary dependencies to mount > the root filesystem, it will fail to include nvme drivers for a root on a > multipath nvme. That happens because the slaves relationship is

Re: [PATCH 1/2] pci: prevent sk hynix nvme from entering D3

2018-11-07 Thread Christoph Hellwig
On Tue, Nov 06, 2018 at 06:11:31PM +0800, AceLan Kao wrote: > Agree, this is not a good fix for Sk hynix nvme, so Dell is still pushing > Sk hynix to fix it from firmware. > But before the firmware is ready, this is still a issue that need to be fixed > in > kernel side, and the new firmware may

Re: [PATCH 2/2] MIPS: SiByte: Enable swiotlb for SWARM and BigSur

2018-11-06 Thread Christoph Hellwig
Do we really need a new source file just to call swiotlb_init? And if we do that file should have a SPDX header these days. Otherwise looks fine: Reviewed-by: Christoph Hellwig

Re: [PATCH 1/2] MIPS: SiByte: Set 32-bit bus mask for BCM1250 PCI

2018-11-06 Thread Christoph Hellwig
dev->bus->number > exclude->end))) { > + dev_dbg(>dev, "disabling DAC for device"); > + dev->dev.bus_dma_mask = DMA_BIT_MASK(32); > + } else { > + dev_dbg(>dev, "not disabling DAC for device"); > + } > + return 0; Hmm, these conditions look very hard to read to me. Wouldn't this have the same effect? if (exclude->set) return; if (dev->vendor == PCI_VENDOR_ID_SIBYTE && dev->device == PCI_DEVICE_ID_BCM1250_HT) { exclude->start = dev->subordinate->number; exclude->end = pci_bus_max_busnr(dev->subordinate); exclude->set = true; dev_dbg(>dev, "not disabling DAC for [bus %02x-%02x]", exclude->start, exclude->end); return; } if (dev->bus->number < exclude->start || dev->bus->number > exclude->end))) { dev_dbg(>dev, "disabling DAC for device"); dev->dev.bus_dma_mask = DMA_BIT_MASK(32); return; } dev_dbg(>dev, "not disabling DAC for device"); return 0; Otherwise this looks fine to me: Reviewed-by: Christoph Hellwig

Re: [PATCH 2/2] nvme: add quirk to not call disable function when suspending

2018-11-05 Thread Christoph Hellwig
On Tue, Nov 06, 2018 at 10:04:02AM +0800, AceLan Kao wrote: > Call nvme_dev_disable() function leads to the power consumption goes > up to 2.2 Watt during suspend-to-idle, and from SK hynix FE, they > suggest us to use its own APST feature to do the power management during > s2idle. > After D3 is

Re: [PATCH 1/2] pci: prevent sk hynix nvme from entering D3

2018-11-05 Thread Christoph Hellwig
On Tue, Nov 06, 2018 at 10:04:01AM +0800, AceLan Kao wrote: > It leads to the power consumption raises to 2.2W during s2idle, while > it consumes less than 1W during long idle if put SK hynix nvme to D3 > and then enter s2idle. > >From SK hynix FE, MS Windows doesn't put nvme to D3, and uses its

Re: [RFC 0/2] RISC-V: A proposal to add vendor-specific code

2018-11-05 Thread Christoph Hellwig
On Mon, Nov 05, 2018 at 02:51:33PM +0100, Arnd Bergmann wrote: > With the stricter policy you suggest, we'd loose the ability to support > some extensions that might be common: > > - an extension for user space that adds new registers that must be > saved and restored on a task switch, e.g.

Re: [RFC 0/2] RISC-V: A proposal to add vendor-specific code

2018-11-05 Thread Christoph Hellwig
On Mon, Nov 05, 2018 at 09:39:29PM +0200, Nick Kossifidis wrote: > a) By directly modifying your custom CSRs, it means that we will need > compiler support in order to compile a kernel with your code in it. This > will break CI systems and will introduce various issues on testing and > reviewing

Re: [REGRESSION] OCTEON MMC driver failure with v4.19

2018-11-05 Thread Christoph Hellwig
On Tue, Nov 06, 2018 at 12:06:32AM +0200, Aaro Koskinen wrote: > With the below change, the MMC card probe seems to with v4.19. But it > feels a bit hackish, don't you think... Is there some obvious simple > fix that I'm missing? Any comments? Please just use dma_coerce_mask_and_coherent in the

Re: [PATCH] x86/pci: Annotate 'pci_root_ops' with __ro_after_init

2018-11-05 Thread Christoph Hellwig
On Mon, Nov 05, 2018 at 12:17:35PM -0800, Zubin Mithra wrote: > When CONFIG_X86_INTEL_MID is set pci_root_ops is written to inside > intel_mid_pci_init(which is marked __init) and not modified after. This > makes pci_root_ops a suitable candidate for annotating as > __ro_after_init. Yikes.

Re: [RFC 0/2] RISC-V: A proposal to add vendor-specific code

2018-11-05 Thread Christoph Hellwig
On Mon, Nov 05, 2018 at 09:52:52AM +0100, Arnd Bergmann wrote: > > I fundamentally disagree with this… and think it should be the contrary. > > > > 1. The kernel shall support no vendor specific instructions whatsoever, > > period. > > I think what was meant above is > > 1. If a vendor extension

Re: [RFC 0/2] RISC-V: A proposal to add vendor-specific code

2018-11-04 Thread Christoph Hellwig
On Mon, Nov 05, 2018 at 02:58:07PM +0800, Vincent Chen wrote: > Many thanks for kinds of comments. I quickly synthesize the comments and > list them as below. > 1. The kernel image shall include all vendor-specific code. I fundamentally disagree with this… and think it should be the contrary. 1.

Re: [RFC 0/2] RISC-V: A proposal to add vendor-specific code

2018-10-31 Thread Christoph Hellwig
On Wed, Oct 31, 2018 at 04:46:10PM +0530, Anup Patel wrote: > I agree that we need a place for vendor-specific ISA extensions and > having vendor-specific directories is also good. The only sensible answer is that we should not allow vendor specific extensions in the kernel at all. We need to

Re: [PATCH] fs: fix lost error code in dio_complete

2018-10-30 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH 2/2] x86/ldt: Unmap PTEs for the slow before freeing LDT

2018-10-24 Thread Christoph Hellwig
The subject line does not parse..

[PATCH] parisc: remove the dead ccio-rm-dma driver

2018-10-22 Thread Christoph Hellwig
This driver has never been wired up due to the life of the Linux git tree, and has severely bitrotted. Signed-off-by: Christoph Hellwig --- drivers/parisc/Makefile | 3 - drivers/parisc/ccio-rm-dma.c | 202 --- 2 files changed, 205 deletions(-) delete

[tip:x86/urgent] x86/swiotlb: Enable swiotlb for > 4GiG RAM on 32-bit kernels

2018-10-18 Thread tip-bot for Christoph Hellwig
Commit-ID: 485734f3fc77c1eb77ffe138c027b9a4bf0178f3 Gitweb: https://git.kernel.org/tip/485734f3fc77c1eb77ffe138c027b9a4bf0178f3 Author: Christoph Hellwig AuthorDate: Sun, 14 Oct 2018 09:52:08 +0200 Committer: Ingo Molnar CommitDate: Fri, 19 Oct 2018 07:49:32 +0200 x86/swiotlb: Enable

[PATCH] mtd: rawnand: r852: use generic DMA API

2018-10-18 Thread Christoph Hellwig
Use the generic DMA API instead of the legacy PCI DMA API. Signed-off-by: Christoph Hellwig --- drivers/mtd/nand/raw/r852.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/mtd/nand/raw/r852.c b/drivers/mtd/nand/raw/r852.c index

Re: [PATCH] ata: add Buddha PATA controller driver

2018-10-18 Thread Christoph Hellwig
> +static int __init pata_buddha_init_one(void) > +{ > + struct zorro_dev *z = NULL; > + > + while ((z = zorro_find_device(ZORRO_WILDCARD, z))) { I'm not really an m68k expert, but shouldn't this implement a struct zorro_driver instead? (or maybe two of them as xsurf seems sufficiently

Re: [PATCH v2 1/2] mm: Add an F_SEAL_FS_WRITE seal to memfd

2018-10-17 Thread Christoph Hellwig
On Wed, Oct 17, 2018 at 08:44:01AM -0700, Daniel Colascione wrote: > > Even if no one changes these specific flags we still need a lock due > > to rmw cycles on the field. For example fadvise can set or clear > > FMODE_RANDOM. It seems to use file->f_lock for synchronization. > >

Re: [PATCH v2 1/2] mm: Add an F_SEAL_FS_WRITE seal to memfd

2018-10-17 Thread Christoph Hellwig
On Wed, Oct 17, 2018 at 03:39:58AM -0700, Joel Fernandes wrote: > > > This usecase cannot be implemented with the existing F_SEAL_WRITE seal. > > > To support the usecase, this patch adds a new F_SEAL_FS_WRITE seal which > > > prevents any future mmap and write syscalls from succeeding while > > >

Re: [PATCH v2 1/2] mm: Add an F_SEAL_FS_WRITE seal to memfd

2018-10-17 Thread Christoph Hellwig
On Tue, Oct 09, 2018 at 03:20:41PM -0700, Joel Fernandes (Google) wrote: > One of the main usecases Android has is the ability to create a region > and mmap it as writeable, then drop its protection for "future" writes > while keeping the existing already mmap'ed writeable-region active.

Re: rdma-core doesn't install driver.h, broke libibscif

2018-10-17 Thread Christoph Hellwig
On Mon, Oct 15, 2018 at 05:53:44PM +, Woodruff, Robert J wrote: > James Harvey wrote, > > >Short: Is libibscif dead, and should OS repositories remove it? > > Libibscif is for an old product, Intel's KNC, that is no longer sold and the > S/W is frozen. The open source libibscif is no

Re: [PATCH] xfs: Fix error code in 'xfs_ioc_getbmap()'

2018-10-17 Thread Christoph Hellwig
ed-off-by: Christophe JAILLET Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH 00/11] staging: gasket: fixes

2018-10-15 Thread Christoph Hellwig
On Sun, Oct 14, 2018 at 09:59:16PM -0700, Todd Poynor wrote: > From: Todd Poynor > > Various fixes for gasket/apex drivers. I still can't find any explanation in the staging tree or in your comments what gasket even is.

Re: [PATCH 1/2] LICENSES: Add note to CDDL-1.0 license that it should not be used

2018-10-15 Thread Christoph Hellwig
On Wed, Oct 10, 2018 at 03:23:07PM +0200, Thomas Gleixner wrote: > I'd rather replace the 'GPL-2.0' with something like '$GPL-COMPATIBLE-ID' > and say explicitely in the prosa text that CCDL can only be used with OR > and not with AND. Maybe we should take the whole thing to a higher level, and

[tip:x86/urgent] x86/swiotlb: Enable swiotlb for > 4GiG ram on 32-bit kernels

2018-10-15 Thread tip-bot for Christoph Hellwig
Commit-ID: 6f3bc8028570e4c326030e8795dbcd57c561b723 Gitweb: https://git.kernel.org/tip/6f3bc8028570e4c326030e8795dbcd57c561b723 Author: Christoph Hellwig AuthorDate: Sun, 14 Oct 2018 09:52:08 +0200 Committer: Thomas Gleixner CommitDate: Mon, 15 Oct 2018 10:55:03 +0200 x86/swiotlb

[PATCH] xtensa: remove ZONE_DMA

2018-10-14 Thread Christoph Hellwig
ZONE_DMA is intended for magic < 32-bit pools (usually ISA DMA), which isn't required on xtensa. Move all the non-highmem memory into ZONE_NORMAL instead to match other architectures. Signed-off-by: Christoph Hellwig --- arch/xtensa/Kconfig | 3 --- arch/xtensa/mm/init.c | 2 +- 2 fi

Re: [PATCH v2 3/6] esp_scsi: Grant disconnect privilege for untagged commands

2018-10-14 Thread Christoph Hellwig
> + *p++ = IDENTIFY(lp && (tp->flags & ESP_TGT_DISCONNECT), lun); I think lp should always be non-NULL here.

[tip:x86/urgent] x86/swiotlb: Enable swiotlb for > 4GiG ram on 32-bit kernels

2018-10-14 Thread tip-bot for Christoph Hellwig
Commit-ID: ab555321e4ddc7f6f17f6c80dfaad228883a8e7c Gitweb: https://git.kernel.org/tip/ab555321e4ddc7f6f17f6c80dfaad228883a8e7c Author: Christoph Hellwig AuthorDate: Sun, 14 Oct 2018 09:52:08 +0200 Committer: Thomas Gleixner CommitDate: Sun, 14 Oct 2018 11:11:23 +0200 x86/swiotlb

Re: [PATCH 4/6] mm: introduce page->dma_pinned_flags, _count

2018-10-13 Thread Christoph Hellwig
On Sat, Oct 13, 2018 at 12:34:12AM -0700, John Hubbard wrote: > In patch 6/6, pin_page_for_dma(), which is called at the end of > get_user_pages(), > unceremoniously rips the pages out of the LRU, as a prerequisite to using > either of the page->dma_pinned_* fields. > > The idea is that LRU is

Re: [PATCH 5/5] RISC-V: Implement sparsemem

2018-10-11 Thread Christoph Hellwig
> +/* > + * Log2 of the upper bound of the size of a struct page. Used for sizing > + * the vmemmap region only, does not affect actual memory footprint. > + * We don't use sizeof(struct page) directly since taking its size here > + * requires its definition to be available at this point in the

Re: [PATCH 1/5] mm/sparse: add common helper to mark all memblocks present

2018-10-11 Thread Christoph Hellwig
> + for_each_memblock(memory, reg) { > + int nid = memblock_get_region_node(reg); > + > + memory_present(nid, memblock_region_memory_base_pfn(reg), > +memblock_region_memory_end_pfn(reg)); Any reason you have a local variable for the node id

Re: [PATCH 0/7] hisi_sas: Misc bugfixes and an optimisation patch

2018-10-11 Thread Christoph Hellwig
On Thu, Oct 11, 2018 at 10:59:11AM +0100, John Garry wrote: > > > blk-mq tags are always per-host (which has actually caused problems for > > ATA, which is now using its own per-device tags). > > > > So, for example, if Scsi_host.can_queue = 2048 and Scsi_host.nr_hw_queues = > 16, then rq tags

Re: [PATCH 0/7] hisi_sas: Misc bugfixes and an optimisation patch

2018-10-11 Thread Christoph Hellwig
On Wed, Oct 10, 2018 at 09:58:25PM -0400, Martin K. Petersen wrote: > > This is because the IPTT index must be a unique value per HBA. However, > > if we switched to SCSI MQ, the block layer tag becomes unique per queue, > > and not per HBA. > > That doesn't sound right. blk-mq tags are always

Re: [RFC 4/4] gpio: sifive: Add GPIO driver for SiFive SoCs

2018-10-10 Thread Christoph Hellwig
On Wed, Oct 10, 2018 at 03:01:29PM +0200, Andreas Schwab wrote: > On Okt 09 2018, Atish Patra wrote: > > > +static void sifive_set_ie(struct sifive_gpio *chip, unsigned int offset) > > +{ > > + unsigned long flags; > > + unsigned int trigger; > > + > > + raw_spin_lock_irqsave(>lock,

Re: [RFC 2/4] pwm: sifive: Add a driver for SiFive SoC PWM

2018-10-10 Thread Christoph Hellwig
Thanks for getting these drivers submitted upstream! I don't really know anything about PWM, so just some random nitpicking below.. > + iowrite32(frac, pwm->regs + REG_PWMCMP0 + (dev->hwpwm * SIZE_PWMCMP)); * already has a higher precedence than +, so no need for the inner braces. > +

[PATCH 1/7] fore200e: simplify fore200e_bus usage

2018-10-09 Thread Christoph Hellwig
There is no need to have a global array of the ops, instead PCI and sbus can have their own instances assigned in *_probe. Also switch to C99 initializers. Signed-off-by: Christoph Hellwig --- drivers/atm/fore200e.c | 121 +++-- 1 file changed, 56 insertions

fore200e DMA cleanups and fixes

2018-10-09 Thread Christoph Hellwig
The fore200e driver came up during some dma-related audits, so here is the fallout. Compile tested (x86 & sparc) only.

[PATCH 02/33] powerpc/dma: remove the unused ARCH_HAS_DMA_MMAP_COHERENT define

2018-10-09 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Acked-by: Benjamin Herrenschmidt --- arch/powerpc/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h index 8fa394520af6..f2a4a7142b1e 100644 --- a/arch

use generic DMA mapping code in powerpc V3

2018-10-09 Thread Christoph Hellwig
Hi all, this series switches the powerpc port to use the generic swiotlb and noncoherent dma ops, and to use more generic code for the coherent direct mapping, as well as removing a lot of dead code. The changes since v1 are to big to list and v2 was not posted in public. As this series is very

[PATCH 14/33] powerpc/dart: use the generic iommu bypass code

2018-10-09 Thread Christoph Hellwig
Use the generic iommu bypass code instead of overriding set_dma_mask. Signed-off-by: Christoph Hellwig --- arch/powerpc/sysdev/dart_iommu.c | 45 +++- 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc

[PATCH 13/33] powerpc/dart: remove dead cleanup code in iommu_init_early_dart

2018-10-09 Thread Christoph Hellwig
If dart_init failed we didn't have a chance to setup dma or controller ops yet, so there is no point in resetting them. Signed-off-by: Christoph Hellwig --- arch/powerpc/sysdev/dart_iommu.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/powerpc/sysdev

[PATCH 20/33] powerpc/dma: remove the iommu fallback for coherent allocations

2018-10-09 Thread Christoph Hellwig
All iommu capable platforms now always use the iommu code with the internal bypass, so there is not need for this magic anymore. Signed-off-by: Christoph Hellwig --- arch/powerpc/Kconfig | 4 --- arch/powerpc/kernel/dma.c | 68 ++- 2 files changed, 2

  1   2   3   4   5   6   7   8   9   10   >