Received: by 10.213.65.68 with SMTP id h4csp644813imn; Fri, 6 Apr 2018 06:41:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx49CWydGOTwjlfPlyXoCFkSVOeYJxa0bCsIxWYFfhK4EVhQp3IO25maiOtrsUQRqvgWWnnVm X-Received: by 2002:a17:902:2468:: with SMTP id m37-v6mr26794770plg.388.1523022061986; Fri, 06 Apr 2018 06:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523022061; cv=none; d=google.com; s=arc-20160816; b=0QwWRbtWFsREmAEJpRtrR5pP9HF63xDnfyKP5rVr4KKLisOfXFsvyGbrSE7rPxl3CF k7+E98ACKbMGYdr1fBUyavd1vZ69Iqgw0ZMWqE7TRsTDxPuePmWsSEnaJbEHKMLm7+f+ kBBEF4QYu0wcuoayGjDavqbC2HItqvRI7kKwvVUsqCTYXcgPpBSATPZm7qS/rjOuq6E7 a0Db7fGCDIIF7FVWqZPJQSy2Y0nKbewyIm7t0WmCoFH1kHqSuruoKslwrAGCUwtdygcc L6uiaWlCl0iX5D6wvnF+nG9EEFn6uu21s0ts3GmxK0gXwCiiVqvLRsAAOYIPzNT8YXGW xx3Q== 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=GQy47CtRKlUc/hSTwuuqnJPqkP1YHNxc+GLqydBbVq0=; b=Wj5xkAAm+7HSLUzxFOVwtjwzo5Np4NxNSaAUhhngBJqmT2kwdJBYaypOU7bZ5HyQvI qOwrEloV6Yk8bgvOIUfgqqvwZYpfcPsO4js4RQeWBEc7E8S/1twMhpkzse3YfeYxF4Vt j2Or42xKGJJOSIkrBDjKcrYrS1isiLylLrSKHWNouYui4L8FRhF9iliYcltr6EwXRxJe TtMPA7usbwAOagKhgBm8oNiVAoHY5S4zcM8MQ1rmUQYJeeZR2PaTra8DfwFeGOSxmdlj l0okt5VED7mJHPXOTJPSNcwHABiAe6n7xVOhZUeNzpfPGhG9pvvF+lb9WMPKtt840W10 NzYw== 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 a1-v6si8149319pld.529.2018.04.06.06.40.48; Fri, 06 Apr 2018 06:41:01 -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 S932720AbeDFNjr (ORCPT + 99 others); Fri, 6 Apr 2018 09:39:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34774 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932706AbeDFNjo (ORCPT ); Fri, 6 Apr 2018 09:39:44 -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 ECBB3D0A; Fri, 6 Apr 2018 13:39:43 +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.14 56/67] Revert "base: arch_topology: fix section mismatch build warnings" Date: Fri, 6 Apr 2018 15:24:26 +0200 Message-Id: <20180406084348.050302670@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084341.225558262@linuxfoundation.org> References: <20180406084341.225558262@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.14-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 @@ -166,11 +166,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) @@ -206,7 +206,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, }; @@ -232,7 +232,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);