linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/ACPI/cstate: Allow ACPI C1 FFH MWAIT use on AMD systems
@ 2017-05-17 14:20 Yazen Ghannam
  2017-05-22 16:21 ` Borislav Petkov
  2017-05-23 12:24 ` Pavel Machek
  0 siblings, 2 replies; 8+ messages in thread
From: Yazen Ghannam @ 2017-05-17 14:20 UTC (permalink / raw)
  To: linux-pm; +Cc: x86, linux-kernel, rjw, len.brown, pavel, Yazen Ghannam

From: Yazen Ghannam <yazen.ghannam@amd.com>

AMD systems support the Monitor/Mwait instructions and these can be used
for ACPI C1 in the same way as on Intel systems, with appropriate BIOS
support.

Allow ffh_cstate_init() to succeed on AMD systems and make the Cstate
description vendor-agnostic.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
 arch/x86/kernel/acpi/cstate.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
index 8a908ae..4c5dd5d 100644
--- a/arch/x86/kernel/acpi/cstate.c
+++ b/arch/x86/kernel/acpi/cstate.c
@@ -109,7 +109,7 @@ static long acpi_processor_ffh_cstate_probe_cpu(void *_cx)
 			cx->type);
 	}
 	snprintf(cx->desc,
-			ACPI_CX_DESC_LEN, "ACPI FFH INTEL MWAIT 0x%x",
+			ACPI_CX_DESC_LEN, "ACPI FFH X86 MWAIT 0x%x",
 			cx->address);
 out:
 	return retval;
@@ -169,7 +169,8 @@ static int __init ffh_cstate_init(void)
 {
 	struct cpuinfo_x86 *c = &boot_cpu_data;
 
-	if (c->x86_vendor != X86_VENDOR_INTEL)
+	if (c->x86_vendor != X86_VENDOR_INTEL &&
+	    c->x86_vendor != X86_VENDOR_AMD)
 		return -1;
 
 	cpu_cstate_entry = alloc_percpu(struct cstate_entry);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-05-24 18:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 14:20 [PATCH] x86/ACPI/cstate: Allow ACPI C1 FFH MWAIT use on AMD systems Yazen Ghannam
2017-05-22 16:21 ` Borislav Petkov
2017-05-22 20:20   ` Ghannam, Yazen
2017-05-23  7:59     ` Borislav Petkov
2017-05-23 12:50       ` Ghannam, Yazen
2017-05-23 13:06         ` Borislav Petkov
2017-05-23 12:24 ` Pavel Machek
2017-05-24 18:16   ` Ghannam, Yazen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).