Skip to contentSkip to conversation

acpi: don't register acpi_pad driver if running as xen dom0

PATCH Applied Juergen Gross 2 participants 2 messages Oct 12, 2016 – Oct 13, 2016 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi: don't register acpi_pad driver if running as xen dom0

When running as Xen dom0 a special processor_aggregator driver is needed. Don't register the standard driver in this case.

Without that check an error message:

"Error: Driver 'processor_aggregator' is already registered, aborting..."

will be displayed.

---
 drivers/acpi/acpi_pad.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/acpi/acpi_pad.c +5 -0
index 8ea8211..1c3be12 100644
@@ -26,6 +26,7 @@
 #include <linux/slab.h>
 #include <linux/acpi.h>
 #include <asm/mwait.h>
+#include <xen/xen.h>
 
 #define ACPI_PROCESSOR_AGGREGATOR_CLASS	"acpi_pad"
 #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"
@@ -477,6 +478,10 @@ static struct acpi_driver acpi_pad_driver = {
 
 static int __init acpi_pad_init(void)
 {
+	/* Xen acpi pad is responsible when running as Xen Dom0. */
+	if (xen_initial_domain())
+		return -ENODEV;
+
 	power_saving_mwait_init();
 	if (power_saving_mwait_eax == 0)
 		return -EINVAL;
Signature · 1 line
2.6.6
#1 lore raw
Quoted 29 lines · Juergen Gross

When running as Xen dom0 a special processor_aggregator driver is needed. Don't register the standard driver in this case.

Without that check an error message:

"Error: Driver 'processor_aggregator' is already registered, aborting..."

will be displayed.

---
 drivers/acpi/acpi_pad.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/acpi/acpi_pad.c +1 -0
index 8ea8211..1c3be12 100644
@@ -26,6 +26,7 @@
 #include <linux/slab.h>
 #include <linux/acpi.h>
 #include <asm/mwait.h>
+#include <xen/xen.h>
 
 #define ACPI_PROCESSOR_AGGREGATOR_CLASS	"acpi_pad"
 #define ACPI_PROCESSOR_AGGREGATOR_DEVICE_NAME "Processor Aggregator"

drivers/acpi/acpi_pad.c static struct acpi_driver acpi_pad_driver = { · line 487

Quoted 10 lines
drivers/acpi/acpi_pad.c +4 -0
@@ -477,6 +478,10 @@ static struct acpi_driver acpi_pad_driver = {
 
 static int __init acpi_pad_init(void)
 {
+	/* Xen acpi pad is responsible when running as Xen Dom0. */
+	if (xen_initial_domain())
+		return -ENODEV;
+
 	power_saving_mwait_init();
 	if (power_saving_mwait_eax == 0)
 		return -EINVAL;

Applied.

Thanks,
Rafael

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel