
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IC8KS8 CVE: NA -------------------------------- This patch introduces a new kernel command-line parameter `enable_mm_spe_boost` to allow users to enable the SPE boost feature at boot time. By passing `enable_mm_spe_boost` on the kernel command line, the mm_spe_boost_enable flag is set early during initialization, enabling SPE boost without requiring runtime configuration. This provides a simple and convenient way to control SPE boost behavior. Signed-off-by: Ze Zuo <zuoze1@huawei.com> --- drivers/arm/mm_monitor/mm_spe.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/arm/mm_monitor/mm_spe.c b/drivers/arm/mm_monitor/mm_spe.c index daf92539690f..9779d0092d6d 100644 --- a/drivers/arm/mm_monitor/mm_spe.c +++ b/drivers/arm/mm_monitor/mm_spe.c @@ -17,6 +17,7 @@ #include "spe-decoder/arm-spe-decoder.h" #include "spe-decoder/arm-spe-pkt-decoder.h" #include "mm_spe.h" +static bool mm_spe_boost_enable; static struct mm_spe *spe; @@ -161,7 +162,7 @@ static void mm_spe_disable_and_drain_local(void) isb(); /* Disable boost_spe profiling */ - if (spe->support_boost_spe) { + if (spe->support_boost_spe && mm_spe_boost_enable) { write_sysreg_s(0, SYS_OMHTPG_EL1); isb(); } @@ -514,6 +515,13 @@ static struct platform_driver mm_spe_driver = { .probe = mm_spe_device_probe, }; +static __init int enable_mm_spe_boost(char *str) +{ + mm_spe_boost_enable = true; + return 0; +} +early_param("enable_mm_spe_boost", enable_mm_spe_boost); + static int __init mm_spe_init(void) { return platform_driver_register(&mm_spe_driver); -- 2.25.1