Re: Closed source userspace graphics drivers with an open source kernel component

2010-07-02 Thread Christoph Hellwig
100% agreed on the rationale, and I hope you can keep this crap out! ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: Closed source userspace graphics drivers with an open source kernel component

2010-07-02 Thread Christoph Hellwig
Luc, can you please take your corporate bullshit out of this? I can assume you know Dave personally and should be clearly aware that he's everything but a corporate drone. ___ dri-devel mailing list dri-devel@lists.freedesktop.org

Re: [v2] Remaining BKL users, what to do

2010-10-18 Thread Christoph Hellwig
Before we get into all these fringe drivers: - I've not seen any progrss on -get_sb BKL removal for a while - locks.c is probably a higher priorit, too. ___ dri-devel mailing list dri-devel@lists.freedesktop.org

Re: [Ksummit-2010-discuss] [v2] Remaining BKL users, what to do

2010-10-21 Thread Christoph Hellwig
Any chance you could drop the Cc list a bit for the i810/i830 discussion? It's not relevant to most lists and people Cc'ed here. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 0/26] get_user_pages() cleanup

2013-10-03 Thread Christoph Hellwig
On Wed, Oct 02, 2013 at 04:27:41PM +0200, Jan Kara wrote: Hello, In my quest for changing locking around page faults to make things easier for filesystems I found out get_user_pages() users could use a cleanup. The knowledge about necessary locking for get_user_pages() is in tons of

[PATCH 00/28] Reenable maybe-uninitialized warnings

2016-10-17 Thread Christoph Hellwig
On Tue, Oct 18, 2016 at 12:03:28AM +0200, Arnd Bergmann wrote: > This is a set of patches that I hope to get into v4.9 in some form > in order to turn on the -Wmaybe-uninitialized warnings again. Hi Arnd, I jsut complained to Geert that I was introducing way to many bugs or pointless warnings

[RFC v2] dma-mapping: Use unsigned long for dma_attrs

2016-05-31 Thread Christoph Hellwig
On Mon, May 30, 2016 at 01:54:06PM +0200, Krzysztof Kozlowski wrote: > The dma-mapping core and the implementations do not change the > DMA attributes passed by pointer. Thus the pointer can point to const > data. However the attributes do not have to be a bitfield. Instead > unsigned long will

Enabling peer to peer device transactions for PCIe devices

2016-11-24 Thread Christoph Hellwig
On Thu, Nov 24, 2016 at 11:11:34AM -0700, Logan Gunthorpe wrote: > * Regular DAX in the FS doesn't work at this time because the FS can > move the file you think your transfer to out from under you. Though I > understand there's been some work with XFS to solve that issue. The file system will

[RFC v2] dma-mapping: Use unsigned long for dma_attrs

2016-06-01 Thread Christoph Hellwig
On Wed, Jun 01, 2016 at 07:36:42AM +0200, Krzysztof Kozlowski wrote: > > No really for this patch, but I would much prefer to document them next > > to the code in the long run. Also I really think these BIT() macros > > are a distraction compared to the (1 << N) notation. > > Not much

Enabling peer to peer device transactions for PCIe devices

2016-12-05 Thread Christoph Hellwig
On Mon, Dec 05, 2016 at 12:46:14PM -0700, Jason Gunthorpe wrote: > In any event the allocator still needs to track which regions are in > use and be able to hook 'free' from userspace. That does suggest it > should be integrated into the nvme driver and not a bolt on driver.. Two totally

Enabling peer to peer device transactions for PCIe devices

2016-12-06 Thread Christoph Hellwig
On Tue, Dec 06, 2016 at 09:38:50AM -0700, Jason Gunthorpe wrote: > > > I'm not opposed to mapping /dev/nvmeX. However, the lookup is trivial > > > to accomplish in sysfs through /sys/dev/char to find the sysfs path of the > > > device-dax instance under the nvme device, or if you already have the

[PATCH 10/10] virtio: enable endian checks for sparse builds

2016-12-06 Thread Christoph Hellwig
On Tue, Dec 06, 2016 at 05:41:05PM +0200, Michael S. Tsirkin wrote: > __CHECK_ENDIAN__ isn't on by default presumably because > it triggers too many sparse warnings for correct code. > But virtio is now clean of these warnings, and > we want to keep it this way - enable this for > sparse builds. >

[git pull] check headers fix.

2016-05-24 Thread Christoph Hellwig
On Tue, May 24, 2016 at 07:29:25AM +0100, Dave Airlie wrote: > > Hi Linus, > > here is the C++ guards warning fix from Arnd. So why the hell do we have C++ guards in kernel headers?

[PATCH] hfsplus: Remove hfsplus_file_lookup

2013-12-12 Thread Christoph Hellwig
On Thu, Dec 12, 2013 at 10:35:01AM +0400, Vyacheslav Dubeyko wrote: > I think that I can implement support of resource forks by means of xattr > way. Also, currently, I am implementing HFS+ compressed files support. > So, I can clean up old-fashioned way of resource forks support in HFS+ > driver

[PATCH] hfsplus: Remove hfsplus_file_lookup

2013-12-12 Thread Christoph Hellwig
The opendir issue is something that came up before, both in the reiser4 context and with hfsplus. I think we'll need to put this patch in ASAP to fix the semantic breakage caused by it, as well as other implications of having ->lookup on a hardlinkable object. Acked-by: Christoph Hellwig

[PATCH 12/15] kaweth: remove ifdefed out call to dma_supported

2015-10-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/net/usb/kaweth.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 1e9cdca..f64b25c 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c @@ -1177,12 +1177,6 @@ err_fw

[PATCH 15/15] dma: remove external references to dma_supported

2015-10-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- Documentation/DMA-API.txt | 13 - drivers/usb/host/ehci-hcd.c | 2 +- drivers/usb/host/fotg210-hcd.c | 2 +- drivers/usb/host/fusbh200-hcd.c | 2 +- drivers/usb/host/oxu210hp-hcd.c | 2 +- 5 files changed, 4 insertions(+), 17

remove dma_supported and pci_dma_supported as public APIs

2015-10-03 Thread Christoph Hellwig
All driver should be using dma_set_mask / pci_set_dma_mask to try to set the dma mask instead of just querying it. Without that some iommu implementations may not work. pci_dma_supported is removed entirely, but dma_supported stays for dma_ops implementations for now.

[PATCH 01/15] pcnet32: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig --- drivers/net/ethernet/amd/pcnet32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet

[PATCH 02/15] tw68-core: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig --- drivers/media/pci/tw68/tw68-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/tw68/tw68-core.c b/drivers/media/pci/tw68

[PATCH 03/15] saa7164: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig --- drivers/media/pci/saa7164/saa7164-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/saa7164/saa7164-core.c b/drivers

[PATCH 04/15] saa7134: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig --- drivers/media/pci/saa7134/saa7134-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers

[PATCH 05/15] cx88: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig --- drivers/media/pci/cx88/cx88-alsa.c | 2 +- drivers/media/pci/cx88/cx88-mpeg.c | 2 +- drivers/media/pci/cx88/cx88-video.c | 2 +- 3 files changed, 3 insertions

[PATCH 06/15] cx25821: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig --- drivers/media/pci/cx25821/cx25821-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers

[PATCH 07/15] cx23885: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig --- drivers/media/pci/cx23885/cx23885-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers

[PATCH 08/15] netup_unidvb: use pci_set_dma_mask insted of pci_dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig --- drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/netup_unidvb

[PATCH 09/15] mpsc: use dma_set_mask insted of dma_supported

2015-10-03 Thread Christoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig --- drivers/tty/serial/mpsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/mpsc.c b/drivers/tty/serial/mpsc.c index 82bb6d1

[PATCH 10/15] nouveau: don't call pci_dma_supported

2015-10-03 Thread Christoph Hellwig
Just try to set a 64-bit DMA mask first and retry with the smaller dma_mask if dma_set_mask failed. Signed-off-by: Christoph Hellwig --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b

[PATCH 11/15] sfc: don't call dma_supported

2015-10-03 Thread Christoph Hellwig
dma_set_mask already checks for a supported DMA mask before updating it, the call to dma_supported is redundant. Signed-off-by: Christoph Hellwig --- drivers/net/ethernet/sfc/efx.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/sfc/efx.c b

[PATCH 13/15] usbnet: remove ifdefed out call to dma_supported

2015-10-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/net/usb/usbnet.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index b4cf107..9497d51 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1661,12 +1661,6

[PATCH 14/15] pci: remove pci_dma_supported

2015-10-03 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/parisc/ccio-dma.c| 2 -- include/asm-generic/pci-dma-compat.h | 6 -- 2 files changed, 8 deletions(-) diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 957b421..8e11fb2 100644 --- a/drivers/parisc/ccio-dma.c

[RFC] How implement Secure Data Path ?

2015-05-05 Thread Christoph Hellwig
On Tue, May 05, 2015 at 05:39:57PM +0200, Benjamin Gaignard wrote: > Since few months I'm looking for Linaro to how do Secure Data Path (SPD). > I have tried and implemented multiple thinks but I always facing architecture > issues so I would like to get your help to solve the problem. > > First

[v2] Remaining BKL users, what to do

2010-10-18 Thread Christoph Hellwig
Before we get into all these fringe drivers: - I've not seen any progrss on ->get_sb BKL removal for a while - locks.c is probably a higher priorit, too.

[Ksummit-2010-discuss] [v2] Remaining BKL users, what to do

2010-10-21 Thread Christoph Hellwig
Any chance you could drop the Cc list a bit for the i810/i830 discussion? It's not relevant to most lists and people Cc'ed here.

Closed source userspace graphics drivers with an open source kernel component

2010-07-02 Thread Christoph Hellwig
100% agreed on the rationale, and I hope you can keep this crap out!

Closed source userspace graphics drivers with an open source kernel component

2010-07-02 Thread Christoph Hellwig
Luc, can you please take your corporate bullshit out of this? I can assume you know Dave personally and should be clearly aware that he's everything but a corporate drone.

Re: [PATCH v2 01/21] scatterlist: Introduce sg_map helper functions

2017-04-26 Thread Christoph Hellwig
On Tue, Apr 25, 2017 at 12:20:48PM -0600, Logan Gunthorpe wrote: > This patch introduces functions which kmap the pages inside an sgl. > These functions replace a common pattern of kmap(sg_page(sg)) that is > used in more than 50 places within the kernel. > > The motivation for this work is to

Re: [PATCH v2 02/21] libiscsi: Add an internal error code

2017-04-26 Thread Christoph Hellwig
On Tue, Apr 25, 2017 at 12:20:49PM -0600, Logan Gunthorpe wrote: > This is a prep patch to add a new error code to libiscsi. We want to > rework some kmap calls to be able to fail. When we do, we'd like to > use this error code. The kmap case in iscsi_tcp_segment_map can already fail. Please add

Re: [PATCH v2 01/21] scatterlist: Introduce sg_map helper functions

2017-04-27 Thread Christoph Hellwig
On Wed, Apr 26, 2017 at 12:11:33PM -0600, Logan Gunthorpe wrote: > Ok, well for starters I think you are mistaken about kmap being able to > fail. I'm having a hard time finding many users of that function that > bother to check for an error when calling it. A quick audit of the arch code shows

[PATCH 39/44] xen-swiotlb: remove xen_swiotlb_set_dma_mask

2017-06-08 Thread Christoph Hellwig
This just duplicates the generic implementation. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/xen/swiotlb-xen.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index c3a04b2d7532..82fc54f8eb77

[PATCH 10/44] ia64: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
All ia64 dma_mapping_ops instances already have a mapping_error member. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/ia64/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h

[PATCH 16/44] arm64: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
The dma alloc interface returns an error by return NULL, and the mapping interfaces rely on the mapping_error method, which the dummy ops already implement correctly. Thus remove the DMA_ERROR_CODE define. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/arm64/include/asm/dma-map

[PATCH 03/44] dmaengine: ioat: don't use DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is not a public API and will go away. Instead properly unwind based on the loop counter. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/dma/ioat/init.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/drivers/dm

clean up and modularize arch dma_mapping interface

2017-06-08 Thread Christoph Hellwig
Hi all, for a while we have a generic implementation of the dma mapping routines that call into per-arch or per-device operations. But right now there still are various bits in the interfaces where don't clearly operate on these ops. This series tries to clean up a lot of those (but not all

[PATCH 35/44] x86: remove arch specific dma_supported implementation

2017-06-08 Thread Christoph Hellwig
And instead wire it up as method for all the dma_map_ops instances. Note that this also means the arch specific check will be fully instead of partially applied in the AMD iommu driver. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/x86/include/asm/dma-mapping.h | 3 --- ar

[PATCH 09/44] c6x: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/c6x/include/asm/dma-mapping.h | 5 - 1 file changed, 5 deletions(-) diff --git a/arch/c6x/include/asm/dma-mapping.h b/arch/c6x/include/asm/dma-mapping.h index aca9f755e4f8..05daf1038111 100644 --- a/arch/c6x/include/asm/dma-map

[PATCH 36/44] dma-mapping: remove HAVE_ARCH_DMA_SUPPORTED

2017-06-08 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/linux/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index a57875309bfd..3e5908656226 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-map

[PATCH 02/44] ibmveth: properly unwind on init errors

2017-06-08 Thread Christoph Hellwig
That way the driver doesn't have to rely on DMA_ERROR_CODE, which is not a public API and going away. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/net/ethernet/ibm/ibmveth.c | 159 + 1 file changed, 74 insertions(+), 85 deletions(-) diff

[PATCH 12/44] microblaze: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
microblaze does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/microblaze/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/microblaze/include/asm/dma-mapping.h b/arch/microblaze/include/asm/dma-mapping.h

[PATCH 21/44] powerpc: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Instead define a ->mapping_error method for all IOMMU based dma operation instances. The direct ops don't ever return an error and don't need a ->mapping_error method. Signed-off-by: Christoph Hellwig <h...@lst.de> ---

[PATCH 17/44] hexagon: switch to use ->mapping_error for error reporting

2017-06-08 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/hexagon/include/asm/dma-mapping.h | 2 -- arch/hexagon/kernel/dma.c | 12 +--- arch/hexagon/kernel/hexagon_ksyms.c| 1 - 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/hexagon/include/a

[PATCH 06/44] iommu/dma: don't rely on DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is not a public API and will go away soon. dma dma-iommu driver already implements a proper ->mapping_error method, so it's only using the value internally. Add a new local define using the value that arm64 which is the only current user of dma-iommu. Signed-off-by: Christ

[PATCH 42/44] powerpc/cell: use the dma_supported method for ops switching

2017-06-08 Thread Christoph Hellwig
Besides removing the last instance of the set_dma_mask method this also reduced the code duplication. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/powerpc/platforms/cell/iommu.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/arch/p

[PATCH 41/44] powerpc/cell: clean up fixed mapping dma_ops initialization

2017-06-08 Thread Christoph Hellwig
By the time cell_pci_dma_dev_setup calls cell_dma_dev_setup no device can have the fixed map_ops set yet as it's only set by the set_dma_mask method. So move the setup for the fixed case to be only called in that place instead of indirecting through cell_dma_dev_setup. Signed-off-by: Christoph

[PATCH 32/44] hexagon: remove the unused dma_is_consistent prototype

2017-06-08 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/hexagon/include/asm/dma-mapping.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h index 9c15cb5271a6..463dbc18f853 100644 --- a/arch/hexagon/include/a

[PATCH 38/44] arm: implement ->dma_supported instead of ->set_dma_mask

2017-06-08 Thread Christoph Hellwig
Same behavior, less code duplication. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/arm/common/dmabounce.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 4aabf117e136..d89a0b56b245

[PATCH 01/44] firmware/ivc: use dma_mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is not supposed to be used by drivers. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/firmware/tegra/ivc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/tegra/ivc.c b/drivers/firmware/tegra/ivc.c index 29ecfd

[PATCH 44/44] powerpc: merge __dma_set_mask into dma_set_mask

2017-06-08 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/powerpc/include/asm/dma-mapping.h | 1 - arch/powerpc/kernel/dma.c | 13 - 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/a

[PATCH 18/44] iommu/amd: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/iommu/amd_iommu.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 63cacf

[PATCH 14/44] sh: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
sh does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/sh/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/sh/include/asm/dma-mapping.h b/arch/sh/include/asm/dma-mapping.h index d99008af5f73..9b06be07db4d

[PATCH 27/44] sparc: remove leon_dma_ops

2017-06-08 Thread Christoph Hellwig
We can just use pci32_dma_ops. Btw, given that leon is 32-bit and appears to be PCI based, do even need the special case for it in get_arch_dma_ops at all? Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/sparc/include/asm/dma-mapping.h | 3 +-- arch/sparc/kernel/ioport.c

[PATCH 19/44] s390: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
s390 can also use noop_dma_ops, and while that currently does not return errors it will so in the future. Implementing the mapping_error method is the proper way to have per-ops error conditions. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/s390/include/asm/dma-mapping.

[PATCH 20/44] sparc: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/sparc/include/asm/dma-mapping.h | 2 -- arch/sparc/kernel/iommu.c| 12 +--- arch/sparc/kernel/iommu_common.h | 2 ++ arch/sparc/kernel/pci_s

[PATCH 29/44] dma-noop: remove dma_supported and mapping_error methods

2017-06-08 Thread Christoph Hellwig
These just duplicate the default behavior if no method is provided. Signed-off-by: Christoph Hellwig <h...@lst.de> --- lib/dma-noop.c | 12 1 file changed, 12 deletions(-) diff --git a/lib/dma-noop.c b/lib/dma-noop.c index de26c8b68f34..643a074f139d 100644 --- a/lib/dma-

[PATCH 22/44] x86/pci-nommu: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/x86/kernel/pci-nommu.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index a88952

[PATCH 13/44] openrisc: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
openrisc does not return errors for dma_map_page. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/openrisc/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/openrisc/include/asm/dma-mapping.h b/arch/openrisc/include/asm/dma-mapping.h index 0c0075

[PATCH 25/44] arm: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/arm/common/dmabounce.c| 16 --- arch/arm/include/asm/dma-iommu.h | 2 ++ arch/arm/include/asm/dma-mapping.h | 1 - arch/arm/mm/dma-mapping.c

[PATCH 30/44] dma-virt: remove dma_supported and mapping_error methods

2017-06-08 Thread Christoph Hellwig
These just duplicate the default behavior if no method is provided. Signed-off-by: Christoph Hellwig <h...@lst.de> --- lib/dma-virt.c | 12 1 file changed, 12 deletions(-) diff --git a/lib/dma-virt.c b/lib/dma-virt.c index dcd4df1f7174..5c4f11329721 100644 --- a/lib/dma-

[PATCH 23/44] x86/calgary: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/x86/kernel/pci-calgary_64.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kern

[PATCH 08/44] xen-swiotlb: implement ->mapping_error

2017-06-08 Thread Christoph Hellwig
DMA_ERROR_CODE is going to go away, so don't rely on it. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/xen/swiotlb-xen.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index a0f006

[PATCH 07/44] xen-swiotlb: consolidate xen_swiotlb_dma_ops

2017-06-08 Thread Christoph Hellwig
for xen_swiotlb_dma_ops can now be marked static as well. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/arm/xen/mm.c | 17 arch/x86/xen/pci-swiotlb-xen.c | 14 --- drivers/xen/swiotlb-xen.c | 93 ++ include/xen/swiotlb-xen.h

[PATCH 24/44] x86: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
All dma_map_ops instances now handle their errors through ->mapping_error. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/x86/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mappin

[PATCH 04/44] drm/exynos: don't use DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
return 0. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/gpu/drm/exynos/exynos_drm_fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c index c77a5aced81a..d48fd7c918f8

[PATCH 37/44] mips/loongson64: implement ->dma_supported instead of ->set_dma_mask

2017-06-08 Thread Christoph Hellwig
Same behavior, less code duplication. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/mips/loongson64/common/dma-swiotlb.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/arch/mips/loongson64/common/dma-swiotlb.c b/arch/mips/loongson64/comm

[PATCH 28/44] sparc: remove arch specific dma_supported implementations

2017-06-08 Thread Christoph Hellwig
ich means always supported. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/sparc/include/asm/dma-mapping.h | 3 --- arch/sparc/kernel/iommu.c| 40 +++- arch/sparc/kernel/ioport.c | 22 ++-- arch/sparc/kernel/pc

[PATCH 26/44] dma-mapping: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
And update the documentation - dma_mapping_error has been supported everywhere for a long time. Signed-off-by: Christoph Hellwig <h...@lst.de> --- Documentation/DMA-API-HOWTO.txt | 31 +-- include/linux/dma-mapping.h | 5 - 2 files changed, 5 inse

[PATCH 15/44] xtensa: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
xtensa already implements the mapping_error method for its only dma_map_ops instance. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/xtensa/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/a

[PATCH 11/44] m32r: remove DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
dma-noop is the only dma_mapping_ops instance for m32r and does not return errors. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/m32r/include/asm/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/m32r/include/asm/dma-mapping.h b/arch/m32r/include/a

[PATCH 34/44] arm: remove arch specific dma_supported implementation

2017-06-08 Thread Christoph Hellwig
And instead wire it up as method for all the dma_map_ops instances. Note that the code seems a little fishy for dmabounce and iommu, but for now I'd like to preserve the existing behavior 1:1. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/arm/common/dmabounce.c| 1 + ar

[PATCH 31/44] hexagon: remove arch-specific dma_supported implementation

2017-06-08 Thread Christoph Hellwig
This implementation is simply bogus - hexagon only has a simple direct mapped DMA implementation and thus doesn't care about the address. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/hexagon/include/asm/dma-mapping.h | 2 -- arch/hexagon/kernel/dma.c | 9 --

[PATCH 05/44] drm/armada: don't abuse DMA_ERROR_CODE

2017-06-08 Thread Christoph Hellwig
dev_addr isn't even a dma_addr_t, and DMA_ERROR_CODE has never been a valid driver API. Add a bool mapped flag instead. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/gpu/drm/armada/armada_fb.c | 2 +- drivers/gpu/drm/armada/armada_gem.c | 5 ++--- drivers/gpu/drm/

[PATCH 33/44] openrisc: remove arch-specific dma_supported implementation

2017-06-08 Thread Christoph Hellwig
This implementation is simply bogus - hexagon only has a simple direct mapped DMA implementation and thus doesn't care about the address. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/openrisc/include/asm/dma-mapping.h | 7 --- 1 file changed, 7 deletions(-) diff --git

[PATCH 40/44] tile: remove dma_supported and mapping_error methods

2017-06-08 Thread Christoph Hellwig
These just duplicate the default behavior if no method is provided. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/tile/kernel/pci-dma.c | 30 -- 1 file changed, 30 deletions(-) diff --git a/arch/tile/kernel/pci-dma.c b/arch/tile/kernel/pci-dma.c

[PATCH 43/44] dma-mapping: remove the set_dma_mask method

2017-06-08 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/powerpc/kernel/dma.c | 4 include/linux/dma-mapping.h | 6 -- 2 files changed, 10 deletions(-) diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 41c749586bd2..466c9f07b288 100644 --- a/arch/powerpc/

new dma-mapping tree, was Re: clean up and modularize arch dma_mapping interface V2

2017-06-20 Thread Christoph Hellwig
On Fri, Jun 16, 2017 at 08:10:15PM +0200, Christoph Hellwig wrote: > I plan to create a new dma-mapping tree to collect all this work. > Any volunteers for co-maintainers, especially from the iommu gang? Ok, I've created the new tree: git://git.infradead.org/users/hch/dma-mapping.git fo

Re: new dma-mapping tree, was Re: clean up and modularize arch dma_mapping interface V2

2017-06-20 Thread Christoph Hellwig
On Tue, Jun 20, 2017 at 02:14:36PM +0100, Robin Murphy wrote: > Hi Christoph, > > On 20/06/17 13:41, Christoph Hellwig wrote: > > On Fri, Jun 16, 2017 at 08:10:15PM +0200, Christoph Hellwig wrote: > >> I plan to create a new dma-mapping tree to collect all this work. &g

Re: clean up and modularize arch dma_mapping interface

2017-06-20 Thread Christoph Hellwig
On Tue, Jun 20, 2017 at 11:19:02AM +0200, Daniel Vetter wrote: > Ack for the 2 drm patches, but I can also pick them up through drm-misc if > you prefer that (but then it'll be 4.14). Nah, I'll plan to set up a dma-mapping tree so that we'll have common place for dma-mapping work.

Re: new dma-mapping tree, was Re: clean up and modularize arch dma_mapping interface V2

2017-06-20 Thread Christoph Hellwig
On Tue, Jun 20, 2017 at 11:04:00PM +1000, Stephen Rothwell wrote: > git://git.linaro.org/people/mszyprowski/linux-dma-mapping.git#dma-mapping-next > > Contacts: Marek Szyprowski and Kyungmin Park (cc'd) > > I have called your tree dma-mapping-hch for now. The other tree has > not been updated

Re: clean up and modularize arch dma_mapping interface V2

2017-06-24 Thread Christoph Hellwig
On Wed, Jun 21, 2017 at 12:24:28PM -0700, tndave wrote: > Thanks for doing this. > So archs can still have their own definition for dma_set_mask() if > HAVE_ARCH_DMA_SET_MASK is y? > (and similarly for dma_set_coherent_mask() when > CONFIG_ARCH_HAS_DMA_SET_COHERENT_MASK is y) > Any plan to

Re: new dma-mapping tree, was Re: clean up and modularize arch dma_mapping interface V2

2017-06-26 Thread Christoph Hellwig
On Wed, Jun 21, 2017 at 03:32:39PM +0200, Marek Szyprowski wrote: > linux-next > was a side effect of that. I think that for now it can be dropped in favor > of > Christoph's tree. I can also do some review and help in maintainers work if > needed, although I was recently busy with other stuff. >

Re: clean up and modularize arch dma_mapping interface V2

2017-06-26 Thread Christoph Hellwig
On Sat, Jun 24, 2017 at 10:36:56AM -0500, Benjamin Herrenschmidt wrote: > I think we still need to do it. For example we have a bunch new "funky" > cases. I have no plan to do away with the selection - I just want a better interface than the current one.

Re: [PATCH] drm/rockchip: Don't allow zero sized gem buffer

2017-05-25 Thread Christoph Hellwig
On Fri, May 26, 2017 at 10:30:09AM +0800, jeffy wrote: > Hi sean, > > On 05/25/2017 11:30 PM, Sean Paul wrote: > > On Tue, May 23, 2017 at 02:39:43PM +0800, Jeffy Chen wrote: > > > The system would crash when trying to alloc zero sized gem buffer: > > > [6.712435] Unable to handle kernel NULL

[PATCH 35/44] x86: remove arch specific dma_supported implementation

2017-06-16 Thread Christoph Hellwig
And instead wire it up as method for all the dma_map_ops instances. Note that this also means the arch specific check will be fully instead of partially applied in the AMD iommu driver. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/x86/include/asm/dma-mapping.h | 3 --- ar

[PATCH 39/44] xen-swiotlb: remove xen_swiotlb_set_dma_mask

2017-06-16 Thread Christoph Hellwig
This just duplicates the generic implementation. Signed-off-by: Christoph Hellwig <h...@lst.de> --- drivers/xen/swiotlb-xen.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index c3a04b2d7532..82fc54f8eb77

[PATCH 33/44] openrisc: remove arch-specific dma_supported implementation

2017-06-16 Thread Christoph Hellwig
This implementation is simply bogus - openrisc only has a simple direct mapped DMA implementation and thus doesn't care about the address. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/openrisc/include/asm/dma-mapping.h | 7 --- 1 file changed, 7 deletions(-) diff --git

[PATCH 28/44] sparc: remove arch specific dma_supported implementations

2017-06-16 Thread Christoph Hellwig
ich means always supported. Signed-off-by: Christoph Hellwig <h...@lst.de> Acked-by: David S. Miller <da...@davemloft.net> --- arch/sparc/include/asm/dma-mapping.h | 3 --- arch/sparc/kernel/iommu.c| 40 +++- arch/sparc/kernel/ioport.c

[PATCH 30/44] dma-virt: remove dma_supported and mapping_error methods

2017-06-16 Thread Christoph Hellwig
These just duplicate the default behavior if no method is provided. Signed-off-by: Christoph Hellwig <h...@lst.de> --- lib/dma-virt.c | 12 1 file changed, 12 deletions(-) diff --git a/lib/dma-virt.c b/lib/dma-virt.c index dcd4df1f7174..5c4f11329721 100644 --- a/lib/dma-

[PATCH 34/44] arm: remove arch specific dma_supported implementation

2017-06-16 Thread Christoph Hellwig
And instead wire it up as method for all the dma_map_ops instances. Note that the code seems a little fishy for dmabounce and iommu, but for now I'd like to preserve the existing behavior 1:1. Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/arm/common/dmabounce.c| 1 + ar

[PATCH 36/44] dma-mapping: remove HAVE_ARCH_DMA_SUPPORTED

2017-06-16 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- include/linux/dma-mapping.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index a57875309bfd..3e5908656226 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-map

[PATCH 32/44] hexagon: remove the unused dma_is_consistent prototype

2017-06-16 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig <h...@lst.de> --- arch/hexagon/include/asm/dma-mapping.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/hexagon/include/asm/dma-mapping.h b/arch/hexagon/include/asm/dma-mapping.h index 9c15cb5271a6..463dbc18f853 100644 --- a/arch/hexagon/include/a

  1   2   3   4   >