On Thu, 2019-10-31 at 16:47 +0100, Christoph Hellwig wrote: > On Thu, Oct 31, 2019 at 04:28:37PM +0100, Nicolas Saenz Julienne wrote: > > Some architectures, notably ARM, are interested in tweaking this > > depending on their runtime DMA addressing limitations. > > > > Signed-off-by: Nicolas Saenz Julienne > > --- > > > > Changes since RFC: > > - Rebased to v5.4-rc6, fixed arm64 code. > > > > NOTE: This will only apply to linux-next, where > > missing end of the sentence. But only applying to linux-next isn't > going to help anyone.. Arrgh, excuse me, I meant to delete that line. > > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > > index 45c00a54909c..f716ea634804 100644 > > --- a/arch/arm64/mm/init.c > > +++ b/arch/arm64/mm/init.c > > @@ -20,6 +20,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -41,6 +42,8 @@ > > #include > > #include > > > > +#define ARM64_ZONE_DMA_BITS 30 > > + > > /* > > * We need to be able to catch inadvertent references to memstart_addr > > * that occur (potentially in generic code) before arm64_memblock_init() > > @@ -424,6 +427,8 @@ void __init arm64_memblock_init(void) > > else > > arm64_dma_phys_limit = PHYS_MASK + 1; > > > > + zone_dma_bits = ARM64_ZONE_DMA_BITS; > > + > > reserve_crashkernel(); > > This actually adds a new limit, as there wasn't one before for arm64. Well, as zone_dma_bits is only relevant in dma/direct when ZONE_DMA is defined I figured it doesn't matter if the variable is set conditionally to ZONE_DMA or not.