summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-toradex-rt-4.9-2.3.x/002i.patch
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-12-10 17:32:06 +0100
committerPhilippe Schenker <philippe.schenker@toradex.com>2018-12-27 16:45:52 +0100
commit58af5f8ccb2f29acf4fd0182521f793c9e10d68e (patch)
treee7ec9f88ce462e8a0a831f9e77b2c36858dd1725 /recipes-kernel/linux/linux-toradex-rt-4.9-2.3.x/002i.patch
parente25cc381c7ceeb325a038308c414975844ac7864 (diff)
linux kernel: update to 4.9.144 based fslc
Update to L4.9.123-2.3.0_8mm_ga release. Update to branch toradex_4.9-2.3.x-imx based on 4.9-2.3.x-imx branch of linux-fslc currently re-based to 4.9.144. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Philippe Schenker <philippe.schenker@toradex.com>
Diffstat (limited to 'recipes-kernel/linux/linux-toradex-rt-4.9-2.3.x/002i.patch')
-rw-r--r--recipes-kernel/linux/linux-toradex-rt-4.9-2.3.x/002i.patch114
1 files changed, 114 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-toradex-rt-4.9-2.3.x/002i.patch b/recipes-kernel/linux/linux-toradex-rt-4.9-2.3.x/002i.patch
new file mode 100644
index 0000000..0733908
--- /dev/null
+++ b/recipes-kernel/linux/linux-toradex-rt-4.9-2.3.x/002i.patch
@@ -0,0 +1,114 @@
+--- b/kernel/cpu.c
++++ a/kernel/cpu.c
+@@ -54,7 +54,6 @@
+ bool rollback;
+ bool single;
+ bool bringup;
+- bool booted_once;
+ struct hlist_node *node;
+ enum cpuhp_state cb_state;
+ int result;
+@@ -356,40 +355,6 @@
+ EXPORT_SYMBOL_GPL(cpu_hotplug_enable);
+ #endif /* CONFIG_HOTPLUG_CPU */
+
+-#ifdef CONFIG_HOTPLUG_SMT
+-enum cpuhp_smt_control cpu_smt_control __read_mostly = CPU_SMT_ENABLED;
+-
+-static int __init smt_cmdline_disable(char *str)
+-{
+- cpu_smt_control = CPU_SMT_DISABLED;
+- if (str && !strcmp(str, "force")) {
+- pr_info("SMT: Force disabled\n");
+- cpu_smt_control = CPU_SMT_FORCE_DISABLED;
+- }
+- return 0;
+-}
+-early_param("nosmt", smt_cmdline_disable);
+-
+-static inline bool cpu_smt_allowed(unsigned int cpu)
+-{
+- if (cpu_smt_control == CPU_SMT_ENABLED)
+- return true;
+-
+- if (topology_is_primary_thread(cpu))
+- return true;
+-
+- /*
+- * On x86 it's required to boot all logical CPUs at least once so
+- * that the init code can get a chance to set CR4.MCE on each
+- * CPU. Otherwise, a broadacasted MCE observing CR4.MCE=0b on any
+- * core will shutdown the machine.
+- */
+- return !per_cpu(cpuhp_state, cpu).booted_once;
+-}
+-#else
+-static inline bool cpu_smt_allowed(unsigned int cpu) { return true; }
+-#endif
+-
+ /* Need to know about CPUs going up/down? */
+ int register_cpu_notifier(struct notifier_block *nb)
+ {
+@@ -466,16 +431,6 @@
+ stop_machine_unpark(cpu);
+ kthread_unpark(st->thread);
+
+- /*
+- * SMT soft disabling on X86 requires to bring the CPU out of the
+- * BIOS 'wait for SIPI' state in order to set the CR4.MCE bit. The
+- * CPU marked itself as booted_once in cpu_notify_starting() so the
+- * cpu_smt_allowed() check will now return false if this is not the
+- * primary sibling.
+- */
+- if (!cpu_smt_allowed(cpu))
+- return -ECANCELED;
+-
+ /* Should we go further up ? */
+ if (st->target > CPUHP_AP_ONLINE_IDLE) {
+ __cpuhp_kick_ap_work(st);
+@@ -1023,6 +978,29 @@
+ EXPORT_SYMBOL(cpu_down);
+ #endif /*CONFIG_HOTPLUG_CPU*/
+
++#ifdef CONFIG_HOTPLUG_SMT
++enum cpuhp_smt_control cpu_smt_control __read_mostly = CPU_SMT_ENABLED;
++
++static int __init smt_cmdline_disable(char *str)
++{
++ cpu_smt_control = CPU_SMT_DISABLED;
++ if (str && !strcmp(str, "force")) {
++ pr_info("SMT: Force disabled\n");
++ cpu_smt_control = CPU_SMT_FORCE_DISABLED;
++ }
++ return 0;
++}
++early_param("nosmt", smt_cmdline_disable);
++
++static inline bool cpu_smt_allowed(unsigned int cpu)
++{
++ return cpu_smt_control == CPU_SMT_ENABLED ||
++ topology_is_primary_thread(cpu);
++}
++#else
++static inline bool cpu_smt_allowed(unsigned int cpu) { return true; }
++#endif
++
+ /**
+ * notify_cpu_starting(cpu) - Invoke the callbacks on the starting CPU
+ * @cpu: cpu that just started
+@@ -1036,7 +1014,6 @@
+ enum cpuhp_state target = min((int)st->target, CPUHP_AP_ONLINE);
+
+ rcu_cpu_starting(cpu); /* Enables RCU usage on this CPU. */
+- st->booted_once = true;
+ while (st->state < target) {
+ st->state++;
+ cpuhp_invoke_callback(cpu, st->state, true, NULL);
+@@ -2137,6 +2114,5 @@
+ */
+ void __init boot_cpu_hotplug_init(void)
+ {
++ per_cpu_ptr(&cpuhp_state, smp_processor_id())->state = CPUHP_ONLINE;
+- this_cpu_write(cpuhp_state.booted_once, true);
+- this_cpu_write(cpuhp_state.state, CPUHP_ONLINE);
+ }