Message ID | 20191107095611.18429-2-nsaenzjulienne@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: Fix CMA/crashkernel reservation | expand |
Hi Nicolas, On Thu, Nov 07, 2019 at 10:56:10AM +0100, Nicolas Saenz Julienne wrote: > diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi > index ac83dac2e6ba..667658497898 100644 > --- a/arch/arm/boot/dts/bcm2711.dtsi > +++ b/arch/arm/boot/dts/bcm2711.dtsi > @@ -12,6 +12,26 @@ > > interrupt-parent = <&gicv2>; > > + reserved-memory { > + #address-cells = <2>; > + #size-cells = <1>; > + ranges; > + > + /* > + * arm64 reserves the CMA by default somewhere in ZONE_DMA32, > + * that's not good enough for bcm2711 as some devices can > + * only address the lower 1G of memory (ZONE_DMA). > + */ > + linux,cma { > + compatible = "shared-dma-pool"; > + size = <0x2000000>; /* 32MB */ > + alloc-ranges = <0x0 0x00000000 0x40000000>; > + reusable; > + linux,cma-default; > + }; > + }; > + > + > soc { > /* > * Defined ranges: Sorry, I just realised I can't merge this as it depends on a patch that's only in -next: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support"). I'll queue the second patch in the series to fix the regression introduces by the ZONE_DMA patches and, AFAICT, the dts update can be queued independently.
On 11/7/19 3:20 AM, Catalin Marinas wrote: > Hi Nicolas, > > On Thu, Nov 07, 2019 at 10:56:10AM +0100, Nicolas Saenz Julienne wrote: >> diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi >> index ac83dac2e6ba..667658497898 100644 >> --- a/arch/arm/boot/dts/bcm2711.dtsi >> +++ b/arch/arm/boot/dts/bcm2711.dtsi >> @@ -12,6 +12,26 @@ >> >> interrupt-parent = <&gicv2>; >> >> + reserved-memory { >> + #address-cells = <2>; >> + #size-cells = <1>; >> + ranges; >> + >> + /* >> + * arm64 reserves the CMA by default somewhere in ZONE_DMA32, >> + * that's not good enough for bcm2711 as some devices can >> + * only address the lower 1G of memory (ZONE_DMA). >> + */ >> + linux,cma { >> + compatible = "shared-dma-pool"; >> + size = <0x2000000>; /* 32MB */ >> + alloc-ranges = <0x0 0x00000000 0x40000000>; >> + reusable; >> + linux,cma-default; >> + }; >> + }; >> + >> + >> soc { >> /* >> * Defined ranges: > > Sorry, I just realised I can't merge this as it depends on a patch > that's only in -next: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi > 4 support"). > > I'll queue the second patch in the series to fix the regression > introduces by the ZONE_DMA patches and, AFAICT, the dts update can be > queued independently. I will take it directly, unless you have more stuff coming Stefan?
Am 07.11.19 um 18:59 schrieb Florian Fainelli: > On 11/7/19 3:20 AM, Catalin Marinas wrote: >> Hi Nicolas, ... >> Sorry, I just realised I can't merge this as it depends on a patch >> that's only in -next: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi >> 4 support"). >> >> I'll queue the second patch in the series to fix the regression >> introduces by the ZONE_DMA patches and, AFAICT, the dts update can be >> queued independently. > I will take it directly, unless you have more stuff coming Stefan? Please take. Thanks Stefan
On 11/7/19 11:09 AM, Stefan Wahren wrote: > > Am 07.11.19 um 18:59 schrieb Florian Fainelli: >> On 11/7/19 3:20 AM, Catalin Marinas wrote: >>> Hi Nicolas, > ... >>> Sorry, I just realised I can't merge this as it depends on a patch >>> that's only in -next: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi >>> 4 support"). >>> >>> I'll queue the second patch in the series to fix the regression >>> introduces by the ZONE_DMA patches and, AFAICT, the dts update can be >>> queued independently. >> I will take it directly, unless you have more stuff coming Stefan? > Please take. Thanks I picked up v2 because it had your explicit Acked-by tag, but amended in a similar way to what Nicolas did, except s/Raspberry Pi 4/BCM2711/: https://github.com/Broadcom/stblinux/commit/d98a8dbdaec628f5c993cc711ba9ab98fe909f0f neither of you will probably mind me having done that.
On Thu, 2019-11-14 at 12:35 -0800, Florian Fainelli wrote: > On 11/7/19 11:09 AM, Stefan Wahren wrote: > > Am 07.11.19 um 18:59 schrieb Florian Fainelli: > > > On 11/7/19 3:20 AM, Catalin Marinas wrote: > > > > Hi Nicolas, > > ... > > > > Sorry, I just realised I can't merge this as it depends on a patch > > > > that's only in -next: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi > > > > 4 support"). > > > > > > > > I'll queue the second patch in the series to fix the regression > > > > introduces by the ZONE_DMA patches and, AFAICT, the dts update can be > > > > queued independently. > > > I will take it directly, unless you have more stuff coming Stefan? > > Please take. Thanks > > I picked up v2 because it had your explicit Acked-by tag, but amended in > a similar way to what Nicolas did, except s/Raspberry Pi 4/BCM2711/: > > https://github.com/Broadcom/stblinux/commit/d98a8dbdaec628f5c993cc711ba9ab98fe909f0f > > neither of you will probably mind me having done that. All good, thanks!
diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index ac83dac2e6ba..667658497898 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -12,6 +12,26 @@ interrupt-parent = <&gicv2>; + reserved-memory { + #address-cells = <2>; + #size-cells = <1>; + ranges; + + /* + * arm64 reserves the CMA by default somewhere in ZONE_DMA32, + * that's not good enough for bcm2711 as some devices can + * only address the lower 1G of memory (ZONE_DMA). + */ + linux,cma { + compatible = "shared-dma-pool"; + size = <0x2000000>; /* 32MB */ + alloc-ranges = <0x0 0x00000000 0x40000000>; + reusable; + linux,cma-default; + }; + }; + + soc { /* * Defined ranges:
arm64 places the CMA in ZONE_DMA32, which is not good enough for the Raspberry Pi 4 since it contains peripherals that can only address the first GB of memory. Explicitly place the CMA into that area. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> --- Changes since v1: - Move into bcm2711.dtsi Changes since v1: - s/Raspberry Pi/bcm2711 arch/arm/boot/dts/bcm2711.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)