From mboxrd@z Thu Jan 1 00:00:00 1970 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.3 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,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 D9710C433B4 for ; Wed, 7 Apr 2021 13:52:33 +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 5EAAE61363 for ; Wed, 7 Apr 2021 13:52:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EAAE61363 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XwBpl9aXpdCNZGLed2i02aSBE1BdJgVN0Pr/ZBpujig=; b=ZfcHSx94wsSTMj2M+dHLN9GXs eovi9HBICHTNISe4havkJgOiwcwWh79QJ0JfoyTbyukC2ALrrj3z7pZil9sYbMBu3gH2UMgmCDQbF 9vjvGS2o4y+MKOylagbZEpsUkLrlAiSeHvHGPzVy0744O2t3kopYyzhENeheli2kWF6ntSweuQPTO adYQ9JM+YzDogr2B+uNi2SvGnBr5lpy6EOxX7yWFPM7kHM3VpTo4Q7alxGrKD/bHvlDq6J1Bcxkmj dWD73I/o4COYLOaRo2yiiHKNy1fpbryPvXw0WN/TroqPKOdgW7z0meMV69Fs+vxr3arL/EKGwp2Ya r0KrK1Zdg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lU8ZG-0054Lt-Em; Wed, 07 Apr 2021 13:50:04 +0000 Received: from foss.arm.com ([217.140.110.172]) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lU8XC-0054Gs-FZ for linux-arm-kernel@lists.infradead.org; Wed, 07 Apr 2021 13:49:57 +0000 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-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210407_144956_075816_256EC90F X-CRM114-Status: GOOD ( 19.95 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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); > } > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel