From da5e552dbd0d2a7251e08fbc07424a2a1627334b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 10 Oct 2017 20:47:45 +0200 Subject: [PATCH] 4.13-stable patches added patches: base-arch_topology-fix-section-mismatch-build-warnings.patch --- ...-fix-section-mismatch-build-warnings.patch | 70 +++++++++++++++++++ queue-4.13/series | 1 + 2 files changed, 71 insertions(+) create mode 100644 queue-4.13/base-arch_topology-fix-section-mismatch-build-warnings.patch diff --git a/queue-4.13/base-arch_topology-fix-section-mismatch-build-warnings.patch b/queue-4.13/base-arch_topology-fix-section-mismatch-build-warnings.patch new file mode 100644 index 00000000000..c2dfbaf6630 --- /dev/null +++ b/queue-4.13/base-arch_topology-fix-section-mismatch-build-warnings.patch @@ -0,0 +1,70 @@ +From 452562abb5b76c14449dead2a7113f641893e8bc Mon Sep 17 00:00:00 2001 +From: Sudeep Holla +Date: Thu, 7 Sep 2017 15:16:05 +0100 +Subject: base: arch_topology: fix section mismatch build warnings + +From: Sudeep Holla + +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 +Signed-off-by: Sudeep Holla +Signed-off-by: Greg Kroah-Hartman + + +--- + drivers/base/arch_topology.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/drivers/base/arch_topology.c ++++ b/drivers/base/arch_topology.c +@@ -160,12 +160,12 @@ int __init topology_parse_cpu_capacity(s + } + + #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 notifi + 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_notif + } + 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); diff --git a/queue-4.13/series b/queue-4.13/series index 448f8dbcaf4..e1da69352af 100644 --- a/queue-4.13/series +++ b/queue-4.13/series @@ -157,3 +157,4 @@ nl80211-define-policy-for-packet-pattern-attributes.patch clk-samsung-exynos4-enable-vpll-and-epll-clocks-for-suspend-resume-cycle.patch udp-perform-source-validation-for-mcast-early-demux.patch udp-fix-bcast-packet-reception.patch +base-arch_topology-fix-section-mismatch-build-warnings.patch -- 2.47.3