[PATCH 6/7] ARM: use the common dma_to_phys/phys_to_dma implementation where possible
Arnd Bergmann
arnd at kernel.org
Thu Apr 21 01:05:11 PDT 2022
On Thu, Apr 21, 2022 at 9:42 AM Christoph Hellwig <hch at lst.de> wrote:
>
> Only the footbridge platforms provide their own DMA address translation
> helpers, so switch to the generic version for all other platforms, and
> consolidate the footbridge implementation to remove two levels of
> indirection.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
Reviewed-by: Arnd Bergmann <arnd at arndb.de>
> ---
> @@ -335,17 +336,19 @@ unsigned long __bus_to_virt(unsigned long res)
> return res;
> }
> EXPORT_SYMBOL(__bus_to_virt);
> -
> -unsigned long __pfn_to_bus(unsigned long pfn)
> +#else
> +static inline unsigned long fb_bus_sdram_offset(void)
> {
> - return __pfn_to_phys(pfn) + (fb_bus_sdram_offset() - PHYS_OFFSET);
> + return BUS_OFFSET;
> }
> -EXPORT_SYMBOL(__pfn_to_bus);
> +#endif /* CONFIG_FOOTBRIDGE_ADDIN */
I have an older patch to remove CONFIG_FOOTBRIDGE_ADDIN
completely, as it does a couple of other nasty things and there are
apparently no users. Would that help here?
Arnd
More information about the linux-arm-kernel
mailing list