From patchwork Tue Oct 10 17:27:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 115420 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp4006163qgn; Tue, 10 Oct 2017 10:27:27 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA4U3EDbE4VdIzcxPSculZPrYGi+QF+YB4LJRKVxbNHeCddS2+w8QOvrcR2Y6RKt6p+dt+3 X-Received: by 10.101.75.201 with SMTP id p9mr13253766pgr.281.1507656447503; Tue, 10 Oct 2017 10:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507656447; cv=none; d=google.com; s=arc-20160816; b=lTfMmlrbNadPnAufgMYCgLln0Vykouoa6x85p7ITIvzfP88gRZn7M7Gpz7YAnP1Opr S80I5q27ySYlSiMvevL5sZePiixbP0T2wl23/gnEyKhVaN5Ay0LTZm5YoMSkilK1/HQh guRfjEPSuX9Y06lqHSuSFvA/EtBHnCebpBmIzRKUTktdkZHOJMlZK5qJ4A84DevctYRf 2t5V2lyZ+fTUP8DiiXPDkxoXPu8fknw6Lp7aJkyU5Ks0ItMgqG70FFToQcYxw67Tc6l8 iKqKLPQNZPnZlgKUUz+SSUXfYZYRW0ce8CnwXV8a/+a4Oo677yEoiHGHTRJUmVK8+LDu I7Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=kYZrqrnGwz1AfqJ/4IuGb/+lM5pmyiDntYRD7OgRV/M=; b=KtuAbm2IZDVHJREccoTWoE7JxrgxckZpk8MSGdLZ25nAQkcURAPLBQ9YynO/lscjs5 F6PIPWlEU8Sq0HE+h9j91QFsoMFFdfClBaO8Zz5E2zSeYfRjF6B0U7ySTuRl/k+RMDuT RolzpN5U1NGFoP1y+XZFp12knBr9OHgXRITYaE5iLtjI9h1L07az9Phh3TFBE7vpHPAL 86zfWPX78f27UHpHAsqDsemcXeA9erfVJA+ZAjTnL6FxQoK2HsZy973+8bPfiX5MpEU6 4YnG43CRqF/6HJ203MSb2VpLHlOF8/24NQ6Ye1JapdSusKN0WGA7RqnJVNvS0eQZarDn kmuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 o5si8595705pgp.316.2017.10.10.10.27.27; Tue, 10 Oct 2017 10:27:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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 stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756571AbdJJR1Y (ORCPT + 8 others); Tue, 10 Oct 2017 13:27:24 -0400 Received: from foss.arm.com ([217.140.101.70]:48070 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932453AbdJJR1S (ORCPT ); Tue, 10 Oct 2017 13:27:18 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6B7DC1529; Tue, 10 Oct 2017 10:27:18 -0700 (PDT) Received: from e107155-lin.cambridge.arm.com (e107155-lin.cambridge.arm.com [10.1.211.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7EE6B3F59C; Tue, 10 Oct 2017 10:27:17 -0700 (PDT) From: Sudeep Holla To: stable@vger.kernel.org Cc: Sudeep Holla , Juri Lelli , Greg Kroah-Hartman Subject: [PATCH v4.13 STABLE] base: arch_topology: fix section mismatch build warnings Date: Tue, 10 Oct 2017 18:27:09 +0100 Message-Id: <1507656429-21274-1-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org commit 452562abb5b76c14449dead2a7113f641893e8bc upstream. Commit 2ef7a2953c81 ("arm, arm64: factorize common cpu capacity default code") introduced init_cpu_capacity_callback and init_cpu_capacity_notifier which are referenced from initcall and are missing __init{,data} annotations resulting the below section mismatch build warnings. "WARNING: vmlinux.o(.text+0xbab790): 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." This patch fixes the above build warnings by adding the required annotations. Fixes: 2ef7a2953c81 ("arm, arm64: factorize common cpu capacity default code") Cc: Juri Lelli Cc: stable Cc: Greg Kroah-Hartman Signed-off-by: Sudeep Holla --- drivers/base/arch_topology.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) -- 2.7.4 diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index d1c33a85059e..df8945d7f009 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -160,12 +160,12 @@ int __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu) } #ifdef CONFIG_CPU_FREQ -static cpumask_var_t cpus_to_visit; -static bool cap_parsing_done; -static void parsing_done_workfn(struct work_struct *work); -static DECLARE_WORK(parsing_done_work, parsing_done_workfn); +static bool cap_parsing_done __initdata; +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 int +static int __init init_cpu_capacity_callback(struct notifier_block *nb, unsigned long val, void *data) @@ -200,7 +200,7 @@ init_cpu_capacity_callback(struct notifier_block *nb, return 0; } -static struct notifier_block init_cpu_capacity_notifier = { +static struct notifier_block init_cpu_capacity_notifier __initdata = { .notifier_call = init_cpu_capacity_callback, }; @@ -226,7 +226,7 @@ static int __init register_cpufreq_notifier(void) } core_initcall(register_cpufreq_notifier); -static void parsing_done_workfn(struct work_struct *work) +static void __init parsing_done_workfn(struct work_struct *work) { cpufreq_unregister_notifier(&init_cpu_capacity_notifier, CPUFREQ_POLICY_NOTIFIER);