From patchwork Tue Mar 30 03:16:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 12171559 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EDC8C433DB for ; Tue, 30 Mar 2021 03:21:17 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 251EC619B4 for ; Tue, 30 Mar 2021 03:21:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 251EC619B4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=synaptics.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=mSNdtKr2ZJ3zYW7dx/LosVNFl9HIjYWsZ9SI4ByaM20=; b=iOrjTkm/szaG7TF3D0pr4gzpfb /yWMoOMg80hggM+LMqqCb40nIj++kR7MxH9xKR4XdR6xFDlKeYv/NLZspMdxxPWbRYUPBmBs96qUi xt7RBvUF/S0lOpsEmwnts/PbRuP1qZ2JIVZr/WFWs+8fjH9XVuw+3eACsQnWa+oVvKxsTRXEzcp4O fYyo+yIMzqubtXbtyijcNtbQ17fSbYNU8gcJYXNpDPtDrCSB5Nnc24pDJG9M24pnERJGOE/ttiVei tS/BUa89l5YdrYLR3wJxtMSqcTfJ4YEq+jWRAb1cZwKn59UfBBLE5YJAZ/5S3YpumHtzv4w/dIrra sirceE7w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lR4ts-002Xro-4e; Tue, 30 Mar 2021 03:18:40 +0000 Received: from mail-mw2nam10on2067.outbound.protection.outlook.com ([40.107.94.67] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lR4sZ-002Xk3-Pf for linux-arm-kernel@lists.infradead.org; Tue, 30 Mar 2021 03:17:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cGSqhqjSAmm8Mwc3dskniQl8cUn1N3ArJwRuZZl472wgpa7S4NVt5lF5tWf+qesBx8v2tYxoGXzaIxlc4WG/nYMIKID8zojIYmbChVKJ+OL7bkgQQw9Afn+CWXLcGQy/90mVIUINT3rHUlmpjBv1ay2mG2G1GRW1nLii+rL1/WXc1rHNdsG6r7rJor56jQl97qbvfUjwKSPITi2X5kWRvmcD+3PDo0Sg8MUv2bR/IviCTk836xJWfaJpgjMIGvTohInQb/F+k6rmPBs88p+VWyQGVqsN//1DXV1I7xc704p55C4RdieDJsGb13D9Q5MYfgErwoEBKEiUUk0t/QrtRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l8wYgVxOMsdKY/wUJSmQujdFb0Co4UskCx9LwUeZFFY=; b=YNg6HQmVsA9kcGI1qiBfx7scEeUoYdObG6+fC0kc/g5nbPP3TTeBBu2d8HcGLgKWgWynNAvui8Ro5WP0JpP/4Q+HizDKfZfk95yCUS/P0EdrppQ3WCDebmkWKZ2/zFm+bxNeHWc8M8qFWjQx8HHDcb20LXQulqIRsB4EjwHv5QJka844otvjij6ybFQR4iKOFrQDv4JHffki19XGwEX21FENyrPU7tgeJuxW+pPcJ/9xuENkisA9bWiD9KQZwyEhK9Jgrs/y/rGhElygKpEn2u/7y2HBhb+63hKAoAt8OlQI1DOZ5n75FUULjyXIc6pjIReQNgPvNR/QBHrJHDOkYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synaptics.com; dmarc=pass action=none header.from=synaptics.com; dkim=pass header.d=synaptics.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector2-Synaptics-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l8wYgVxOMsdKY/wUJSmQujdFb0Co4UskCx9LwUeZFFY=; b=TluParY/Bj5MJWH/+UHeP1V6VdtTC7UHLyhvCI7m40HcOWw+UDdhXie6hg3NxMsAKXrcVUzIs16oQWgcWTDYOgcKGaYPPLIvS1Ni+u9hv4AY2Fc+joA0Sjg0BEXI63Hk1lmEaWr6Ciy6mRNZqcYyr/g85c9Z230WlH7R3jlbdJU= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=synaptics.com; Received: from BY5PR03MB5345.namprd03.prod.outlook.com (2603:10b6:a03:219::16) by BYAPR03MB3989.namprd03.prod.outlook.com (2603:10b6:a03:7c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.29; Tue, 30 Mar 2021 03:17:02 +0000 Received: from BY5PR03MB5345.namprd03.prod.outlook.com ([fe80::8569:341f:4bc6:5b72]) by BY5PR03MB5345.namprd03.prod.outlook.com ([fe80::8569:341f:4bc6:5b72%9]) with mapi id 15.20.3977.033; Tue, 30 Mar 2021 03:17:02 +0000 Date: Tue, 30 Mar 2021 11:16:51 +0800 From: Jisheng Zhang To: Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: mm: ptdump: Add __init section marker to three functions Message-ID: <20210330111651.5636eea2@xhacker.debian> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) X-Originating-IP: [192.147.44.204] X-ClientProxiedBy: BY5PR16CA0029.namprd16.prod.outlook.com (2603:10b6:a03:1a0::42) To BY5PR03MB5345.namprd03.prod.outlook.com (2603:10b6:a03:219::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xhacker.debian (192.147.44.204) by BY5PR16CA0029.namprd16.prod.outlook.com (2603:10b6:a03:1a0::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.24 via Frontend Transport; Tue, 30 Mar 2021 03:17:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 872a68e6-d0b8-41ba-2726-08d8f32a49a1 X-MS-TrafficTypeDiagnostic: BYAPR03MB3989: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:133; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PIRqpwNpn7tv0EG+Oe+H0FVf586YmkXg5ypZaV9D4jZv2aTwZSeJcAwMB5IFH7TDI5gTk/Y1gbx76wLqs02PpgIPRz0iOG3JOxqfch7EzmcThOEu5HrNk/T9UxuH5Z5l5ebP8SDc3+LB+RrxQj5DrMkkBSAD5QbdESbP7R/wuJtnoHbsZruJvFjA/6bBI6XyI1pV0Hqd6QlS5Bhr24FdxGSSeHk/ChTCVEuyz1tG5Qj5fC8H6o8mxdDqMoiBjEfFBP/6hBq8Rtix1dfzowAN8MoRA2urKp3u3OQ79BC5DYpaFvIQjk7lEbU0WvVMRellylPqkbwB5AJxzsLwZlYUwM3p+Gk3P56sdGVm6zQOYjifqeteqb24krb/HCX1HuODSy8xIkCYSzfgSNlgu1nLko6SsBZQuddDA7VMQCq+6RQ5Wa+U5tdIQKaBMezT9XyX8Y/iPIN8fuwlzA7jjK0k/rnccPOZP8T5CFLRAzIuv/sy2EeEcsbgfBe673cf9cERE4pYP6nthvgkHHMIIPckuAT03m2NNPvZ/PFMysX2uy8CYp1wTXoKq9JMPqxxkSEpFWNukL39v2Z1FhB0wIbamQdDoiBoYyp63hUOfmOdrr/CWvVXvMs47S+ORq/4WwFOGucaJMreVNtG75itiS+IvA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR03MB5345.namprd03.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(366004)(39860400002)(136003)(376002)(396003)(186003)(26005)(2906002)(4326008)(956004)(52116002)(16526019)(9686003)(55016002)(83380400001)(478600001)(66946007)(5660300002)(1076003)(6506007)(66556008)(66476007)(86362001)(6666004)(110136005)(7696005)(8936002)(8676002)(316002)(38100700001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: t381HMqHR/hRS5IrAOYiUSyogsXypSMmYv5E4azZ7AAftmSe/JSJiFO8zh9LkgdCE6BI17DLHAnCSv5vuNZUt/cW/yFWD6I95VuwS7RBGlusmkx7nB2rV5D2UVuZREmNt7hRGgbU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2/qZU73/FJLFeazyXTrgHVCAnTbmtQ8OUdn0t7rlIvZR5DpsU4RrwMEmKt9sNhe6Z0Z7WlsS7qqwULrLtTJnSkvl1uPLF78sMiwx+fV8LvJgz/w1d X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: 872a68e6-d0b8-41ba-2726-08d8f32a49a1 X-MS-Exchange-CrossTenant-AuthSource: BY5PR03MB5345.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2021 03:17:02.4305 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PwahYUjXSp0/LMd22W1e4BRLchT0TQv/35/v/Tp+ecYMYgljFAg0px7nFM0KLC1C8fXjJXVcAY8u2sAbB5tfvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR03MB3989 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210330_041722_896886_203984D4 X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org They are not needed after booting, so mark them as __init to move them to the .init section. Signed-off-by: Jisheng Zhang --- arch/arm64/include/asm/ptdump.h | 2 +- arch/arm64/mm/ptdump.c | 4 ++-- arch/arm64/mm/ptdump_debugfs.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/ptdump.h b/arch/arm64/include/asm/ptdump.h index 38187f74e089..b1dd7ecff7ef 100644 --- a/arch/arm64/include/asm/ptdump.h +++ b/arch/arm64/include/asm/ptdump.h @@ -23,7 +23,7 @@ struct ptdump_info { void ptdump_walk(struct seq_file *s, struct ptdump_info *info); #ifdef CONFIG_PTDUMP_DEBUGFS -void ptdump_debugfs_register(struct ptdump_info *info, const char *name); +void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name); #else static inline void ptdump_debugfs_register(struct ptdump_info *info, const char *name) { } diff --git a/arch/arm64/mm/ptdump.c b/arch/arm64/mm/ptdump.c index 0e050d76b83a..a50e92ea1878 100644 --- a/arch/arm64/mm/ptdump.c +++ b/arch/arm64/mm/ptdump.c @@ -337,7 +337,7 @@ void ptdump_walk(struct seq_file *s, struct ptdump_info *info) ptdump_walk_pgd(&st.ptdump, info->mm, NULL); } -static void ptdump_initialize(void) +static void __init ptdump_initialize(void) { unsigned i, j; @@ -381,7 +381,7 @@ void ptdump_check_wx(void) pr_info("Checked W+X mappings: passed, no W+X pages found\n"); } -static int ptdump_init(void) +static int __init ptdump_init(void) { address_markers[PAGE_END_NR].start_address = PAGE_END; #if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS) diff --git a/arch/arm64/mm/ptdump_debugfs.c b/arch/arm64/mm/ptdump_debugfs.c index d29d722ec3ec..68bf1a125502 100644 --- a/arch/arm64/mm/ptdump_debugfs.c +++ b/arch/arm64/mm/ptdump_debugfs.c @@ -16,7 +16,7 @@ static int ptdump_show(struct seq_file *m, void *v) } DEFINE_SHOW_ATTRIBUTE(ptdump); -void ptdump_debugfs_register(struct ptdump_info *info, const char *name) +void __init ptdump_debugfs_register(struct ptdump_info *info, const char *name) { debugfs_create_file(name, 0400, NULL, info, &ptdump_fops); }