arch_topology: Support basic SMT control for the driver
kunpeng inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I8TAPW CVE: NA Reference: https://lore.kernel.org/all/20231121092602.47792-1-yangyicong@huawei.com/ ---------------------------------------------------------------------- The core CPU control framework supports runtime SMT control which is not yet supported by arch_topology driver and thus arch_topology based architectures. This patch implements it in the following aspects: - implement topology_is_primary_thread() to indicate the primary thread, required by the framework - architecture code can get/set the SMT thread number by topology_smt_{get, set}_num_threads() - update the SMT thread number for the framework after the topology enumerated on arm64, which is also required by the framework For disabling SMT we'll offline all the secondary threads and only leave the primary thread. Since we don't have restriction for primary thread selection, the first thread is chosen as the primary thread in this implementation. This patch only implements the basic support for SMT control, which needs to collabrate with ACPI/OF based topology building to fully enable the feature. The SMT control will be enabled unless the correct SMT thread number is set and HOTPLUG_SMT kconfig is selected. Signed-off-by:Yicong Yang <yangyicong@hisilicon.com> Signed-off-by:
Jie Liu <liujie375@h-partners.com>
Loading
Please sign in to comment