From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bill Fletcher <bill.fletcher@linaro.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] ACPI / bus: ignore rather than fail bus driver registrations on non-ACPI boot
Date: Sun, 22 Apr 2018 11:57:51 +0200 [thread overview]
Message-ID: <CAKv+Gu8xY-RvJKTKfv-e0qonL4oECDBK+ppxztvh9BgdpG8CUg@mail.gmail.com> (raw)
In-Reply-To: <CAJZ5v0jE4Ler2OWeKEWuHwEwM4RHYC5r8BwgcPrT6XBxFjnSNw@mail.gmail.com>
On 22 April 2018 at 11:27, Rafael J. Wysocki <rafael@kernel.org> wrote:
> On Thu, Apr 19, 2018 at 6:58 PM, Ard Biesheuvel
> <ard.biesheuvel@linaro.org> wrote:
>> When building ACPI bus drivers such as button.ko into the core kernel,
>> other drivers that depend on its symbols are loadable even when booting
>> with ACPI disabled. For instance, nouveau.ko has a link time dependency
>> on acpi_lid_open() on ACPI capable kernels, and calls it regardless of
>> whether the system booted via ACPI.
>>
>> However, when building button.ko as a module, it will refuse to load if
>> the system did not boot in ACPI mode, which subsequently prevents the
>> nouveau driver from loading as well, resulting in broken graphics.
>>
>> Given that returning an error from an initcall() is ignored for drivers
>> that are built into the kernel,
>
> Which makes sense, because they are present in the kernel anyway.
>
>> let's align the module case with this,
>> and not return an error when registering an ACPI bus driver on a system
>> that did not boot via ACPI.
>
> But why is loading a module that's never going to be used actually OK?
>
> Isn't this a problem with the assumptions made by the nouveau driver
> that need not be met depending on what configuration the kernel is run
> in?
>
> Honestly, it doesn't appear quite right to try to change the rest of
> the kernel to follow the nouveau's expectations.
>
I don't disagree here, I am just unsure whether other options are any better.
I think the alternative is to make acpi_lid_open() a non-modular
function of the ACPI core that invokes the button ACPI bus driver if
it was loaded, and always returns false otherwise. Would that work for
you?
next prev parent reply other threads:[~2018-04-22 9:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 16:58 Ard Biesheuvel
2018-04-22 9:27 ` Rafael J. Wysocki
2018-04-22 9:57 ` Ard Biesheuvel [this message]
2018-04-22 12:34 ` Ard Biesheuvel
2018-04-23 7:39 ` Rafael J. Wysocki
2018-04-23 7:40 ` Ard Biesheuvel
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=CAKv+Gu8xY-RvJKTKfv-e0qonL4oECDBK+ppxztvh9BgdpG8CUg@mail.gmail.com \
--to=ard.biesheuvel@linaro.org \
--cc=arnd@arndb.de \
--cc=bill.fletcher@linaro.org \
--cc=broonie@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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
all inboxes | Powered by JetHome®