x86/acpi/cstate: add Zhaoxin processors support for cache flush policy in C3
PATCH v2 3/3 x86/acpi/cstate: add Zhaoxin processors support for cache flush policy in C3
Same as Intel, Zhaoxin MP CPUs support C3 share cache and on all recent Zhaoxin platforms ARB_DISABLE is a nop. So set related flags correctly in the same way as Intel does.
Signed-off-by Tony W Wang-oc <[email protected]>
--- arch/x86/kernel/acpi/cstate.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/x86/kernel/acpi/cstate.c +15 -0
@@ -64,6 +64,21 @@ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, c->x86_stepping >= 0x0e)) flags->bm_check =1 ; } + +if (c->x86_vendor ==X86_VENDOR_ZHAOXIN ) { +/* +* All Zhaoxin CPUs that support C3 share cache. +* And caches should not be flushed by software while +* entering C3 type state. +*/ + flags->bm_check =1 ; +/* +* On all recent Zhaoxin platforms, ARB_DISABLE is a nop. +* So, set bm_control to zero to indicate that ARB_DISABLE +* is not required while entering C3 type state. +*/ + flags->bm_control =0 ; + } }EXPORT_SYMBOL (acpi_processor_power_init_bm_check);
Signature · 1 line
2.7.4
tip-bot for Tony W Wang-oc
merge bot[tip:x86/cpu] x86/acpi/cstate: Add Zhaoxin processors support for cache flush policy in C3
x86/acpi/cstate: Add Zhaoxin processors support for cache flush policy in C3
Commit-ID: f8c0e061cb83bd528ff0843e717bcebc846d4838 Gitweb: https://git.kernel.org/tip/f8c0e061cb83bd528ff0843e717bcebc846d4838 Author: Tony W Wang-oc <[email protected]> AuthorDate: Tue, 18 Jun 2019 08:37:29 +0000 Committer: Thomas Gleixner <[email protected]> CommitDate: Sat, 22 Jun 2019 11:45:58 +0200
x86/acpi/cstate: Add Zhaoxin processors support for cache flush policy in C3
Same as Intel, Zhaoxin MP CPUs support C3 share cache and on all recent Zhaoxin platforms ARB_DISABLE is a nop. So set related flags correctly in the same way as Intel does.
Signed-off-by Tony W Wang-oc <[email protected]>
Signed-off-by Thomas Gleixner <[email protected]>
Cc David Wang <[email protected]>
Cc "Cooper Yan(BJ-RD)" <[email protected]>
Cc "Qiyuan Wang(BJ-RD)" <[email protected]>
Cc "Herry Yang(BJ-RD)" <[email protected]>
--- arch/x86/kernel/acpi/cstate.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/x86/kernel/acpi/cstate.c +15 -0
@@ -64,6 +64,21 @@ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, c->x86_stepping >= 0x0e)) flags->bm_check =1 ; } + +if (c->x86_vendor ==X86_VENDOR_ZHAOXIN ) { +/* +* All Zhaoxin CPUs that support C3 share cache. +* And caches should not be flushed by software while +* entering C3 type state. +*/ + flags->bm_check =1 ; +/* +* On all recent Zhaoxin platforms, ARB_DISABLE is a nop. +* So, set bm_control to zero to indicate that ARB_DISABLE +* is not required while entering C3 type state. +*/ + flags->bm_control =0 ; + } }EXPORT_SYMBOL (acpi_processor_power_init_bm_check);