* [PATCH] x86/idle: don't mix up ACPI and APIC IDs
@ 2018-06-26 7:35 Jan Beulich
2018-06-26 7:46 ` Wei Liu
2018-06-26 10:54 ` Andrew Cooper
0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2018-06-26 7:35 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper
Correct a log message and, to clarify code as well, rename the
respective function parameter too.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- 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
#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,16 @@ long set_cx_pminfo(uint32_t cpu, struct
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;
}
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/idle: don't mix up ACPI and APIC IDs
2018-06-26 7:35 [PATCH] x86/idle: don't mix up ACPI and APIC IDs Jan Beulich
@ 2018-06-26 7:46 ` Wei Liu
2018-06-26 10:54 ` Andrew Cooper
1 sibling, 0 replies; 3+ messages in thread
From: Wei Liu @ 2018-06-26 7:46 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Wei Liu, Andrew Cooper
On Tue, Jun 26, 2018 at 01:35:18AM -0600, Jan Beulich wrote:
> Correct a log message and, to clarify code as well, rename the
> respective function parameter too.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/idle: don't mix up ACPI and APIC IDs
2018-06-26 7:35 [PATCH] x86/idle: don't mix up ACPI and APIC IDs Jan Beulich
2018-06-26 7:46 ` Wei Liu
@ 2018-06-26 10:54 ` Andrew Cooper
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2018-06-26 10:54 UTC (permalink / raw)
To: Jan Beulich, xen-devel
On 26/06/18 08:35, Jan Beulich wrote:
> Correct a log message and, to clarify code as well, rename the
> respective function parameter too.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- 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
> #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,16 @@ long set_cx_pminfo(uint32_t cpu, struct
> 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 */
You can drop this comment, seeing as it is completely redundant with the
next line.
Either way, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> - 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;
> }
>
>
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-26 10:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 7:35 [PATCH] x86/idle: don't mix up ACPI and APIC IDs Jan Beulich
2018-06-26 7:46 ` Wei Liu
2018-06-26 10:54 ` Andrew Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.