x86/cstate: Add Zhaoxin ACPI Cx FFH MWAIT support
PATCH 1/1 x86/cstate: Add Zhaoxin ACPI Cx FFH MWAIT support
Recent Zhaoxin CPUs support X86_FEATURE_MWAIT that implies the MONITOR/MWAIT instructions can be used for ACPI Cx state. The BIOS declares Cx state in _CST object to use FFH on Zhaoxin systems. So let function ffh_cstate_init() support Zhaoxin too.
--- arch/x86/kernel/acpi/cstate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/kernel/acpi/cstate.c +3 -1
@@ -213,7 +213,9 @@ static int __init ffh_cstate_init(void)if (c->x86_vendor !=X86_VENDOR_INTEL && c->x86_vendor !=X86_VENDOR_AMD && - c->x86_vendor !=X86_VENDOR_HYGON ) + c->x86_vendor !=X86_VENDOR_HYGON && + c->x86_vendor !=X86_VENDOR_CENTAUR && + c->x86_vendor !=X86_VENDOR_ZHAOXIN )return -1 ; cpu_cstate_entry = alloc_percpu(struct cstate_entry);
Signature · 1 line
2.7.4
Rafael J. Wysocki
maintainerPlease CC [email protected] on ACPI-related changes (added now).
Quoted 16 lines · Tony W Wang-oc
Recent Zhaoxin CPUs support
X86_FEATURE_MWAITthat implies the MONITOR/MWAIT instructions can be used for ACPI Cx state. The BIOS declares Cx state in_CSTobject to use FFH on Zhaoxin systems. So let functionffh_cstate_init()support Zhaoxin too.Signed-off-by Tony W Wang-oc <[email protected]>--- arch/x86/kernel/acpi/cstate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)arch/x86/kernel/acpi/cstate.c +0
-0
arch/x86/kernel/acpi/cstate.c static int __init ffh_cstate_init(void) · line 218
Quoted 7 lines
arch/x86/kernel/acpi/cstate.c +3
-1@@ -213,7 +213,9 @@ static int __init ffh_cstate_init(void)if (c->x86_vendor !=X86_VENDOR_INTEL && c->x86_vendor !=X86_VENDOR_AMD && - c->x86_vendor !=X86_VENDOR_HYGON ) + c->x86_vendor !=X86_VENDOR_HYGON && + c->x86_vendor !=X86_VENDOR_CENTAUR && + c->x86_vendor !=X86_VENDOR_ZHAOXIN )
Centaur is not mentioned in the changelog and it should be.
Quoted 4 lines
arch/x86/kernel/acpi/cstate.c +0
-1return -1 ; cpu_cstate_entry = alloc_percpu(struct cstate_entry); --
Quoted 1 line · Rafael J. Wysocki
Please CC [email protected] on ACPI-related changes (added now).
Ok.
Quoted 19 lines · Tony W Wang-oc
Quoted 17 lines
Recent Zhaoxin CPUs support
X86_FEATURE_MWAITthat implies the MONITOR/MWAIT instructions can be used for ACPI Cx state. The BIOS declares Cx state in_CSTobject to use FFH on Zhaoxin systems. So let functionffh_cstate_init()support Zhaoxin too.Signed-off-by Tony W Wang-oc <[email protected]>--- arch/x86/kernel/acpi/cstate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)arch/x86/kernel/acpi/cstate.c +0
-0@@ -213,7 +213,9 @@ static int __init ffh_cstate_init(void)
Quoted 8 lines
arch/x86/kernel/acpi/cstate.c static int __init ffh_cstate_init(void) · line 218
Quoted 6 lines
arch/x86/kernel/acpi/cstate.c +3
-1if (c->x86_vendor !=X86_VENDOR_INTEL && c->x86_vendor !=X86_VENDOR_AMD && - c->x86_vendor !=X86_VENDOR_HYGON ) + c->x86_vendor !=X86_VENDOR_HYGON && + c->x86_vendor !=X86_VENDOR_CENTAUR && + c->x86_vendor !=X86_VENDOR_ZHAOXIN )Centaur is not mentioned in the changelog and it should be.
Will add Centaur in the changelog. Thanks a lot.
Quoted 7 lines
arch/x86/kernel/acpi/cstate.c static int __init ffh_cstate_init(void)
Quoted 5 lines
arch/x86/kernel/acpi/cstate.c +0
-1return -1 ; cpu_cstate_entry = alloc_percpu(struct cstate_entry); --.
Signature · 2 lines
Sincerely TonyWWang-oc