Message ID | 20230319220008.2138576-10-rppt@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | mm: move core MM initialization to mm/mm_init.c | expand |
On 19.03.23 23:00, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" <rppt@kernel.org> > > pgtable_init() is only called from mm_core_init(). > > Move it close to the caller and make it static. Why not inline it completely into the single caller? I don't see too much value of this indirection.
diff --git a/include/linux/mm.h b/include/linux/mm.h index 2d7f095136fc..c3c67d8bc833 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2782,12 +2782,6 @@ static inline bool ptlock_init(struct page *page) { return true; } static inline void ptlock_free(struct page *page) {} #endif /* USE_SPLIT_PTE_PTLOCKS */ -static inline void pgtable_init(void) -{ - ptlock_cache_init(); - pgtable_cache_init(); -} - static inline bool pgtable_pte_page_ctor(struct page *page) { if (!ptlock_init(page)) diff --git a/mm/mm_init.c b/mm/mm_init.c index 1da48762e4a2..a91fbb57c4cc 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -2511,6 +2511,12 @@ void __init memblock_free_pages(struct page *page, unsigned long pfn, __free_pages_core(page, order); } +static void __init pgtable_init(void) +{ + ptlock_cache_init(); + pgtable_cache_init(); +} + /* Report memory auto-initialization states for this boot. */ static void __init report_meminit(void) {