Re: Re: [PATCHES] add _CST support

Len Brown
2004-12-23T05:02:13Z

On Wed, 2004-12-22 at 19:08, Dominik Brodowski wrote:
> On Wed, Dec 22, 2004 at 12:44:05AM -0500, Len Brown wrote:
> > On Sat, 2004-11-27 at 16:51, Dominik Brodowski wrote:
> >
> > > - make acpi_cstate_limit aware of c-state types instead of
> numbers, as the latter mean (almost) nothing
> >
> > While both C3 and C4 will be of type-C3, I'd like to still be able
> to disable C4 without disabling C3.
>
> If we can agree not to call it "C3" and "C4", yes... The problem is
> the C-nomination is sort of a _type_ which is overloaded with the
> actual states.

C-states are enumerated C0...Cn
C-state types are enumerated C1, C2, C3.
I don't see any confusion in the name-space duplicates
as long as you know you're talking about C-states or C-state-types.

> I.e. you could have C0 state, C1 state, 2 different C2 states, and 2
> different C3 states. Then you'd have
>
> number type overloaded C-notation
>
> 0 C0 C0
> 1 C1 C1
> 2 C2 C2
> 3 C2 C3 <--- confusion/breakage
> 4 C3 C4
> 5 C3 C5

while it is probably unlikely for a system to supply
multiple C2-type states, it would be perfectly legal
and should not cause either confusion or breakage.

> Also, drivers like the ipw driver will want to disable all of _type_
> C3 sleep, AFAICS. Therefore, if you want to limit it by number instead
> of type as well, I'd suggest to add another differently named
> parameter.

I'd rather delete the workaround than further complicate it.

The workaround specifies the maximum C-state allowed (max_cstate) -- it
doesn't specify the minimum C-state type dis-allowed.
So when ipw2100 says acpi_set_cstate_limit(2), this will always work.
Yes, you could invent a system like this

type c-state
C1 C1
C3 C2
C3 C3

and that would break. But by the time somebody invents that
system, the ipw2100 which needs this workaround will not be present. It
has been replaced by the 2200BG, which has been replaced by the 2915ABG.

-Len