Re: [PATCH 06/11] x86: drop SWIOTLB and PHYS_ADDR_T_64BIT for PAE

From: Andy Shevchenko
Date: Wed Dec 04 2024 - 13:42:24 EST


On Wed, Dec 4, 2024 at 12:31 PM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
>
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Since kernels with and without CONFIG_X86_PAE are now limited
> to the low 4GB of physical address space, there is no need to
> use either swiotlb or 64-bit phys_addr_t any more, so stop
> selecting these and fix up the build warnings from that.

...

> mtrr_type_lookup(addr, addr + PMD_SIZE, &uniform);
> if (!uniform) {
> pr_warn_once("%s: Cannot satisfy [mem %#010llx-%#010llx] with a huge-page mapping due to MTRR override.\n",
> - __func__, addr, addr + PMD_SIZE);
> + __func__, (u64)addr, (u64)addr + PMD_SIZE);

Instead of castings I would rather:
1) have addr and size (? does above have off-by-one error?) or end;
2) use struct resource / range with the respective %p[Rr][a] specifier
or use %pa.



--
With Best Regards,
Andy Shevchenko