Date: Fri, 8 Aug 2025 14:19:58 +0100 From: Jessica Clarke <jrtc27@freebsd.org> To: Aymeric Wibo <obiwac@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 84bbfc32a3f4 - main - acpi_powerres: D3cold support Message-ID: <80E8FFC9-8A81-400A-A849-2A468B212884@freebsd.org> In-Reply-To: <202508080949.5789nfTs002732@gitrepo.freebsd.org> References: <202508080949.5789nfTs002732@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8 Aug 2025, at 10:49, Aymeric Wibo <obiwac@freebsd.org> wrote: >=20 > The branch main has been updated by obiwac: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D84bbfc32a3f47bd2e32741247afe516c= beff7789 >=20 > commit 84bbfc32a3f47bd2e32741247afe516cbeff7789 > Author: Aymeric Wibo <obiwac@FreeBSD.org> > AuthorDate: 2025-06-14 15:29:25 +0000 > Commit: Aymeric Wibo <obiwac@FreeBSD.org> > CommitDate: 2025-08-08 09:42:44 +0000 >=20 > acpi_powerres: D3cold support >=20 > Cherry-pick commit 0b76c0a from ACPICA (actypes: Distinguish = between > D3hot/cold, and default `ACPI_STATE_D3` to D3cold). >=20 > The same distinction is made between `PCI_POWERSTATE_D3_HOT` and > `PCI_POWERSTATE_D3_COLD`, as they're defined by ACPI (and are = asserted > to be the same). >=20 > D3cold is essentially the same as D3hot except the power resources = are > turned off. Add support for D3cold to `acpi_pwr_switch_consumer`. >=20 > `acpi_d_state_to_str` replaces the `printf("D%d", d_state)` = pattern, > allowing for "D3hot" and "D3cold" strings to be printed instead of = just > "D3". >=20 > Reviewed by: markj, ziaee, mckusick (mentor) > Approved by: markj, mckusick (mentor) > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D48384 > --- > share/man/man9/pci.9 | 8 +++- > sys/compat/linuxkpi/common/include/linux/pci.h | 10 ++--- > sys/contrib/dev/acpica/include/actypes.h | 8 ++-- > sys/dev/acpica/acpi.c | 9 ++-- > sys/dev/acpica/acpi_pci.c | 12 +++--- > sys/dev/acpica/acpi_powerres.c | 58 = +++++++++++++++++++------- > sys/dev/acpica/acpivar.h | 9 ++++ > sys/dev/pci/pci.c | 7 +++- > sys/dev/pci/pcivar.h | 27 ++++++------ > 9 files changed, 98 insertions(+), 50 deletions(-) >=20 > [...] > diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c > index f94438cda041..4629165f34b2 100644 > --- a/sys/dev/pci/pci.c > +++ b/sys/dev/pci/pci.c > @@ -81,6 +81,9 @@ >=20 > #include <dev/iommu/iommu.h> >=20 > +#include <contrib/dev/acpica/include/acpi.h> > +#include <dev/acpica/acpivar.h> > + This breaks non-ACPI kernel configs. Please revert or fix. Note this is particularly bad for architectures that don=E2=80=99t use / support ACPI, i.e. everything except x86 and arm64. Jessica > #include "pcib_if.h" > #include "pci_if.h" >=20 > @@ -2896,8 +2899,8 @@ pci_set_powerstate_method(device_t dev, device_t = child, int state) > } >=20 > if (bootverbose) > - pci_printf(cfg, "Transition from D%d to D%d\n", oldstate, > - state); > + pci_printf(cfg, "Transition from %s to %s\n", > + acpi_d_state_to_str(oldstate), acpi_d_state_to_str(state)); >=20 > PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_location + PCIR_POWER_STATUS, > status, 2); > [...]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?80E8FFC9-8A81-400A-A849-2A468B212884>