Re: [PATCH] dma/pool: do not complain if DMA pool is not allocated

Christoph Hellwig
2022-08-11T07:30:25Z

> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 5aa4c2ecf5c7..93af781f9445 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2761,7 +2761,6 @@ config ISA_BUS
> # x86_64 have no ISA slots, but can have ISA-style DMA.
> config ISA_DMA_API
> bool "ISA-style DMA support" if (X86_64 && EXPERT)
> - default y

This looks sensible to me, but you'll have to get it past Linus.

> -#ifdef CONFIG_ZONE_DMA
> +#if defined(CONFIG_ZONE_DMA) && defined(CONFIG_ISA_DMA_API)
> max_zone_pfns[ZONE_DMA] = min(MAX_DMA_PFN, max_low_pfn);
> +#else
> + max_zone_pfns[ZONE_DMA] = min(MAX_DMA32_PFN, max_low_pfn);
> #endif

But this simply can't work at all.