From: Sudeep Holla <sudeep.holla@arm.com>
To: Gaku Inami <gaku.inami.xh@renesas.com>,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Cc: Sudeep Holla <sudeep.holla@arm.com>,
dietmar.eggemann@arm.com, juri.lelli@redhat.com,
psodagud@codeaurora.org
Subject: Re: [PATCH] Revert "base: arch_topology: fix section mismatch build warnings"
Date: Mon, 12 Feb 2018 12:28:41 +0000 [thread overview]
Message-ID: <cd046554-4155-6ed9-8378-fb9ef9e6f9d2@arm.com> (raw)
In-Reply-To: <1517992328-3559-1-git-send-email-gaku.inami.xh@renesas.com>
On 07/02/18 08:32, Gaku Inami wrote:
> This reverts commit 452562abb5b7 ("base: arch_topology: fix section
> mismatch build warnings"). It causes the notifier call hangs in some
> use-cases.
>
> In some cases with using maxcpus, some of cpus are booted first and
> then the remaining cpus are booted. As an example, some users who want
> to realize fast boot up often use the following procedure.
>
> 1) Define all CPUs on device tree (CA57x4 + CA53x4)
> 2) Add "maxcpus=4" in bootargs
> 3) Kernel boot up with CA57x4
> 4) After kernel boot up, CA53x4 is booted from user
>
> When kernel init was finished, CPUFREQ_POLICY_NOTIFIER was not still
> unregisterd. This means that "__init init_cpu_capacity_callback()"
> will be called after kernel init sequence. To avoid this problem,
> it needs to remove __init{,data} annotations by reverting this commit.
>
> Also, this commit was needed to fix kernel compile issue below.
> However, this issue was also fixed by another patch: commit 82d8ba717ccb
> ("arch_topology: Fix section miss match warning due to
> free_raw_capacity()") in v4.15 as well.
> Whereas commit 452562abb5b7 added all the missing __init annotations,
> commit 82d8ba717ccb removed it from free_raw_capacity().
>
Ah I see commit 82d8ba717ccb made the commit 452562abb5b7 redundant
by removing the __init. Both attempt to solve the same problem in
different ways :)
Can you please add the the tag, so that it gets picked up accordingly ?
Fixes: 82d8ba717ccb ("arch_topology: Fix section miss match warning due
to free_raw_capacity()")
FWIW,
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
> WARNING: vmlinux.o(.text+0x548f24): Section mismatch in reference
> from the function init_cpu_capacity_callback() to the variable
> .init.text:$x
> The function init_cpu_capacity_callback() references
> the variable __init $x.
> This is often because init_cpu_capacity_callback lacks a __init
> annotation or the annotation of $x is wrong.
>
> Signed-off-by: Gaku Inami <gaku.inami.xh@renesas.com>
> ---
> drivers/base/arch_topology.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> index 4de87b0..8bfd498 100644
> --- a/drivers/base/arch_topology.c
> +++ b/drivers/base/arch_topology.c
> @@ -175,11 +175,11 @@ bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu)
> }
>
> #ifdef CONFIG_CPU_FREQ
> -static cpumask_var_t cpus_to_visit __initdata;
> -static void __init parsing_done_workfn(struct work_struct *work);
> -static __initdata DECLARE_WORK(parsing_done_work, parsing_done_workfn);
> +static cpumask_var_t cpus_to_visit;
> +static void parsing_done_workfn(struct work_struct *work);
> +static DECLARE_WORK(parsing_done_work, parsing_done_workfn);
>
> -static int __init
> +static int
> init_cpu_capacity_callback(struct notifier_block *nb,
> unsigned long val,
> void *data)
> @@ -215,7 +215,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
> return 0;
> }
>
> -static struct notifier_block init_cpu_capacity_notifier __initdata = {
> +static struct notifier_block init_cpu_capacity_notifier = {
> .notifier_call = init_cpu_capacity_callback,
> };
>
> @@ -248,7 +248,7 @@ static int __init register_cpufreq_notifier(void)
> }
> core_initcall(register_cpufreq_notifier);
>
> -static void __init parsing_done_workfn(struct work_struct *work)
> +static void parsing_done_workfn(struct work_struct *work)
> {
> cpufreq_unregister_notifier(&init_cpu_capacity_notifier,
> CPUFREQ_POLICY_NOTIFIER);
>
--
Regards,
Sudeep
next prev parent reply other threads:[~2018-02-12 12:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 8:32 Gaku Inami
2018-02-07 9:37 ` Dietmar Eggemann
2018-02-12 12:28 ` Sudeep Holla [this message]
2018-02-13 1:21 ` Gaku Inami
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd046554-4155-6ed9-8378-fb9ef9e6f9d2@arm.com \
--to=sudeep.holla@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=gaku.inami.xh@renesas.com \
--cc=gregkh@linuxfoundation.org \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=psodagud@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®