ARM_LPAE + VMSPLIT_2G cause swiotlb warning on Raspberry Pi 4

Arnd Bergmann arnd at arndb.de
Wed May 17 04:00:16 PDT 2023


On Wed, May 17, 2023, at 12:40, Stefan Wahren wrote:
> Am 17.05.23 um 09:37 schrieb Arnd Bergmann:
>> On Tue, May 16, 2023, at 22:46, Stefan Wahren wrote:

>> --- a/arch/arm/mm/mmu.c
>> +++ b/arch/arm/mm/mmu.c
>>   @@ -1783,7 +1783,7 @@ void __init paging_init(const struct machine_desc *mdesc)
>>          top_pmd = pmd_off_k(0xffff0000);
>>   
>>          /* allocate the zero page. */
>> -       zero_page = early_alloc(PAGE_SIZE);
>> +       zero_page = memblock_alloc_low(PAGE_SIZE, PAGE_SIZE);
>>   
>>          bootmem_init();
>>
>
> i tried this with ARM_LPAE + VMSPLIT_2G, but i don't see any changes. 
> The warnings are still there and the DMA driver still fails:

Ok. As I just found and wrote in my latest reply, memblock_alloc_low()
is also what gets used in the swiotlb code for the bounce buffer,
and the problem is the limit used in there.

Setting ARCH_LOW_ADDRESS_LIMIT to an appropriate value should
fix the swiotlb, and in combination with the patch above would
also mean that the swiotlb bounce is not needed for the zero
page.

     Arnd



More information about the linux-arm-kernel mailing list