Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp879940pxf; Wed, 7 Apr 2021 14:01:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfthqL/8MqcrmfgG0ykQ+Kk0Ce1NsfeW8AypJCGXPXlevvU+n6RvbW6maxUTip0YeuqwKS X-Received: by 2002:a92:ad11:: with SMTP id w17mr3909550ilh.199.1617829276187; Wed, 07 Apr 2021 14:01:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617829276; cv=none; d=google.com; s=arc-20160816; b=YkZCHBZMZ6OWe0VmMx3KuL0VMl6LYQZOuPQUFk2mtHMun9h4dSHibF2wp0MgUyE2As ZcRKJcT7WgmVH8YsmXTnqZyvG0SLpaqFYFN4kGHdSarkRsvfg4T/PIL+A4BCsfwlf6vl FUa8hYXCHF0Gmg1Pal8EB8VNnN62vN+5NA4xR0dKnsEXHl7/phMcGDg+4oRy9vOwj/yJ 6xR5jWd6FZMUXOKgwq7KvHEjq/entLyk5TEpWofg72Zhhq27Cn7O+ZIkjqJX9dTGEiOq 6pXMv7KtQf5YWZeLK58nChS+8Z9WPI5/lkTLb4YCAPtEK5XAPUh3ZJHbSi0vY7A1mzMM cJAQ== 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=79R21Kn0jzgSCGdukgPRyGgG02S6Pi/orIlQeqwP4Ak=; b=yxepETg3TvMnmYFGBtfNS8rgvGIbss11uVkCSt1gCQp0B1aqgv7065DlcsX2kfePtx D+uwlqn0KV7QCfj9e9KQ1tLusqT67ueBdGra0EY0gg39cx6H1STAIaTTGBBjL5C8Ug6d p00MmcfQ4bmYYLi10SmaOtqj88RLGyX7W1uu82X/fe+UgzXRAd59t1LxVsKLb/kl1K5L 4ou5+E19zaUORF/VfwQdAgq49Q2LgeLDEZJoFMSDF0RsGBgic6l8Rtq4RmrY2VyiJRgk dIcOFKdCI6FR8DXukzx2qp8E98mzTqv+tdaXN2bUd2nQPNTNVcJUsPxuf1q1X0VQlDZN WHKA== 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 c1si21521470jam.95.2021.04.07.14.01.03; Wed, 07 Apr 2021 14:01:16 -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 S234200AbhDGNsB (ORCPT + 99 others); Wed, 7 Apr 2021 09:48:01 -0400 Received: from foss.arm.com ([217.140.110.172]:57462 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233758AbhDGNsA (ORCPT ); Wed, 7 Apr 2021 09:48:00 -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 29C521063; Wed, 7 Apr 2021 06:47:51 -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 504F33F792; Wed, 7 Apr 2021 06:47:50 -0700 (PDT) Subject: Re: [PATCH v2] arm64: Add __init section marker to some functions To: Jisheng Zhang , Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210330135449.4dcffd7f@xhacker.debian> From: Steven Price Message-ID: Date: Wed, 7 Apr 2021 14:48:00 +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: <20210330135449.4dcffd7f@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 06:54, 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 > --- > Since v1: > - add __init section mark to __vdso_init() and __aarch32_alloc_vdso_pages() > > arch/arm64/include/asm/ptdump.h | 2 +- > arch/arm64/kernel/vdso.c | 4 ++-- > arch/arm64/mm/ptdump.c | 4 ++-- > arch/arm64/mm/ptdump_debugfs.c | 2 +- > 4 files changed, 6 insertions(+), 6 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/kernel/vdso.c b/arch/arm64/kernel/vdso.c > index cee5d04ea9ad..d1fa288518a7 100644 > --- a/arch/arm64/kernel/vdso.c > +++ b/arch/arm64/kernel/vdso.c > @@ -86,7 +86,7 @@ static int vdso_mremap(const struct vm_special_mapping *sm, > return 0; > } > > -static int __vdso_init(enum vdso_abi abi) > +static int __init __vdso_init(enum vdso_abi abi) > { > int i; > struct page **vdso_pagelist; > @@ -326,7 +326,7 @@ static int aarch32_alloc_sigpage(void) > return 0; > } > > -static int __aarch32_alloc_vdso_pages(void) > +static int __init __aarch32_alloc_vdso_pages(void) > { > > if (!IS_ENABLED(CONFIG_COMPAT_VDSO)) > 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); > } >