[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230319220008.2138576-10-rppt@kernel.org>
Date: Mon, 20 Mar 2023 00:00:02 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: David Hildenbrand <david@...hat.com>,
Matthew Wilcox <willy@...radead.org>,
Mel Gorman <mgorman@...e.de>, Michal Hocko <mhocko@...nel.org>,
Mike Rapoport <rppt@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Vlastimil Babka <vbabka@...e.cz>, linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org, linux-mm@...ck.org
Subject: [PATCH 09/15] mm: move pgtable_init() to mm/mm_init.c and make it static
From: "Mike Rapoport (IBM)" <rppt@...nel.org>
pgtable_init() is only called from mm_core_init().
Move it close to the caller and make it static.
Signed-off-by: Mike Rapoport (IBM) <rppt@...nel.org>
---
include/linux/mm.h | 6 ------
mm/mm_init.c | 6 ++++++
2 files changed, 6 insertions(+), 6 deletions(-)
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)
{
--
2.35.1
Powered by blists - more mailing lists