Re: [PATCH 1/2] ARM: dts: bcm2711: force CMA into first GB of memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/4/19 9:09 AM, Stefan Wahren wrote:

[snip]

>> +	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 the Raspberry Pi 4 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;
>> +		};
>> +	};
>> +
> 
> i think this is a SoC-specific issue not a board specifc one. Please
> move this to bcm2711.dtsi

This sounds like a possibly fragile solution if someone changes
CONFIG_CMA_SIZE_MBYTES to a value greater than 32MB no?

I know we don't want machine descriptors for ARM64 kernels, but since
there is already a specific 2711 machine compatible string check, maybe
you could use that as well for determining whether arm64_dma_phys_limit
or arm64_dma32_phys_limit should be chosen?
-- 
Florian



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux