linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Darren Hart <dvhart@infradead.org>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: linux-next: build failure after merge of the drivers-x86 tree
Date: Thu, 4 Jun 2015 19:51:36 +0200	[thread overview]
Message-ID: <20150604175135.GA10262@potion.brq.redhat.com> (raw)
In-Reply-To: <20150604181308.16fbe6cf@canb.auug.org.au>

2015-06-04 18:13+1000, Stephen Rothwell:
> 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.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
---
 drivers/platform/x86/pvpanic.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/pvpanic.c b/drivers/platform/x86/pvpanic.c
index 7b6860333267..fd86daba7ffd 100644
--- a/drivers/platform/x86/pvpanic.c
+++ b/drivers/platform/x86/pvpanic.c
@@ -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,

  reply	other threads:[~2015-06-04 17:51 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04  8:13 linux-next: build failure after merge of the drivers-x86 tree Stephen Rothwell
2015-06-04 17:51 ` Radim Krčmář [this message]
2015-06-08  4:27   ` Darren Hart
  -- strict thread matches above, loose matches on Subject: below --
2025-05-15  6:46 Stephen Rothwell
2025-05-15  8:32 ` Ilpo Järvinen
2025-05-15  9:22   ` Ingo Molnar
2025-05-15 12:19     ` Stephen Rothwell
2025-05-15 12:57       ` Ingo Molnar
2025-02-06  2:36 Stephen Rothwell
2025-02-06 10:27 ` Ilpo Järvinen
2025-02-06 14:49   ` Joshua Grisham
2025-02-06 19:22     ` Ilpo Järvinen
2021-08-20  5:00 Stephen Rothwell
2021-08-20  7:31 ` M D
2021-08-20 10:11   ` Hans de Goede
2021-07-28 16:48 Mark Brown
2021-07-28 17:01 ` Andy Shevchenko
2021-07-28 17:27   ` Kammela, Gayatri
2021-07-28 17:55     ` Hans de Goede
2021-07-28 17:59       ` Kammela, Gayatri
2019-10-15  2:00 Stephen Rothwell
2019-10-15  8:04 ` Andy Shevchenko
2019-10-15 11:42   ` Stephen Rothwell
2018-06-12  1:23 Stephen Rothwell
2018-06-12  3:28 ` dvhart
2018-06-12  5:18 ` Darren Hart
2015-06-05 10:13 Michael Ellerman
2015-06-08  4:52 ` Darren Hart
2012-08-20  6:11 Stephen Rothwell
2012-08-20  6:44 ` AceLan Kao
2012-03-22  4:33 Stephen Rothwell
2012-03-21  5:52 Stephen Rothwell
2012-03-21 11:19 ` Matthew Garrett
2011-02-22  5:22 Stephen Rothwell
2011-02-22  6:26 ` Mattia Dongili
2011-02-22 11:46   ` Mattia Dongili
2011-02-22 14:34     ` Matthew Garrett
2011-02-22 22:22       ` Stephen Rothwell
2011-02-14  5:39 Stephen Rothwell
2011-02-14 22:42 ` Rafael J. Wysocki
2011-03-25  4:44 ` Stephen Rothwell
2011-02-08  3:45 Stephen Rothwell
2011-02-08  3:50 ` Matthew Garrett
2010-12-07  2:24 Stephen Rothwell
2010-10-05  4:11 Stephen Rothwell
2010-10-05 10:36 ` Ike Panhc
2010-10-06 10:45 ` Ike Panhc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150604175135.GA10262@potion.brq.redhat.com \
    --to=rkrcmar@redhat.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).