From: Thomas Renninger <trenn@suse.de>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: linux-acpi@vger.kernel.org, "Brown, Len" <len.brown@intel.com>
Subject: Re: Exit ACPI drivers immediately if acpi is disabled
Date: Fri, 21 Apr 2006 18:53:46 +0200 [thread overview]
Message-ID: <200604211853.47117.trenn@suse.de> (raw)
In-Reply-To: <200604210918.47337.bjorn.helgaas@hp.com>
[-- Attachment #1: Type: text/plain, Size: 2332 bytes --]
On Friday 21 April 2006 17:18, Bjorn Helgaas wrote:
> On Friday 21 April 2006 04:43, Thomas Renninger wrote:
> > If booting with acpi=off and loading the processor module, it
> > may happen that the kernel oopses when trying to unload the module again.
> > Better exit all ACPI modules immediately if booted with acpi=off.
> > ...
> > @@ -289,31 +289,28 @@ static int __init acpi_ac_init(void)
> > {
> > int result = 0;
> >
> > - ACPI_FUNCTION_TRACE("acpi_ac_init");
> > + if (acpi_disabled)
> > + return -ENODEV;
>
> This doesn't feel like the right solution to me.
> acpi_bus_register_driver() already returns -ENODEV
> if acpi_disabled, and that ought to be enough so the
> drivers can handle this correctly.
>
> I don't think we should clutter every ACPI driver with
> the same check for acpi_disabled.
Yes, you are right.
>
> Did you investigate the oops when unloading the processor module?
It's in unregister_driver.
> I wonder if that driver has a bug there. It has a mysterious
> comment that "we keep the driver loaded even when ACPI is not
> running" for powernow-k8. I don't understand that at all, but
> it sounds like it requires extra care to make sure everything
> works right.
AFAIK processor module has no functions if acpi=off.
Some cpufreq drivers still work. The ones which have the steps
for each CPU model compiled in and that should still work.
There should be no functions missing when booting acpi=off and processor
module cannot be loaded.
But I might be wrong here...
Hmm, as even proc is deleted, the module probably should not be loaded...
I think this one should go in then:
Subject: Exit ACPI processor module if acpi is disabled
drivers/acpi/processor_core.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Thomas Renninger <trenn@suse.de>
Index: linux-2.6.16/drivers/acpi/processor_core.c
===================================================================
--- linux-2.6.16.orig/drivers/acpi/processor_core.c
+++ linux-2.6.16/drivers/acpi/processor_core.c
@@ -923,7 +923,7 @@ static int __init acpi_processor_init(vo
result = acpi_bus_register_driver(&acpi_processor_driver);
if (result < 0) {
remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
- return_VALUE(0);
+ return_VALUE(-EINVAL);
}
acpi_processor_install_hotplug_notify();
[-- Attachment #2: acpi_exit_on_acpi_off --]
[-- Type: text/x-diff, Size: 709 bytes --]
Subject: Exit ACPI processor module if acpi is disabled
drivers/acpi/processor_core.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Signed-off-by: Thomas Renninger <trenn@suse.de>
Index: linux-2.6.16/drivers/acpi/processor_core.c
===================================================================
--- linux-2.6.16.orig/drivers/acpi/processor_core.c
+++ linux-2.6.16/drivers/acpi/processor_core.c
@@ -923,7 +923,7 @@ static int __init acpi_processor_init(vo
result = acpi_bus_register_driver(&acpi_processor_driver);
if (result < 0) {
remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
- return_VALUE(0);
+ return_VALUE(-EINVAL);
}
acpi_processor_install_hotplug_notify();
next prev parent reply other threads:[~2006-04-21 16:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-21 10:43 Exit ACPI drivers immediately if acpi is disabled Thomas Renninger
2006-04-21 15:18 ` Bjorn Helgaas
2006-04-21 16:53 ` Thomas Renninger [this message]
2006-04-21 16:58 ` Dominik Brodowski
2006-04-21 17:18 ` Thomas Renninger
2006-04-24 10:52 ` Thomas Renninger
2006-04-24 14:59 ` Bjorn Helgaas
2006-04-24 15:57 ` Thomas Renninger
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=200604211853.47117.trenn@suse.de \
--to=trenn@suse.de \
--cc=bjorn.helgaas@hp.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
/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