Skip to contentSkip to conversation

linux-next: build failure after merge of the drivers-x86 tree

DISCUSSION Stephen Rothwell 3 participants 3 messages Jun 4, 2015 – Jun 8, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Darren,

After merging the drivers-x86 tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: "acpi_bus_get_status_handle" [drivers/platform/x86/pvpanic.ko] undefined!

Caused by commit b8f8cf6b02b6 ("pvpanic: handle missing _STA correctly").

I have used the drivers-x86 tree from next-20150603 for today.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#1 lore raw

2015-06-04 18:13+1000, Stephen Rothwell:

Quoted 6 lines

After merging the drivers-x86 tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: "acpi_bus_get_status_handle" [drivers/platform/x86/pvpanic.ko] undefined!

Caused by commit b8f8cf6b02b6 ("pvpanic: handle missing _STA correctly").

Classic, I only built with Y, sorry.

acpi_bus_get_status_handle is not exported, so a simple solution would be to make it so. Or it's possible to rewrite the patch in a way that uses current infrastructure.

Would you prefer a patch to export it, a build fix on top of b8f8cf6b02b6 or a replacement patch?

Thanks.

A fix on top of b8f8cf6b02b6:
---8<---
pvpanic: use acpi_bus_get_status to fix build

The previous version used acpi_bus_get_status_handle, which was not being exported, so module build blew up; switch to acpi_bus_get_status and use the status it populates.

Populated status is a bitfield so we can make the code self-documenting. We do not check 'present' because 'enabled' has to be false in that case by specification. Older QEMUs set 0xff to status and newer ones do 0xb.

---
 drivers/platform/x86/pvpanic.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/platform/x86/pvpanic.c +5 -4
index 7b6860333267..fd86daba7ffd 100644
@@ -92,12 +92,13 @@ pvpanic_walk_resources(struct acpi_resource *res, void *context)
 
 static int pvpanic_add(struct acpi_device *device)
 {
-	acpi_status status;
-	u64 ret;
+	int ret;
 
-	status = acpi_bus_get_status_handle(device->handle, &ret);
+	ret = acpi_bus_get_status(device);
+	if (ret < 0)
+		return ret;
 
-	if (ACPI_FAILURE(status) || (ret & 0x0B) != 0x0B)
+	if (!device->status.enabled || !device->status.functional)
 		return -ENODEV;
 
 	acpi_walk_resources(device->handle, METHOD_NAME__CRS,
#2 lore raw
Quoted 9 lines · Radim Krčmář

2015-06-04 18:13+1000, Stephen Rothwell:

Quoted 6 lines

After merging the drivers-x86 tree, today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: "acpi_bus_get_status_handle" [drivers/platform/x86/pvpanic.ko] undefined!

Caused by commit b8f8cf6b02b6 ("pvpanic: handle missing _STA correctly").

Classic, I only built with Y, sorry.

While I, as a rule, build with both. My apologies for letting this slip through into -next.

Quoted 7 lines

acpi_bus_get_status_handle is not exported, so a simple solution would be to make it so. Or it's possible to rewrite the patch in a way that uses current infrastructure.

Would you prefer a patch to export it, a build fix on top of b8f8cf6b02b6 or a replacement patch?

I'll take the incremental below, but I will roll it into the existing one so as not to break bisectability in Linus tree.

Thanks,

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center