[PATCH 5.10 126/142] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-02-02 Thread Greg Kroah-Hartman
From: Moritz Fischer [ Upstream commit a1df829ead5877d4a1061e976a50e2e665a16f24 ] Address issue observed on real world system with suboptimal IORT table where DMA masks of PCI devices would get set to 0 as result. iort_dma_setup() would query the root complex'/named component IORT entry

Re: [PATCH v2] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-28 Thread Moritz Fischer
Hi Catalin, On Wed, Jan 27, 2021 at 01:09:36PM +, Catalin Marinas wrote: > On Thu, 21 Jan 2021 17:24:19 -0800, Moritz Fischer wrote: > > Address issue observed on real world system with suboptimal IORT table > > where DMA masks of PCI devices would get set

Re: [PATCH v2] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-27 Thread Catalin Marinas
On Thu, 21 Jan 2021 17:24:19 -0800, Moritz Fischer wrote: > Address issue observed on real world system with suboptimal IORT table > where DMA masks of PCI devices would get set to 0 as result. > > iort_dma_setup() would query the root complex'/named component IORT > entry for

Re: [PATCH v2] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-27 Thread Lorenzo Pieralisi
On Thu, Jan 21, 2021 at 05:24:19PM -0800, Moritz Fischer wrote: > Address issue observed on real world system with suboptimal IORT table > where DMA masks of PCI devices would get set to 0 as result. > > iort_dma_setup() would query the root complex'/named component IORT >

Re: [PATCH v2] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-22 Thread Moritz Fischer
s issue observed on real world system with suboptimal IORT table > > > > where DMA masks of PCI devices would get set to 0 as result. > > > > > > > > iort_dma_setup() would query the root complex'/named component IORT > > > > entr

Re: [PATCH v2] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-22 Thread Robin Murphy
On 2021-01-22 17:50, Moritz Fischer wrote: Hi Robin, On Fri, Jan 22, 2021 at 02:42:05PM +, Robin Murphy wrote: On 2021-01-22 01:24, Moritz Fischer wrote: Address issue observed on real world system with suboptimal IORT table where DMA masks of PCI devices would get set to 0 as result

Re: [PATCH v2] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-22 Thread Moritz Fischer
Hi Robin, On Fri, Jan 22, 2021 at 02:42:05PM +, Robin Murphy wrote: > On 2021-01-22 01:24, Moritz Fischer wrote: > > Address issue observed on real world system with suboptimal IORT table > > where DMA masks of PCI devices would get set to 0 as result. > > > > i

Re: [PATCH v2] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-22 Thread Robin Murphy
On 2021-01-22 01:24, Moritz Fischer wrote: Address issue observed on real world system with suboptimal IORT table where DMA masks of PCI devices would get set to 0 as result. iort_dma_setup() would query the root complex'/named component IORT entry for a DMA mask, and use that over the on

[PATCH v2] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-21 Thread Moritz Fischer
Address issue observed on real world system with suboptimal IORT table where DMA masks of PCI devices would get set to 0 as result. iort_dma_setup() would query the root complex'/named component IORT entry for a DMA mask, and use that over the one the device has been configured with ea

Re: [PATCH] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-21 Thread Moritz Fischer
ddress issue observed on real world system with suboptimal IORT table > > > > where DMA masks of PCI devices would get set to 0 as result. > > > > > > > > iort_dma_setup() would query the root complex' IORT entry for a DMA > > > > mask, and use

Re: [PATCH] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-21 Thread Robin Murphy
On 2021-01-21 21:17, Moritz Fischer wrote: Robin, On Thu, Jan 21, 2021 at 08:08:42PM +, Robin Murphy wrote: On 2021-01-21 19:16, Moritz Fischer wrote: Address issue observed on real world system with suboptimal IORT table where DMA masks of PCI devices would get set to 0 as result

Re: [PATCH] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-21 Thread Moritz Fischer
Robin, On Thu, Jan 21, 2021 at 08:08:42PM +, Robin Murphy wrote: > On 2021-01-21 19:16, Moritz Fischer wrote: > > Address issue observed on real world system with suboptimal IORT table > > where DMA masks of PCI devices would get set to 0 as result. > > > > iort_

Re: [PATCH] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-21 Thread Robin Murphy
On 2021-01-21 19:16, Moritz Fischer wrote: Address issue observed on real world system with suboptimal IORT table where DMA masks of PCI devices would get set to 0 as result. iort_dma_setup() would query the root complex' IORT entry for a DMA mask, and use that over the one the device has

[PATCH] ACPI/IORT: Do not blindly trust DMA masks from firmware

2021-01-21 Thread Moritz Fischer
Address issue observed on real world system with suboptimal IORT table where DMA masks of PCI devices would get set to 0 as result. iort_dma_setup() would query the root complex' IORT entry for a DMA mask, and use that over the one the device has been configured with earlier. Ideally we wa

Re: allow larger than require DMA masks

2019-09-24 Thread James Bottomley
On Tue, 2019-09-24 at 23:25 +0200, Christoph Hellwig wrote: > On Mon, Sep 23, 2019 at 08:59:42PM -0400, James Bottomley wrote: > > > if (mask > ~0U) > > > » » return 0; > > > > > > Removing the if() makes the DMA mapping work. It's almost > > > midnight here, so i won't look into that

Re: allow larger than require DMA masks

2019-09-24 Thread Christoph Hellwig
On Mon, Sep 23, 2019 at 08:59:42PM -0400, James Bottomley wrote: > > if (mask > ~0U) > > » » return 0; > > > > Removing the if() makes the DMA mapping work. It's almost midnight > > here, so i won't look into that any further today. Does anyone have > > an opinion on this behaviour?

Re: allow larger than require DMA masks

2019-09-23 Thread James Bottomley
mask and dev- > > >coherent_dma_mask) and system limitations (dev->bus_dma_mask). We > > already accept larger than required masks in most dma_map_ops > > implementation, in case of x86 and implementations based on it > > since the dawn of time. Only one parisc and tw

Re: allow larger than require DMA masks

2019-09-23 Thread Sven Schnelle
We already accept larger than required > masks in most dma_map_ops implementation, in case of x86 and > implementations based on it since the dawn of time. Only one parisc > and two sparc64 instances failed larger than required DMA masks, and > this series fixes that up and updates the doc

Re: [PATCH] dma-direct: Force unencrypted DMA under SME for certain DMA masks

2019-07-24 Thread Lendacky, Thomas
On 7/24/19 1:11 PM, Kirill A. Shutemov wrote: > On Wed, Jul 24, 2019 at 05:34:26PM +, Lendacky, Thomas wrote: >> On 7/24/19 12:06 PM, Robin Murphy wrote: >>> On 24/07/2019 17:42, Lendacky, Thomas wrote: On 7/24/19 10:55 AM, Kirill A. Shutemov wrote: > On Wed, Jul 10, 2019 at 07:01:19PM

Re: [PATCH kernel v4 0/4] powerpc/ioda2: Yet another attempt to allow DMA masks between 32 and 59

2019-07-12 Thread Alexey Kardashevskiy
Argh. This was meant for the linuxppc list, will repost, please ignore this. On 12/07/2019 19:29, Alexey Kardashevskiy wrote: This is an attempt to allow DMA masks between 32..59 which are not large enough to use either a PHB3 bypass mode or a sketchy bypass. Depending on the max order, up to

[PATCH kernel v4 0/4] powerpc/ioda2: Yet another attempt to allow DMA masks between 32 and 59

2019-07-12 Thread Alexey Kardashevskiy
This is an attempt to allow DMA masks between 32..59 which are not large enough to use either a PHB3 bypass mode or a sketchy bypass. Depending on the max order, up to 40 is usually available. This is based on sha1 a2b6f26c264e Christophe Leroy "powerpc/module64: Use symbolic instructions

[PATCH 3.18 46/86] ARM: iop: dont use using 64-bit DMA masks

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static u64 iop13xx_adma_dmam

[PATCH 4.4 134/266] ARM: iop: dont use using 64-bit DMA masks

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static u64 iop13xx_adma_dmam

[PATCH 4.4 133/266] ARM: orion: dont use using 64-bit DMA masks

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow] .coherent_dma_m

[PATCH 3.18 45/86] ARM: orion: dont use using 64-bit DMA masks

2019-05-15 Thread Greg Kroah-Hartman
[ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow] .coherent_dma_m

[PATCH 5.0 081/122] ARM: orion: dont use using 64-bit DMA masks

2019-05-06 Thread Greg Kroah-Hartman
[ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow] .coherent_dma_m

[PATCH 5.0 082/122] ARM: iop: dont use using 64-bit DMA masks

2019-05-06 Thread Greg Kroah-Hartman
[ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static u64 iop13xx_adma_dmam

[PATCH 4.19 68/99] ARM: iop: dont use using 64-bit DMA masks

2019-05-06 Thread Greg Kroah-Hartman
[ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static u64 iop13xx_adma_dmam

[PATCH 4.9 53/62] ARM: iop: dont use using 64-bit DMA masks

2019-05-06 Thread Greg Kroah-Hartman
[ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static u64 iop13xx_adma_dmam

[PATCH 4.9 52/62] ARM: orion: dont use using 64-bit DMA masks

2019-05-06 Thread Greg Kroah-Hartman
[ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow] .coherent_dma_m

[PATCH 4.14 57/75] ARM: iop: dont use using 64-bit DMA masks

2019-05-06 Thread Greg Kroah-Hartman
[ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static u64 iop13xx_adma_dmam

[PATCH 4.14 56/75] ARM: orion: dont use using 64-bit DMA masks

2019-05-06 Thread Greg Kroah-Hartman
[ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow] .coherent_dma_m

[PATCH 4.19 67/99] ARM: orion: dont use using 64-bit DMA masks

2019-05-06 Thread Greg Kroah-Hartman
[ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow] .coherent_dma_m

[PATCH 3.16 102/202] drm/vmwgfx: Fix setting of dma masks

2019-04-27 Thread Ben Hutchings
3.16.66-rc1 review patch. If anyone has any objections, please let me know. -- From: Thomas Hellstrom commit 4cbfa1e6c09e98450aab3240e5119b0ab2c9795b upstream. Previously we set only the dma mask and not the coherent mask. Fix that. Also, for clarity, make sure both are initia

[PATCH AUTOSEL 3.18 10/10] ARM: iop: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static

[PATCH AUTOSEL 3.18 09/10] ARM: orion: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overf

[PATCH AUTOSEL 4.4 15/15] ARM: iop: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static

[PATCH AUTOSEL 4.4 14/15] ARM: orion: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overf

[PATCH AUTOSEL 4.9 27/28] ARM: orion: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overf

[PATCH AUTOSEL 4.9 28/28] ARM: iop: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static

[PATCH AUTOSEL 4.14 34/35] ARM: orion: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overf

[PATCH AUTOSEL 4.14 35/35] ARM: iop: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static

[PATCH AUTOSEL 4.19 51/52] ARM: iop: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static

[PATCH AUTOSEL 4.19 50/52] ARM: orion: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overf

[PATCH AUTOSEL 5.0 61/66] ARM: iop: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit 2125801ccce19249708ca3245d48998e70569ab8 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static

[PATCH AUTOSEL 5.0 60/66] ARM: orion: don't use using 64-bit DMA masks

2019-04-24 Thread Sasha Levin
From: Arnd Bergmann [ Upstream commit cd92d74d67c811dc22544430b9ac3029f5bd64c5 ] clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overf

Re: [PATCH 1/2] ARM: orion: don't use using 64-bit DMA masks

2019-04-07 Thread Olof Johansson
On Mon, Mar 25, 2019 at 04:50:42PM +0100, Arnd Bergmann wrote: > clang warns about statically defined DMA masks from the DMA_BIT_MASK > macro with length 64: > > arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type > [-Werror,-Wsh

Re: [PATCH 2/2] ARM: iop: don't use using 64-bit DMA masks

2019-04-07 Thread Olof Johansson
On Mon, Mar 25, 2019 at 04:50:43PM +0100, Arnd Bergmann wrote: > clang warns about statically defined DMA masks from the DMA_BIT_MASK > macro with length 64: > > arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type > [-Werror,-Wshift-count-overf

[PATCH 1/2] ARM: orion: don't use using 64-bit DMA masks

2019-03-25 Thread Arnd Bergmann
clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/plat-orion/common.c:625:29: error: shift count >= width of type [-Werror,-Wshift-count-overflow] .coherent_dma_mask = DMA_BIT_MASK

[PATCH 2/2] ARM: iop: don't use using 64-bit DMA masks

2019-03-25 Thread Arnd Bergmann
clang warns about statically defined DMA masks from the DMA_BIT_MASK macro with length 64: arch/arm/mach-iop13xx/setup.c:303:35: error: shift count >= width of type [-Werror,-Wshift-count-overflow] static u64 iop13xx_adma_dmamask = DMA_BIT_MASK

RE: [RFC net-next v1 1/3] vfio/mdev: Inherit dma masks of parent device

2019-03-08 Thread Parav Pandit
h...@nvidia.com; Vu Pham ; Yuval Avnery > ; jakub.kicin...@netronome.com; > k...@vger.kernel.org > Subject: Re: [RFC net-next v1 1/3] vfio/mdev: Inherit dma masks of parent > device > > On Fri, 8 Mar 2019 16:07:54 -0600 > Parav Pandit wrote: > > > Inherit dm

Re: [RFC net-next v1 1/3] vfio/mdev: Inherit dma masks of parent device

2019-03-08 Thread Alex Williamson
On Fri, 8 Mar 2019 16:07:54 -0600 Parav Pandit wrote: > Inherit dma mask of parent device in child mdev devices, so that > protocol stack can use right dma mask while doing dma mappings. > > Signed-off-by: Parav Pandit > --- > drivers/vfio/mdev/mdev_core.c | 4 > 1 file changed, 4 insert

[RFC net-next v1 1/3] vfio/mdev: Inherit dma masks of parent device

2019-03-08 Thread Parav Pandit
Inherit dma mask of parent device in child mdev devices, so that protocol stack can use right dma mask while doing dma mappings. Signed-off-by: Parav Pandit --- drivers/vfio/mdev/mdev_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev

[PATCH 4.20 80/88] MIPS: BCM63XX: provide DMA masks for ethernet devices

2019-03-04 Thread Greg Kroah-Hartman
4.20-stable review patch. If anyone has any objections, please let me know. -- From: Jonas Gorski commit 18836b48ebae20850631ee2916d0cdbb86df813d upstream. The switch to the generic dma ops made dma masks mandatory, breaking devices having them not set. In case of bcm63xx, it

[PATCH 4.19 76/78] MIPS: BCM63XX: provide DMA masks for ethernet devices

2019-03-04 Thread Greg Kroah-Hartman
4.19-stable review patch. If anyone has any objections, please let me know. -- From: Jonas Gorski commit 18836b48ebae20850631ee2916d0cdbb86df813d upstream. The switch to the generic dma ops made dma masks mandatory, breaking devices having them not set. In case of bcm63xx, it

Re: [PATCH] MIPS: BCM63XX: provide DMA masks for ethernet devices

2019-02-21 Thread Paul Burton
Hello, Jonas Gorski wrote: > The switch to the generic dma ops made dma masks mandatory, breaking > devices having them not set. In case of bcm63xx, it broke ethernet with > the following warning when trying to up the device: > > [2.633123] ---

Re: [PATCH] MIPS: BCM63XX: provide DMA masks for ethernet devices

2019-02-21 Thread Florian Fainelli
On 2/21/19 1:56 AM, Jonas Gorski wrote: > The switch to the generic dma ops made dma masks mandatory, breaking > devices having them not set. In case of bcm63xx, it broke ethernet with > the following warning when trying to up the device: > > [2.633123] ---

Re: [PATCH] MIPS: BCM63XX: provide DMA masks for ethernet devices

2019-02-21 Thread Christoph Hellwig
On Thu, Feb 21, 2019 at 10:56:42AM +0100, Jonas Gorski wrote: > The switch to the generic dma ops made dma masks mandatory, breaking > devices having them not set. In case of bcm63xx, it broke ethernet with > the following warning when trying to up the device: Looks good: Reviewed-by:

[PATCH] MIPS: BCM63XX: provide DMA masks for ethernet devices

2019-02-21 Thread Jonas Gorski
The switch to the generic dma ops made dma masks mandatory, breaking devices having them not set. In case of bcm63xx, it broke ethernet with the following warning when trying to up the device: [2.633123] [ cut here ] [2.637949] WARNING: CPU: 0 PID: 325 at ./include

[PATCH 3.18 083/108] drm/vmwgfx: Fix setting of dma masks

2019-02-18 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Thomas Hellstrom commit 4cbfa1e6c09e98450aab3240e5119b0ab2c9795b upstream. Previously we set only the dma mask and not the coherent mask. Fix that. Also, for clarity, make sure both are initia

[PATCH 4.4 109/143] drm/vmwgfx: Fix setting of dma masks

2019-02-18 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Thomas Hellstrom commit 4cbfa1e6c09e98450aab3240e5119b0ab2c9795b upstream. Previously we set only the dma mask and not the coherent mask. Fix that. Also, for clarity, make sure both are initial

Re: [PATCH 4/5] sparc64/pci_sun4v: allow large DMA masks

2019-02-15 Thread David Miller
From: Christoph Hellwig Date: Fri, 15 Feb 2019 15:45:58 +0100 > We've been moving to a model where the device just sets the DMA mask > supported by it, instead of having to fallback to something it thinks > the platform might support. Sparc64 is the remaining holdout forcing > drivers to supply

Re: [PATCH 3/5] sparc64/iommu: allow large DMA masks

2019-02-15 Thread David Miller
From: Christoph Hellwig Date: Fri, 15 Feb 2019 15:45:57 +0100 > We've been moving to a model where the device just sets the DMA mask > supported by it, instead of having to fallback to something it thinks > the platform might support. Sparc64 is the remaining holdout forcing > drivers to supply

[PATCH 4/5] sparc64/pci_sun4v: allow large DMA masks

2019-02-15 Thread Christoph Hellwig
We've been moving to a model where the device just sets the DMA mask supported by it, instead of having to fallback to something it thinks the platform might support. Sparc64 is the remaining holdout forcing drivers to supply a matching mask. Change dma_4v_supported to just check if the supplied

allow larger than require DMA masks

2019-02-15 Thread Christoph Hellwig
f x86 and implementations based on it since the dawn of time. Only one parisc and two sparc64 instances failed larger than required DMA masks, and this series fixes that up and updates the documentation that devices don't need to handle DMA mask fallbacks.

[PATCH 3/5] sparc64/iommu: allow large DMA masks

2019-02-15 Thread Christoph Hellwig
We've been moving to a model where the device just sets the DMA mask supported by it, instead of having to fallback to something it thinks the platform might support. Sparc64 is the remaining holdout forcing drivers to supply a matching mask. Change dma_4u_supported to just check if the supplied

[PATCH 1/5] ccio: allow large DMA masks

2019-02-15 Thread Christoph Hellwig
There is no harm in setting a 64-bit mask even if we don't need it, and the current ccio code is one of the few place in the kernel still rejecting larger than required DMA masks. Signed-off-by: Christoph Hellwig --- drivers/parisc/ccio-dma.c | 4 ++-- 1 file changed, 2 insertions(

[PATCH 4.14 17/35] drm/vmwgfx: Fix setting of dma masks

2019-02-13 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Thomas Hellstrom commit 4cbfa1e6c09e98450aab3240e5119b0ab2c9795b upstream. Previously we set only the dma mask and not the coherent mask. Fix that. Also, for clarity, make sure both are initia

[PATCH 4.20 41/50] drm/vmwgfx: Fix setting of dma masks

2019-02-13 Thread Greg Kroah-Hartman
4.20-stable review patch. If anyone has any objections, please let me know. -- From: Thomas Hellstrom commit 4cbfa1e6c09e98450aab3240e5119b0ab2c9795b upstream. Previously we set only the dma mask and not the coherent mask. Fix that. Also, for clarity, make sure both are initia

[PATCH 4.19 34/44] drm/vmwgfx: Fix setting of dma masks

2019-02-13 Thread Greg Kroah-Hartman
4.19-stable review patch. If anyone has any objections, please let me know. -- From: Thomas Hellstrom commit 4cbfa1e6c09e98450aab3240e5119b0ab2c9795b upstream. Previously we set only the dma mask and not the coherent mask. Fix that. Also, for clarity, make sure both are initia

[PATCH 4.9 15/24] drm/vmwgfx: Fix setting of dma masks

2019-02-13 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Thomas Hellstrom commit 4cbfa1e6c09e98450aab3240e5119b0ab2c9795b upstream. Previously we set only the dma mask and not the coherent mask. Fix that. Also, for clarity, make sure both are initial

[PATCH 02/32] dma-direct: we might need GFP_DMA for 32-bit dma masks

2019-02-12 Thread Christoph Hellwig
If there is no ZONE_DMA32 we might need GFP_DMA to be able to allocate memory that satisfies a 32-bit DMA mask. Reported-by: Christian Zigotzky Signed-off-by: Christoph Hellwig Tested-by: Christian Zigotzky --- kernel/dma/direct.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -

[PATCH 3.18 47/90] TC: Set DMA masks for devices

2018-11-19 Thread Greg Kroah-Hartman
Call Trace: [] show_stack+0xa0/0x130 [] __warn+0x128/0x170 ---[ end trace b1d1e094f67f3bb2 ]--- This is because the TURBOchannel bus driver fails to set the coherent DMA mask for devices enumerated. Set the regular and coherent DMA masks for TURBOchannel devices then, observing that the bus protocol sup

[PATCH 4.4 074/160] TC: Set DMA masks for devices

2018-11-19 Thread Greg Kroah-Hartman
Call Trace: [] show_stack+0xa0/0x130 [] __warn+0x128/0x170 ---[ end trace b1d1e094f67f3bb2 ]--- This is because the TURBOchannel bus driver fails to set the coherent DMA mask for devices enumerated. Set the regular and coherent DMA masks for TURBOchannel devices then, observing that the bus protocol sup

[PATCH 4.19 291/361] TC: Set DMA masks for devices

2018-11-11 Thread Greg Kroah-Hartman
Call Trace: [] show_stack+0xa0/0x130 [] __warn+0x128/0x170 ---[ end trace b1d1e094f67f3bb2 ]--- This is because the TURBOchannel bus driver fails to set the coherent DMA mask for devices enumerated. Set the regular and coherent DMA masks for TURBOchannel devices then, observing that the bus protocol sup

[PATCH 4.18 283/350] TC: Set DMA masks for devices

2018-11-11 Thread Greg Kroah-Hartman
Call Trace: [] show_stack+0xa0/0x130 [] __warn+0x128/0x170 ---[ end trace b1d1e094f67f3bb2 ]--- This is because the TURBOchannel bus driver fails to set the coherent DMA mask for devices enumerated. Set the regular and coherent DMA masks for TURBOchannel devices then, observing that the bus protocol sup

[PATCH 4.9 117/141] TC: Set DMA masks for devices

2018-11-11 Thread Greg Kroah-Hartman
Call Trace: [] show_stack+0xa0/0x130 [] __warn+0x128/0x170 ---[ end trace b1d1e094f67f3bb2 ]--- This is because the TURBOchannel bus driver fails to set the coherent DMA mask for devices enumerated. Set the regular and coherent DMA masks for TURBOchannel devices then, observing that the bus protocol sup

[PATCH 4.14 179/222] TC: Set DMA masks for devices

2018-11-11 Thread Greg Kroah-Hartman
Call Trace: [] show_stack+0xa0/0x130 [] __warn+0x128/0x170 ---[ end trace b1d1e094f67f3bb2 ]--- This is because the TURBOchannel bus driver fails to set the coherent DMA mask for devices enumerated. Set the regular and coherent DMA masks for TURBOchannel devices then, observing that the bus protocol sup

[PATCH] TC: Set DMA masks for devices

2018-10-03 Thread Maciej W. Rozycki
or devices enumerated. Set the regular and coherent DMA masks for TURBOchannel devices then, observing that the bus protocol supports a 34-bit (16GiB) DMA address space, by interpreting the value presented in the address cycle across the 32 `ad' lines as a 32-bit word rather than byte a

Re: [RFC PATCH 0/4] Stop losing firmware-set DMA masks

2018-07-11 Thread Robin Murphy
On 11/07/18 15:40, Rob Herring wrote: On Tue, Jul 10, 2018 at 12:43 PM Robin Murphy wrote: Whilst the common firmware code invoked by dma_configure() initialises devices' DMA masks according to limitations described by the respective properties ("dma-ranges" for OF and _DM

[PATCH 32/34] dma-direct: reject too small dma masks

2018-01-12 Thread Christoph Hellwig
bit DMA masks are so common we expect every architecture +* to be able to satisfy them - either by not supporting more physical +* memory, or by providing a ZONE_DMA32. If neither is the case, the +* architecture needs to use an IOMMU instead of the direct mapp

Re: [PATCH 31/33] dma-direct: reject too small dma masks

2018-01-10 Thread Robin Murphy
On 10/01/18 15:32, Christoph Hellwig wrote: On Wed, Jan 10, 2018 at 11:49:34AM +, Robin Murphy wrote: +#ifdef CONFIG_ZONE_DMA + if (mask < DMA_BIT_MASK(ARCH_ZONE_DMA_BITS)) + return 0; +#else + /* +* Because 32-bit DMA masks are so common we expect ev

Re: [PATCH 31/33] dma-direct: reject too small dma masks

2018-01-10 Thread Christoph Hellwig
On Wed, Jan 10, 2018 at 11:49:34AM +, Robin Murphy wrote: >> +#ifdef CONFIG_ZONE_DMA >> +if (mask < DMA_BIT_MASK(ARCH_ZONE_DMA_BITS)) >> +return 0; >> +#else >> + /* >> + * Because 32-bit DMA masks are so common we expect ever

Re: [PATCH 31/33] dma-direct: reject too small dma masks

2018-01-10 Thread Robin Murphy
lse + /* +* Because 32-bit DMA masks are so common we expect every architecture +* to be able to satisfy them - either by not supporting more physical +* memory, or by providing a ZONE_DMA32. If neither is the case, the +* architecture needs to use an IOMMU instead of

[PATCH 31/33] dma-direct: reject too small dma masks

2018-01-10 Thread Christoph Hellwig
(struct device *dev, struct scatterlist *sgl, return nents; } +int dma_direct_supported(struct device *dev, u64 mask) +{ +#ifdef CONFIG_ZONE_DMA + if (mask < DMA_BIT_MASK(ARCH_ZONE_DMA_BITS)) + return 0; +#else + /* +* Because 32-bit DMA masks are so common

[PATCH 33/67] dma-direct: reject too small dma masks

2017-12-29 Thread Christoph Hellwig
(struct device *dev, struct scatterlist *sgl, return nents; } +int dma_direct_supported(struct device *dev, u64 mask) +{ +#ifdef CONFIG_ZONE_DMA + if (mask < DMA_BIT_MASK(ARCH_ZONE_DMA_BITS)) + return 0; +#else + /* +* Because 32-bit DMA masks are so common

[PATCH v2 2/3] staging: ccree: handle limiting of DMA masks

2017-11-02 Thread Gilad Ben-Yossef
Properly handle limiting of DMA masks based on device and bus capabilities. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging

Re: [PATCH 2/3] staging: ccree: handle limiting of DMA masks

2017-11-02 Thread Gilad Ben-Yossef
Hi, Thank you for the review. On Wed, Nov 1, 2017 at 1:09 PM, Dan Carpenter wrote: > On Tue, Oct 31, 2017 at 11:56:16AM +, Gilad Ben-Yossef wrote: >> >> - if (!dev->coherent_dma_mask) >> - dev->coherent_dma_mask = DMA_BIT_MASK(DMA_BIT_MASK_LEN); >> + if (rc) { >> +

Re: [PATCH 2/3] staging: ccree: handle limiting of DMA masks

2017-11-01 Thread Dan Carpenter
On Tue, Oct 31, 2017 at 11:56:16AM +, Gilad Ben-Yossef wrote: > > - if (!dev->coherent_dma_mask) > - dev->coherent_dma_mask = DMA_BIT_MASK(DMA_BIT_MASK_LEN); > + if (rc) { > + dev_err(dev, "Error: failed in dma_set_mask, mask=%par\n", > + &d

Re: [PATCH 2/3] staging: ccree: handle limiting of DMA masks

2017-11-01 Thread Dan Carpenter
On Tue, Oct 31, 2017 at 11:56:16AM +, Gilad Ben-Yossef wrote: > + dma_mask = (dma_addr_t)(DMA_BIT_MASK(DMA_BIT_MASK_LEN)); > + while (dma_mask > 0x7fffUL) { > + if (dma_supported(&plat_dev->dev, dma_mask)) { > + rc = dma_set_coherent_mask(&plat_dev->d

[PATCH 2/3] staging: ccree: handle limiting of DMA masks

2017-10-31 Thread Gilad Ben-Yossef
Properly handle limiting of DMA masks based on device and bus capabilities. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c b/drivers/staging

[PATCH 4.9 61/66] virtio_mmio: Set DMA masks appropriately

2017-01-30 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Robin Murphy commit f7f6634d23830ff74335734fbdb28ea109c1f349 upstream. Once DMA API usage is enabled, it becomes apparent that virtio-mmio is inadvertently relying on the default 32-bit DMA mas

Re: [PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports

2017-01-13 Thread kbuild test robot
Hi Nikita, [auto build test ERROR on linus/master] [also build test ERROR on v4.10-rc3 next-20170112] [cannot apply to arm64/for-next/core] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Nikita-

Re: [PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports

2017-01-11 Thread Nikita Yushchenko
>> @@ -959,6 +990,15 @@ void arch_setup_dma_ops(struct device *dev, u64 >> dma_base, u64 size, >> if (!dev->archdata.dma_ops) >> dev->archdata.dma_ops = &swiotlb_dma_ops; >> >> + /* >> +* Whatever the parent bus can set. A device must not set >> +* a

Re: [PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports

2017-01-11 Thread Arnd Bergmann
On Wednesday, January 11, 2017 9:31:52 PM CET Nikita Yushchenko wrote: > @@ -959,6 +990,15 @@ void arch_setup_dma_ops(struct device *dev, u64 > dma_base, u64 size, > if (!dev->archdata.dma_ops) > dev->archdata.dma_ops = &swiotlb_dma_ops; > > + /* > +* Whatev

[PATCH 0/2] arm64: fix handling of DMA masks wider than bus supports

2017-01-11 Thread Nikita Yushchenko
hat. --- Nikita Yushchenko (2): dma-mapping: let arch know origin of dma range passed to arch_setup_dma_ops() arm64: avoid increasing DMA masks above what hardware supports arch/arm/include/asm/dma-mapping.h | 1 + arch/arm/mm/dma-mapping.c | 3 +- a

[PATCH 2/2] arm64: avoid increasing DMA masks above what hardware supports

2017-01-11 Thread Nikita Yushchenko
There are cases when device supports wide DMA addresses wider than device's connection supports. In this case driver sets DMA mask based on knowledge of device capabilities. That must succeed to allow drivers to initialize. However, swiotlb or iommu still need knowledge about actual device capabi

Re: [PATCH v2] arm64: do not set dma masks that device connection can't handle

2017-01-11 Thread Robin Murphy
looked Linux simply ignores all but the last one in that case - which can't be combined into a simple bitmask, so I'm not entirely sure where to go from there. Especially as so far it seems to be a problem exclusive to one not-widely-available ageing early-access development platform... It

Re: [PATCH v2] arm64: do not set dma masks that device connection can't handle

2017-01-11 Thread Arnd Bergmann
On Wednesday, January 11, 2017 3:37:22 PM CET Nikita Yushchenko wrote: > > I actually have a third variation of this problem involving a PCI root > > complex which *could* drive full-width (40-bit) addresses, but won't, > > due to the way its PCI<->AXI interface is programmed. That would require >

Re: [PATCH v2] arm64: do not set dma masks that device connection can't handle

2017-01-11 Thread Nikita Yushchenko
> I actually have a third variation of this problem involving a PCI root > complex which *could* drive full-width (40-bit) addresses, but won't, > due to the way its PCI<->AXI interface is programmed. That would require > even more complicated dma-ranges handling to describe the windows of > valid

  1   2   >