|
@@ -658,6 +658,35 @@ static void __init early_reserve_mem(void)
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
|
|
|
|
+static bool tm_disabled __initdata;
|
|
|
|
+
|
|
|
|
+static int __init parse_ppc_tm(char *str)
|
|
|
|
+{
|
|
|
|
+ bool res;
|
|
|
|
+
|
|
|
|
+ if (kstrtobool(str, &res))
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
|
|
+ tm_disabled = !res;
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+early_param("ppc_tm", parse_ppc_tm);
|
|
|
|
+
|
|
|
|
+static void __init tm_init(void)
|
|
|
|
+{
|
|
|
|
+ if (tm_disabled) {
|
|
|
|
+ pr_info("Disabling hardware transactional memory (HTM)\n");
|
|
|
|
+ cur_cpu_spec->cpu_user_features2 &=
|
|
|
|
+ ~(PPC_FEATURE2_HTM_NOSC | PPC_FEATURE2_HTM);
|
|
|
|
+ cur_cpu_spec->cpu_features &= ~CPU_FTR_TM;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+#else
|
|
|
|
+static void tm_init(void) { }
|
|
|
|
+#endif /* CONFIG_PPC_TRANSACTIONAL_MEM */
|
|
|
|
+
|
|
void __init early_init_devtree(void *params)
|
|
void __init early_init_devtree(void *params)
|
|
{
|
|
{
|
|
phys_addr_t limit;
|
|
phys_addr_t limit;
|
|
@@ -767,6 +796,8 @@ void __init early_init_devtree(void *params)
|
|
powerpc_firmware_features |= FW_FEATURE_PS3_POSSIBLE;
|
|
powerpc_firmware_features |= FW_FEATURE_PS3_POSSIBLE;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+ tm_init();
|
|
|
|
+
|
|
DBG(" <- early_init_devtree()\n");
|
|
DBG(" <- early_init_devtree()\n");
|
|
}
|
|
}
|
|
|
|
|