Re: [PATCH - 2.3.49-2] better CONFIG_PM handling (was Re: [uPATCH - 2.3.49-2] parport moved under main menu)

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Wed Mar 01 2000 - 11:40:05 EST


James Manning wrote:
> 1) fixes broken parport placement as previous patchlet did

As mistakes go, I think mine is a pretty acceptable one.

The general trend for config.in files is to place drivers AFTER core
system management and build configuration items. My patch follows that
trend. Maybe a better fix-up patch would be to properly place
comment/endmenu stuff instead?

> 2) backs out asking user the CONFIG_PM bool since
> a) ACPI can be used regardless of power management
> b) no need to bother the user since it's very simple to
> check on our own (just like we don't bother asking
> the user CONFIG_X86_GOOD_APIC explicitly)

> > It seems to me that the parport drivers might in the future depend on
> > CONFIG_PM either directly or indirectly, and that CONFIG_PM should
> > always be fairly high up in arch/xxx/config.in.
>
> Trust me when I say that nothing so key as a parallel port will ever
> force you to have power management turned on. Ever. :)

But drivers can easily be dependent on power management, which is a more
low-level and core interface than paralle ports, which is a "mere"
driver...

> Personally, I'd not bother asking the user to input the CONFIG_PM
> bool since 1) only 2 branches underneath it (APM, ACPI) and 2) ACPI is
> technically perfectly ok to use just for its configuration capabilities
> (it's more than just power management, of course, and putting it under
> CONFIG_PM is incorrect IMHO, even if current implementation doesn't use
> the full spec capabilities)

First and foremost, let's talk about the current kernel. Your point #2
implies that text needs to be changed somewhere, but nothing more than
that. The ACPI driver depends on the kernel power management
facilities, plain and simple.

If you want, rename CONFIG_PM to CONFIG_SYSMAN, for "system and power
management," so to be more proper. As I stated in the patch sent to
Linus and others, native power management drivers and other options are
going to start appearing under CONFIG_PM, which was the reason for the
CONFIG_PM question addition. For example I'm hacking on the i430FX
motherboard (PIIX1 PM), which has a shitty APM implementation and no
ACPI support at all. That will appear under CONFIG_PM when complete.

> If you just need some flag CONFIG_PM that represents whether power
> management of some form has been enabled in the kernel (for pm.o inclusion
> in kernel/Makefile or as it's used now in drivers/pcmcia/cs.c), it's *far*
> simpler (especially to the kernel configuration user) to simply:
>
> if [ "$CONFIG_APM" != "n" -o "$CONFIG_APCI" != "n" ]; then
> define_bool CONFIG_PM y
> fi

I am not really worried about someone losing 0.02 seconds of
productivity because they had to hit 'Y' one more time during kernel
config... :)

        Jeff

-- 
Jeff Garzik              | Rule 1:
Building 1024            | There is no cabal.
MandrakeSoft, Inc.       |

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:09 EST