[xen master] x86/idle: don't mix up ACPI and APIC IDs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] x86/idle: don't mix up ACPI and APIC IDs

patchbot
commit 6e36e365e0a966a7c9b0e99f1eed7185fd62fcbc
Author:     Jan Beulich <[hidden email]>
AuthorDate: Thu Jun 28 09:08:38 2018 +0200
Commit:     Jan Beulich <[hidden email]>
CommitDate: Thu Jun 28 09:08:38 2018 +0200

    x86/idle: don't mix up ACPI and APIC IDs
   
    Correct a log message and, to clarify code as well, rename the
    respective function parameter too.
   
    Signed-off-by: Jan Beulich <[hidden email]>
    Reviewed-by: Wei Liu <[hidden email]>
    Reviewed-by: Andrew Cooper <[hidden email]>
---
 xen/arch/x86/acpi/cpu_idle.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
index 7ecf443562..f26d694362 100644
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -1172,7 +1172,7 @@ static void print_cx_pminfo(uint32_t cpu, struct xen_processor_power *power)
 #define print_cx_pminfo(c, p)
 #endif
 
-long set_cx_pminfo(uint32_t cpu, struct xen_processor_power *power)
+long set_cx_pminfo(uint32_t acpi_id, struct xen_processor_power *power)
 {
     XEN_GUEST_HANDLE(xen_processor_cx_t) states;
     xen_processor_cx_t xen_cx;
@@ -1185,16 +1185,15 @@ long set_cx_pminfo(uint32_t cpu, struct xen_processor_power *power)
     if ( pm_idle_save && pm_idle != acpi_processor_idle )
         return 0;
 
-    print_cx_pminfo(cpu, power);
+    print_cx_pminfo(acpi_id, power);
 
-    /* map from acpi_id to cpu_id */
-    cpu_id = get_cpu_id(cpu);
+    cpu_id = get_cpu_id(acpi_id);
     if ( cpu_id == -1 )
     {
         static bool warn_once = true;
 
         if ( warn_once || opt_cpu_info )
-            printk(XENLOG_WARNING "No CPU ID for APIC ID %#x\n", cpu);
+            printk(XENLOG_WARNING "No CPU for ACPI ID %#x\n", acpi_id);
         warn_once = false;
         return -EINVAL;
     }
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog