Commit 4cd1e9ed authored by Mike Rapoport (IBM)'s avatar Mike Rapoport (IBM) Committed by Andrew Morton

mm: call {ptlock,pgtable}_cache_init() directly from mm_core_init()

and drop pgtable_init() as it has no real value and its name is
misleading.

Link: https://lkml.kernel.org/r/20230321170513.2401534-9-rppt@kernel.orgSigned-off-by: default avatarMike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
Cc: Doug Berger <opendmb@gmail.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Sergei Shtylyov <sergei.shtylyov@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent b7ec1bf3
...@@ -2637,12 +2637,6 @@ static inline bool ptlock_init(struct page *page) { return true; } ...@@ -2637,12 +2637,6 @@ static inline bool ptlock_init(struct page *page) { return true; }
static inline void ptlock_free(struct page *page) {} static inline void ptlock_free(struct page *page) {}
#endif /* USE_SPLIT_PTE_PTLOCKS */ #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) static inline bool pgtable_pte_page_ctor(struct page *page)
{ {
if (!ptlock_init(page)) if (!ptlock_init(page))
......
...@@ -2584,7 +2584,8 @@ void __init mm_core_init(void) ...@@ -2584,7 +2584,8 @@ void __init mm_core_init(void)
*/ */
page_ext_init_flatmem_late(); page_ext_init_flatmem_late();
kmemleak_init(); kmemleak_init();
pgtable_init(); ptlock_cache_init();
pgtable_cache_init();
debug_objects_mem_init(); debug_objects_mem_init();
vmalloc_init(); vmalloc_init();
/* If no deferred init page_ext now, as vmap is fully initialized */ /* If no deferred init page_ext now, as vmap is fully initialized */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment