Re: [PATCH] mm: Replace (20 - PAGE_SHIFT) with common macros for pages<->MB conversion

From: Matthew Wilcox
Date: Fri Jul 18 2025 - 10:31:39 EST


On Fri, Jul 18, 2025 at 10:57:36AM +0100, Lorenzo Stoakes wrote:
> NOte I see arch/x86/include/asm/pgtable.h has a pages_to_mb() static inline
> declaration, but probably being an asm include can't ref mm.h so meh not a big
> deal.

Should probably go to linux/sizes.h, except that it uses PAGE_SIZE which
isn't available there. But asm-generic/getorder.h might be a good place
for it.

(hm, is including getorder.h safe by itself? looks like it relies on
something else to bring in the definition of PAGE_SHIFT)