From patchwork Sun Mar 19 22:00:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 13180638 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA09DC7618A for ; Sun, 19 Mar 2023 22:00:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 68CA690000C; Sun, 19 Mar 2023 18:00:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 616A4900002; Sun, 19 Mar 2023 18:00:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 48F6590000C; Sun, 19 Mar 2023 18:00:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 39D29900002 for ; Sun, 19 Mar 2023 18:00:58 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 004781203EB for ; Sun, 19 Mar 2023 22:00:57 +0000 (UTC) X-FDA: 80587018596.27.FD9FBE5 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf26.hostedemail.com (Postfix) with ESMTP id 38999140021 for ; Sun, 19 Mar 2023 22:00:56 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NyEJQwJp; spf=pass (imf26.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1679263256; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=IoX+IRqK+H09jdYfad/gWP6Mte+ccY5x17RdUvvK5zE=; b=Ig4aZkxUzSQqNeWOi7CF9FSSs6/iGbdlPejWazYGpUHsMAv9czrjcgAyynxBTEU77yldIX x2n81DW+CIKmN0YnAN7noBrpE/E9tUiUpB36vd/7YpSKEKA8NhwXT7Ll5Qqk0O8rYvBUR8 9Q5H/NRM2MX4GpCdoccUxRWK474r46s= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NyEJQwJp; spf=pass (imf26.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1679263256; a=rsa-sha256; cv=none; b=S3ls94gr4T3ea3romvHp2zJTCQ5Z7stDAPos7xO1U8FHpLDCrMHkotfReOrTdeMPKRYpFQ ilC+2S5r9urYyqnHA4xxHhBZvXMpraQcngHlpkq9NHSuN9TH3sChrZPob8O3i3fftfBFgs VubeG4QoIkXCZRIzj2ZaC7zR/8MhE2Q= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6CAE9611D3; Sun, 19 Mar 2023 22:00:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 396ADC4339C; Sun, 19 Mar 2023 22:00:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679263255; bh=Y2ZZ0QRBPTa6+gDvoBKxwGRBX0o95+AmHfq1WGe72cg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NyEJQwJpkU2SMv4Y3ZZ45lRC4TFwcsj5YD9lknG7TIGUO6XHl7Tsz5bSI+MiTUkVj CLIkYngq4kK29V2ziLnjs/6syWGxq+b5U+Zq0OqwNgyVx22M/GMBKXltpZ+pjGAH9W gZtDiEsLitP9aR+nNb8lJ0kk5Kdw7vqWjGaV1Wa6EmugEersPCV/IF8uZoCnloJ2OT GwOkl1T42rTo4uq0GPZVgA8gnWyneA5YN4+FIZRVcxYPr9bnrk33nluhaurvCn9GEa q77ullFT+nmwLLP+mQ8+DUqLF1x/kNgJNyy9+TLFNiIGWc4SwzeW8WtpoVr7210dDx 45oeEcYLogZJQ== From: Mike Rapoport To: Andrew Morton Cc: David Hildenbrand , Matthew Wilcox , Mel Gorman , Michal Hocko , Mike Rapoport , Thomas Bogendoerfer , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 09/15] mm: move pgtable_init() to mm/mm_init.c and make it static Date: Mon, 20 Mar 2023 00:00:02 +0200 Message-Id: <20230319220008.2138576-10-rppt@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230319220008.2138576-1-rppt@kernel.org> References: <20230319220008.2138576-1-rppt@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 38999140021 X-Stat-Signature: 3xck5n8f33mw8bgecsy78844s7wxzkkc X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1679263256-63518 X-HE-Meta: U2FsdGVkX1/EbcJRN2qwggfMH3V4Y0YKJO31F1Pu7cvbhxdOiCHPj+VW7HE5NGA8i+LTvmPhQfvdmRVUtIaO6y+Dt7JnY/p7XXerCZeC0Qo8o7M/vD5NECF5WdlmiGzEG4IusOqLZZVfOB2jqXXAVoGHmIVEYxPJJ/bG8okV97XZ+b2ceFx1EzN1S/MU8E/n6zLuTCG/uPqvEjyCOt6gkzsmLkomHj3lEEwlbNgPAV4SU5CM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JfEhbbO2fiXLmmSajG6J/RFQTc31JLmdxjp8MkM50xhGtTDNgLLrZB4kfEDYASWkns6dnPMGIVvgYPr+yQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: "Mike Rapoport (IBM)" 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) --- 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) {