lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 26 Apr 2012 22:04:41 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	huang ying <huang.ying.caritas@...il.com>
Cc:	Aaron Lu <aaron.lu@....com>, Lin Ming <ming.m.lin@...el.com>,
	Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Zhang Rui <rui.zhang@...el.com>, Andiry Xu <andiry.xu@....com>,
	Alex He <alex.he@....com>
Subject: Re: [PATCH] ACPI: evaluate _PS3 when entering D3 Cold

On Thursday, April 26, 2012, huang ying wrote:
> On Wed, Apr 25, 2012 at 5:15 AM, Rafael J. Wysocki <rjw@...k.pl> wrote:
> > On Tuesday, April 24, 2012, Aaron Lu wrote:
> >> On Tue, Apr 24, 2012 at 09:15:37PM +0800, Lin Ming wrote:
> >> > >> > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> >> > >> > index 7417267..734d946 100644
> >> > >> > --- a/drivers/acpi/scan.c
> >> > >> > +++ b/drivers/acpi/scan.c
> >> > >> > @@ -908,6 +908,10 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
> >> > >> >     device->power.states[ACPI_STATE_D3].flags.valid = 1;
> >> > >> >     device->power.states[ACPI_STATE_D3].power = 0;
> >> > >> >
> >> > >> > +   /* Also set D3cold's explicit flag when _PS3 exists */
> >> > >> > +   if (device->power.states[ACPI_STATE_D3_HOT].flags.explicit_set)
> >> > >> > +           device->power.states[ACPI_STATE_D3].flags.explicit_set = 1;
> >> > >>
> >> > >> We should use ACPI_STATE_D3_COLD instead of ACPI_STATE_D3 to make thing
> >> > >> clear.
> >> > >>
> >> > > Thanks for your suggestion.
> >> > >
> >> > > Well, considering all those ACPI_STATE_D3 used in tree, I don't think I
> >> > > should use ACPI_STATE_D3_COLD here, especially the two lines above are
> >> > > still using ACPI_STATE_D3.
> >> > >
> >> > > But if that is desired, we should probably change all the existing
> >> > > ACPI_STATE_D3 macros to ACPI_STATE_D3_COLD to make things clear.
> >> > >
> >> > > Or we all use ACPI_STATE_D3, since it is defined as 4 and means D3 cold,
> >> > > and people will learn this, won't they?
> >> > >
> >> > > What do you think?
> >> >
> >> > OK.
> >> >
> >> > But we may do more cleanup later.
> >> >
> >>
> >> Sure :-)
> >> I think the first thing to do is to agree on which macro should be used,
> >> ACPI_STATE_D3 or ACPI_STATE_D3_COLD. And then replace the other one
> >> altogether.
> >
> > I'd prefer to use ACPI_STATE_D3 wherever it makes sense, because that's
> > also well defined in older versions of ACPI (think pre-ACPI-4.0 BIOSes).
> 
> Because the relationship between ACPI_STATE_D3 and ACPI_STATE_D3_COLD
> is confusing, I suggest to add some comments whenever will refer to D3
> or D3_COLD.

Oh well.

This is how it works: D3 _is_ D3_COLD except when D3_HOT is supported
(ie. _PR3 is present) in which cases saying just "D3" may be ambiguous (quite
obviously).  I think that's clear enough.

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ