ARM_LPAE + VMSPLIT_2G cause swiotlb warning on Raspberry Pi 4

Russell King (Oracle) linux at armlinux.org.uk
Wed May 17 04:06:35 PDT 2023


On Wed, May 17, 2023 at 12:54:30PM +0200, Arnd Bergmann wrote:
> On Wed, May 17, 2023, at 12:34, Arnd Bergmann wrote:
> > On Wed, May 17, 2023, at 12:24, Stefan Wahren wrote:
> >> Am 17.05.23 um 12:06 schrieb Robin Murphy:
> >>> On 2023-05-17 07:23, Stefan Wahren wrote:
> >
> > I think LPAE doesn't affect it, the configurations that Stefan
> > mentioned were LPAE with VMSPLIT_2G (broken), non-LPAE with
> > VMSPLIT_3G (works) and LPAE with VMSPLIT_3G (works). I would assume
> > that non-LPAE with VMSPLIT_2G or VMSPLIT_3G_OPT is also broken.
> >
> >> This one?
> >> [    0.000000] software IO TLB: area num 4.
> >> [    0.000000] software IO TLB: mapped [mem 
> >> 0x0000000069e7f000-0x000000006de7f000] (64MB)
> >
> > Indeed, that is clearly above the .dma_zone_size value from
> > the machine descriptor.
> 
> It looks like Arm does not set the ARCH_LOW_ADDRESS_LIMIT
> constant for swiotlb, so it gets the default 4GB maximum.
> 
> I think this would work on arm, though it's probably not the
> correct fix in general, as I think MAX_DMA_ADDRESS is meant
> to refer to the ISA_DMA_API limit, not the ZONE_DMA limit.:

MAX_DMA_ADDRESS is a _virtual_ address. What is ARCH_LOW_ADDRESS_LIMIT?

I can find no reference to this in obvious places (mm/ lib/ kernel/
drivers/base/ drivers/iommu/)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list