Files
linux/arch/csky/include/asm
Kevin Brodsky a9b3c355c2 asm-generic: pgalloc: provide generic __pgd_{alloc,free}
We already have a generic implementation of alloc/free up to P4D level, as
well as pgd_free().  Let's finish the work and add a generic PGD-level
alloc helper as well.

Unlike at lower levels, almost all architectures need some specific magic
at PGD level (typically initialising PGD entries), so introducing a
generic pgd_alloc() isn't worth it.  Instead we introduce two new helpers,
__pgd_alloc() and __pgd_free(), and make use of them in the arch-specific
pgd_alloc() and pgd_free() wherever possible.  To accommodate as many arch
as possible, __pgd_alloc() takes a page allocation order.

Because pagetable_alloc() allocates zeroed pages, explicit zeroing in
pgd_alloc() becomes redundant and we can get rid of it.  Some trivial
implementations of pgd_free() also become unnecessary once __pgd_alloc()
is used; remove them.

Another small improvement is consistent accounting of PGD pages by using
GFP_PGTABLE_{USER,KERNEL} as appropriate.

Not all PGD allocations can be handled by the generic helpers.  In
particular, multiple architectures allocate PGDs from a kmem_cache, and
those PGDs may not be page-sized.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Kevin Brodsky <[email protected]>
Acked-by: Dave Hansen <[email protected]>
Acked-by: Qi Zheng <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Mike Rapoport (Microsoft) <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ryan Roberts <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Will Deacon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2025-01-25 20:22:24 -08:00
..
2021-02-27 22:04:14 +08:00
2021-04-20 09:58:29 +08:00
2021-02-27 22:04:14 +08:00
2021-02-27 22:04:14 +08:00
2021-02-27 22:04:14 +08:00
2024-05-11 07:07:07 -07:00
2021-02-27 22:04:14 +08:00
2021-02-27 22:04:14 +08:00
2021-01-12 09:52:40 +08:00
2021-02-27 22:04:14 +08:00
2024-10-28 21:44:29 +00:00
2024-11-07 14:25:15 -08:00
2021-02-27 22:04:14 +08:00
2021-02-27 22:04:14 +08:00
2022-07-22 17:34:57 -05:00
2021-02-27 22:04:14 +08:00
2020-04-03 11:14:17 +08:00
…
2021-02-27 22:04:14 +08:00
2022-07-31 05:24:42 -04:00
2022-07-31 05:24:42 -04:00
2021-02-27 22:04:14 +08:00
2021-02-27 22:04:14 +08:00
2021-02-27 22:04:14 +08:00
2022-02-25 09:36:06 +01:00
2022-07-21 10:50:13 -07:00
2021-02-27 22:04:14 +08:00
2023-11-23 11:32:32 +01:00
2022-02-25 09:36:06 +01:00
2020-04-03 11:37:51 +08:00
2024-02-20 20:56:00 +01:00
…