|
@@ -81,6 +81,28 @@ int smt_enabled_at_boot = 1;
|
|
|
|
|
|
static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
|
|
|
|
|
|
+/*
|
|
|
+ * Returns 1 if the specified cpu should be brought up during boot.
|
|
|
+ * Used to inhibit booting threads if they've been disabled or
|
|
|
+ * limited on the command line
|
|
|
+ */
|
|
|
+int smp_generic_cpu_bootable(unsigned int nr)
|
|
|
+{
|
|
|
+ /* Special case - we inhibit secondary thread startup
|
|
|
+ * during boot if the user requests it.
|
|
|
+ */
|
|
|
+ if (system_state == SYSTEM_BOOTING && cpu_has_feature(CPU_FTR_SMT)) {
|
|
|
+ if (!smt_enabled_at_boot && cpu_thread_in_core(nr) != 0)
|
|
|
+ return 0;
|
|
|
+ if (smt_enabled_at_boot
|
|
|
+ && cpu_thread_in_core(nr) >= smt_enabled_at_boot)
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ return 1;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
#ifdef CONFIG_PPC64
|
|
|
int smp_generic_kick_cpu(int nr)
|
|
|
{
|