• Gaku Inami's avatar
    Revert "base: arch_topology: fix section mismatch build warnings" · 0d3f8c02
    Gaku Inami authored
    commit 9de9a449 upstream.
    This reverts commit 452562ab ("base: arch_topology: fix section
    mismatch build warnings"). It causes the notifier call hangs in some
    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 82d8ba71
    ("arch_topology: Fix section miss match warning due to
    free_raw_capacity()") in v4.15 as well.
    Whereas commit 452562ab added all the missing __init annotations,
    commit 82d8ba71 removed it from free_raw_capacity().
    WARNING: vmlinux.o(.text+0x548f24): Section mismatch in reference
    from the function init_cpu_capacity_callback() to the variable
    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.
    Fixes: 82d8ba71 ("arch_topology: Fix section miss match warning due to free_raw_capacity()")
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: default avatarGaku Inami <gaku.inami.xh@renesas.com>
    Reviewed-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
    Tested-by: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
    Acked-by: default avatarSudeep Holla <sudeep.holla@arm.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>