* T30 boot hang with CONFIG_PM_LEGACY=n
[not found] <20060927024628.GA29182@redhat.com>
@ 2006-09-27 4:00 ` Len Brown
2006-09-27 4:20 ` Dave Jones
0 siblings, 1 reply; 4+ messages in thread
From: Len Brown @ 2006-09-27 4:00 UTC (permalink / raw)
To: Dave Jones, Jeff Garzik; +Cc: linux-acpi, Linux-pm mailing list
My T30 doesn't boot if CONFIG_PM_LEGACY=n
unless "apm=off".
Seems that this build option causes PM_IS_ACTIVE() to be constant 0,
which disables APM's check to see if ACPI is running:
apm_init()
...
if (PM_IS_ACTIVE()) {
printk(KERN_NOTICE "apm: overridden by ACPI.\n");
apm_info.disabled = 1;
return -ENODEV;
}
Apparently when CONFIG_PM_LEGACY was created, CONFIG_APM depended
on it, so apm.c wasn't built. But that dependency was later removed so it is now possible
to build APM with its check for ACPI mysteriously disabled -- much to the unhappyness
of my T30.
What's the plan here? Perhaps that plan should be written down
in kernel/power/Kconfig?
config PM_LEGACY
bool "Legacy Power Management API"
depends on PM
default y
---help---
Support for pm_register() and friends.
If unsure, say Y.
thanks,
-Len
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: T30 boot hang with CONFIG_PM_LEGACY=n
2006-09-27 4:00 ` T30 boot hang with CONFIG_PM_LEGACY=n Len Brown
@ 2006-09-27 4:20 ` Dave Jones
2006-09-27 14:47 ` Matthew Garrett
0 siblings, 1 reply; 4+ messages in thread
From: Dave Jones @ 2006-09-27 4:20 UTC (permalink / raw)
To: Len Brown; +Cc: Jeff Garzik, linux-acpi, Linux-pm mailing list
On Wed, Sep 27, 2006 at 12:00:40AM -0400, Len Brown wrote:
> My T30 doesn't boot if CONFIG_PM_LEGACY=n
> unless "apm=off".
>
> Seems that this build option causes PM_IS_ACTIVE() to be constant 0,
> which disables APM's check to see if ACPI is running:
>
> apm_init()
> ...
> if (PM_IS_ACTIVE()) {
> printk(KERN_NOTICE "apm: overridden by ACPI.\n");
> apm_info.disabled = 1;
> return -ENODEV;
> }
>
> Apparently when CONFIG_PM_LEGACY was created, CONFIG_APM depended
> on it, so apm.c wasn't built. But that dependency was later removed so it is now possible
> to build APM with its check for ACPI mysteriously disabled -- much to the unhappyness
> of my T30.
>
> What's the plan here?
Good question. There's no real replacement for pm_active in the non-legacy
config afaik. Perhaps the cleanest alternative is to undeprecate that macro?
The only other option I can think of is doing something like this in apm.c ...
+#ifdef CONFIG_ACPI
- if (PM_IS_ACTIVE()) {
printk(KERN_NOTICE "apm: overridden by ACPI.\n");
apm_info.disabled = 1;
return -ENODEV;
- }
+#endif
Dave
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: T30 boot hang with CONFIG_PM_LEGACY=n
2006-09-27 4:20 ` Dave Jones
@ 2006-09-27 14:47 ` Matthew Garrett
2006-09-27 17:15 ` Dave Jones
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Garrett @ 2006-09-27 14:47 UTC (permalink / raw)
To: Dave Jones; +Cc: Len Brown, Jeff Garzik, linux-acpi, Linux-pm mailing list
On Wed, Sep 27, 2006 at 12:20:29AM -0400, Dave Jones wrote:
> Good question. There's no real replacement for pm_active in the non-legacy
> config afaik. Perhaps the cleanest alternative is to undeprecate that macro?
> The only other option I can think of is doing something like this in apm.c ...
>
> +#ifdef CONFIG_ACPI
> - if (PM_IS_ACTIVE()) {
> printk(KERN_NOTICE "apm: overridden by ACPI.\n");
> apm_info.disabled = 1;
> return -ENODEV;
> - }
> +#endif
That's not a good choice - it needs to be a runtime check, not a
compile-time one. Don't we have an acpi_enabled() function?
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: T30 boot hang with CONFIG_PM_LEGACY=n
2006-09-27 14:47 ` Matthew Garrett
@ 2006-09-27 17:15 ` Dave Jones
0 siblings, 0 replies; 4+ messages in thread
From: Dave Jones @ 2006-09-27 17:15 UTC (permalink / raw)
To: Matthew Garrett; +Cc: Len Brown, Jeff Garzik, linux-acpi, Linux-pm mailing list
On Wed, Sep 27, 2006 at 03:47:31PM +0100, Matthew Garrett wrote:
> On Wed, Sep 27, 2006 at 12:20:29AM -0400, Dave Jones wrote:
>
> > Good question. There's no real replacement for pm_active in the non-legacy
> > config afaik. Perhaps the cleanest alternative is to undeprecate that macro?
> > The only other option I can think of is doing something like this in apm.c ...
> >
> > +#ifdef CONFIG_ACPI
> > - if (PM_IS_ACTIVE()) {
> > printk(KERN_NOTICE "apm: overridden by ACPI.\n");
> > apm_info.disabled = 1;
> > return -ENODEV;
> > - }
> > +#endif
>
> That's not a good choice - it needs to be a runtime check, not a
> compile-time one. Don't we have an acpi_enabled() function?
You're right, the above would break if booted with acpi=off.
Hmm.
Dave
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-09-27 17:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20060927024628.GA29182@redhat.com>
2006-09-27 4:00 ` T30 boot hang with CONFIG_PM_LEGACY=n Len Brown
2006-09-27 4:20 ` Dave Jones
2006-09-27 14:47 ` Matthew Garrett
2006-09-27 17:15 ` Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox