Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp879951pxf; Wed, 7 Apr 2021 14:01:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyTuLaZXUPDC/eLDfgOZWpYt9Yt3do86zjpB1PFkCJUjez8y9I2keuzRTfL8FsQkxFKcH9 X-Received: by 2002:a05:6638:3a8:: with SMTP id z8mr5440514jap.111.1617829277026; Wed, 07 Apr 2021 14:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617829277; cv=none; d=google.com; s=arc-20160816; b=ZdT67ZQf1jqEOXghttPonIgXWle/rFW/A6RdsH+67Cy+unuMsWWDJ5O3A6lb9yJNLA rd4a9s2rfety2ZeBD/Pg/JAxyBvb5N8FGHjFju6Q9+pnYtp/X4H3hxExpAlsdETDj/rz jWvj5qIDEsPumc3v6+01RechUBT2cnOaJNSiaRK3uWlE4rWDiKN5pvtvZls6nscPLRwW 1j4ml+lnMekMUcG0UnEyRctIrgUnhYdK5CLudS8eSgHT8u1Se7YRbeTmaYt6thFybh2c WUrGENbiPmt6yJEkp/v0zArKJCn++IMldCO5ND8o1EpxN89keDOMYUD0gbI4KUoP4s+A uB0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=IRm74YIrdITvluakf63/6WrFBaSvmcSt8ZioewDfJws=; b=OV7io+mphktpfg0NSqEnwJf4LUvFeYyVlHabpNBm0f3W8dr9a3YAWFuRRUDyg4jv38 0u+q0N1vDBTZGPVycx1g+hYOEMbN1FjspUQ8jM1m7H3yte/pmB9y5LGHzvwB2VNKkcQP 8IJZkxEkOnDSSATQjv//MJxKSpPP7CvYFipO9wpbOOxNAj5zKeAmHXyJExsVeXeI6jMa XwtRV4xGWmRAHc94ggImMfjhuDsO6NejP8yPVdhBqY57gCNL6XCjrflKJrMyJJFKh04C KlSRh6oDXfD0M2vaf4WmbtKFu9P/LWVk126tbzI10aPX6EX4Ic8un0PZoXBLhJqkuymf 2/Dw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g15si13519070ilf.145.2021.04.07.14.01.04; Wed, 07 Apr 2021 14:01:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234318AbhDGNsD (ORCPT + 99 others); Wed, 7 Apr 2021 09:48:03 -0400 Received: from foss.arm.com ([217.140.110.172]:57474 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241716AbhDGNsD (ORCPT ); Wed, 7 Apr 2021 09:48:03 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 71AEF106F; Wed, 7 Apr 2021 06:47:53 -0700 (PDT) Received: from [192.168.1.179] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 815D83F792; Wed, 7 Apr 2021 06:47:52 -0700 (PDT) Subject: Re: [PATCH] arm: ptdump: add __init section marker to three functions To: Jisheng Zhang , Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210330111922.2fb4eaa4@xhacker.debian> From: Steven Price Message-ID: <5893767f-4103-3668-0810-3a0a66dc1c9e@arm.com> Date: Wed, 7 Apr 2021 14:48:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210330111922.2fb4eaa4@xhacker.debian> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/03/2021 04:19, Jisheng Zhang wrote: > They are not needed after booting, so mark them as __init to move them > to the .init section. > > Signed-off-by: Jisheng Zhang Reviewed-by: Steven Price > --- > arch/arm/mm/dump.c | 4 ++-- > arch/arm/mm/ptdump_debugfs.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/arm/mm/dump.c b/arch/arm/mm/dump.c > index 93ff0097f00b..fb688003d156 100644 > --- a/arch/arm/mm/dump.c > +++ b/arch/arm/mm/dump.c > @@ -420,7 +420,7 @@ void ptdump_walk_pgd(struct seq_file *m, struct ptdump_info *info) > note_page(&st, 0, 0, 0, NULL); > } > > -static void ptdump_initialize(void) > +static void __init ptdump_initialize(void) > { > unsigned i, j; > > @@ -466,7 +466,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) > { > ptdump_initialize(); > ptdump_debugfs_register(&kernel_ptdump_info, "kernel_page_tables"); > diff --git a/arch/arm/mm/ptdump_debugfs.c b/arch/arm/mm/ptdump_debugfs.c > index 598b636615a2..8df9afac8d81 100644 > --- a/arch/arm/mm/ptdump_debugfs.c > +++ b/arch/arm/mm/ptdump_debugfs.c > @@ -24,7 +24,7 @@ static const struct file_operations ptdump_fops = { > .release = single_release, > }; > > -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); > } >