Skip to contentSkip to conversation

xen-acpi-processor: Don't display errors when we get -ENOSYS

PATCH In review Konrad Rzeszutek Wilk 2 participants 2 messages Apr 25, 2014 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen-acpi-processor: Don't display errors when we get -ENOSYS

which is a perfectly legal error. This can be triggered if the user has booted Xen with the no-cpuidle parameter.

---
 drivers/xen/xen-acpi-processor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/xen/xen-acpi-processor.c +2 -2
index 82358d1..59fc190 100644
@@ -127,7 +127,7 @@ static int push_cxx_to_hypervisor(struct acpi_processor *_pr)
 			pr_debug("     C%d: %s %d uS\n",
 				 cx->type, cx->desc, (u32)cx->latency);
 		}
-	} else if (ret != -EINVAL)
+	} else if ((ret != -EINVAL) && (ret != -ENOSYS))
 		/* EINVAL means the ACPI ID is incorrect - meaning the ACPI
 		 * table is referencing a non-existing CPU - which can happen
 		 * with broken ACPI tables. */
@@ -259,7 +259,7 @@ static int push_pxx_to_hypervisor(struct acpi_processor *_pr)
 			(u32) perf->states[i].power,
 			(u32) perf->states[i].transition_latency);
 		}
-	} else if (ret != -EINVAL)
+	} else if ((ret != -EINVAL) && (ret != -ENOSYS))
 		/* EINVAL means the ACPI ID is incorrect - meaning the ACPI
 		 * table is referencing a non-existing CPU - which can happen
 		 * with broken ACPI tables. */
Signature · 1 line
1.8.5.3
#1 lore raw
Quoted 6 lines · Konrad Rzeszutek Wilk

which is a perfectly legal error. This can be triggered if the user has booted Xen with the no-cpuidle parameter.

---

It would be more appropriate for Xen to return -ENODEV if it understands the ACPI hypercalls, but can't do anything with them.

That cat is however out of the bag.

~Andrew

Quoted 25 lines
 drivers/xen/xen-acpi-processor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/xen/xen-acpi-processor.c +2 -2
index 82358d1..59fc190 100644
@@ -127,7 +127,7 @@ static int push_cxx_to_hypervisor(struct acpi_processor *_pr)
 			pr_debug("     C%d: %s %d uS\n",
 				 cx->type, cx->desc, (u32)cx->latency);
 		}
-	} else if (ret != -EINVAL)
+	} else if ((ret != -EINVAL) && (ret != -ENOSYS))
 		/* EINVAL means the ACPI ID is incorrect - meaning the ACPI
 		 * table is referencing a non-existing CPU - which can happen
 		 * with broken ACPI tables. */
@@ -259,7 +259,7 @@ static int push_pxx_to_hypervisor(struct acpi_processor *_pr)
 			(u32) perf->states[i].power,
 			(u32) perf->states[i].transition_latency);
 		}
-	} else if (ret != -EINVAL)
+	} else if ((ret != -EINVAL) && (ret != -ENOSYS))
 		/* EINVAL means the ACPI ID is incorrect - meaning the ACPI
 		 * table is referencing a non-existing CPU - which can happen
 		 * with broken ACPI tables. */