Received: by 10.213.65.68 with SMTP id h4csp662030imn; Fri, 6 Apr 2018 06:58:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Xj2nTFhbMDb/oi27rHA/bJLuonP0d+nknPNjIIFFCceGsUuV4sq7s526YSvsycOM0HsNW X-Received: by 10.101.92.129 with SMTP id a1mr13354434pgt.69.1523023114329; Fri, 06 Apr 2018 06:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523023114; cv=none; d=google.com; s=arc-20160816; b=nBaT07ziCBbOzlxDZ0Hz1E/TI0DbeLmnRbn/wA+lWnlr+AQiXMqGovC7Q3fxH7BOjz A6O8bUCkaKZ9Z87pjEiLadIxaYb0e05UKjlicSR77LW/hyjAyDW0vjD54v9Px8/6O5m5 YL5+KGG24YnFJEEQM5v4OCfw3cI7I1Nnm+2VpMz5JmvQluFJGBDWLc3WU2ouc01YhfEJ LW9W4BRBNDNWakrkqEkMAmACrc/0GhNgbJmmEmMHI3NXKryK7LlkV65uCRaQv6HI/vqp PKjn7j52iXy7K59OwLDHSIP9Jofud6oy2JMkbMG8SZtGaLxBMX6sr2yITtbsDQzMeC4y 29gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=MU+zle1fkaGIo8j21jkAU2H3UYuNAsIDyQiN31BnY6A=; b=G8H0SvqfJgCxokxVe0el/TNVBm35fSKIAEC+p0wFGKxam1Pn1w+TuvR3qGIBB+7Ycf i1ct0pI9qTyu9GJ3v/m2xdzPJFv5XikQ9PauMQ7DnynpaNPir/BjiEzCPDSoVvZZUnDk SPTc+/V6ReQ+l3wnZfMXGllXZcYAQORewm18D6NQM2Jo5HBQ+kEgeo6NX6JJoanO6Pwr 9zUAAWYYSNmvxlp+6ptFzJz1+V0GciSnzeJujg19rEBIbhEZV3VXSi/VUYF7MnK9wqiH Z1pXvCe/y86hzovp8cKe4uJoak+Pvn1i8spaEylSyLt83E5s7RTaNqBrI40eL2EQtqtm y48g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2-v6si8360255plo.434.2018.04.06.06.58.20; Fri, 06 Apr 2018 06:58:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752884AbeDFN5V (ORCPT + 99 others); Fri, 6 Apr 2018 09:57:21 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:37282 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753120AbeDFNnS (ORCPT ); Fri, 6 Apr 2018 09:43:18 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CBD8DDCF; Fri, 6 Apr 2018 13:43:17 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gaku Inami , Dietmar Eggemann , Sudeep Holla Subject: [PATCH 4.15 61/72] Revert "base: arch_topology: fix section mismatch build warnings" Date: Fri, 6 Apr 2018 15:24:36 +0200 Message-Id: <20180406084353.547602155@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084349.367583460@linuxfoundation.org> References: <20180406084349.367583460@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gaku Inami commit 9de9a449482677a75f1edd2049268a7efc40fc96 upstream. 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(). 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. Fixes: 82d8ba717ccb ("arch_topology: Fix section miss match warning due to free_raw_capacity()") Cc: stable Signed-off-by: Gaku Inami Reviewed-by: Dietmar Eggemann Tested-by: Dietmar Eggemann Acked-by: Sudeep Holla Signed-off-by: Greg Kroah-Hartman --- drivers/base/arch_topology.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -175,11 +175,11 @@ bool __init topology_parse_cpu_capacity( } #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 notifi 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_notif } 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);