From nobody Fri Aug 8 13:35:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bz4lz1Yctz63rKD; Fri, 08 Aug 2025 13:35:27 +0000 (UTC) (envelope-from obiwac@gmail.com) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bz4ly6DZXz3hsj; Fri, 08 Aug 2025 13:35:26 +0000 (UTC) (envelope-from obiwac@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-6157b5d0cc2so3063035a12.1; Fri, 08 Aug 2025 06:35:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754660125; x=1755264925; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W8exmYIuZCsAQ2OCmUdQ8BIaVQURuBEuUHhAV75jMjU=; b=XmybCVpf1BDHQ3QzHuNrRTHeAnE2sUGkus4iqbkVac+atedcww+iTYQM9C/82vSn8y dJDxGMvEH5njMs/LcyN2z6b/xCbHGxd4QWmKstUcJbHIRw/xSkNDby4v7n2tSfCewghq kbgmou0RsMGZdAc5oZt0a5HZQs2lUb9T/TWujL9uOfHGMwz5zDanqdWRo0i6LXYRc5kT 6+iy/p76zXD6l4GQazulLyj0iyhkQr9MG8T78Fvw9UgwqeIrC4lfSocmQPLENLs2Yfmt 63G4VTj1JOeWyP7ABt8WU/TxVpkPPXVIeYOnpr5Mt3Dow09P0BG/wVd1YbEo9BjrVLM+ 4/1w== X-Forwarded-Encrypted: i=1; AJvYcCVZ6RYaDQ+QpUEmO9Megstc22tXlInZNUvL7TcEhBT5FmER6fJ+egSEOGawoktmK2ABnjXJDJOy/Hk839yjaTMd+W6q@freebsd.org, AJvYcCXvi1OOtXXHJQMC8a4NoHqqPJJStuR+zJTLfrEf4LmHpuIOXfSmjiBTbjxBaJTtTH70TfZddhAJl/gDmrUity9HzvTFoDE=@freebsd.org X-Gm-Message-State: AOJu0Yw5S05mHOpJmOoVY6NalOyLuF82uWAS5zIbBDLULUSwQMQR8NOw 2bi3yS8yZLj8QI2ZL1wuCnONwF5b6rwppTu0qQe+7wtcjL/0aLYpG8t+uh7ZDg== X-Gm-Gg: ASbGncu0Sg9hEG54fwNeg61m7DXvmwJp4eA9wvUVzKNpDygiQPJohJuPm7lzVrnSH5O E25r28AS+TGtV8u8GHPPopl1B+wwW+PBLXHokrWPqa+QMsR5jjsaTCtcrCiApZvNMO3AScfsmcO ZHSN9q8y98cTcx9oef160YZYJbeSdSSTp1Yzv43JZEYXGuYQFBt+CoQAzrp0SOy+EBZLBPi9L3Z 0rtaC5a6hyAF7V+qPwBbVjT7ayxWVebcp9rtIkYtk30/HVEylArW0uddzeUkZgzTtxt3APDtnjn B24aY34gjO5L3Z3VZEeWvhriG8qSIP2q2Hw81xNkpQdLv5/YEU6RRXBKhmJ1/xeSy8mUqrSFlYo yyV+drbDQGd3BmJalLKvxbiZSV40wPxN5FgRfifQDJOzGjV6Z54uu3Wvm6g== X-Google-Smtp-Source: AGHT+IEscI/wjhj7CjXUNkvPPgo5Ny09hKHfqf1dspPVVRp6DHoozrzaEogEbSftevAiE6mVn1NmhQ== X-Received: by 2002:a05:6402:26d1:b0:615:5aec:561b with SMTP id 4fb4d7f45d1cf-617e2c4bc68mr2185060a12.17.1754660124943; Fri, 08 Aug 2025 06:35:24 -0700 (PDT) Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com. [209.85.218.41]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6178b074a38sm5528041a12.32.2025.08.08.06.35.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Aug 2025 06:35:24 -0700 (PDT) Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-af93c3bac8fso310193866b.2; Fri, 08 Aug 2025 06:35:24 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWs3/b3EWgMtrFzuQI8MWTwOZsyJQwiIOmlukf6ZAnLURO35V8GEJsNDaHFB2KiK5BGUh/nWUkjbv+UWX62HDjcYQLo@freebsd.org, AJvYcCXXk4+Ayo9r1R7VPJzXVwvKbPgkW5BAf6gHwe0JqpW9ceIErtDNqeMhj2Nxodg+FtR8p2hUvv4o/ffR4mjYllipqTgJNcE=@freebsd.org X-Received: by 2002:a17:907:3f94:b0:af9:14cf:d808 with SMTP id a640c23a62f3a-af9c654272amr279171766b.55.1754660124242; Fri, 08 Aug 2025 06:35:24 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202508080949.5789nfTs002732@gitrepo.freebsd.org> <80E8FFC9-8A81-400A-A849-2A468B212884@freebsd.org> In-Reply-To: <80E8FFC9-8A81-400A-A849-2A468B212884@freebsd.org> From: obiwac Date: Fri, 8 Aug 2025 15:35:13 +0200 X-Gmail-Original-Message-ID: X-Gm-Features: Ac12FXzKWRuHCKDCwamS4mu1hd8k5HksAkgyGb6bHHXyxCvVTiEvsY4vY0ok-N0 Message-ID: Subject: Re: git: 84bbfc32a3f4 - main - acpi_powerres: D3cold support To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4bz4ly6DZXz3hsj X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] Oops, sorry about the screw up, https://reviews.freebsd.org/D51823. On Fri, 8 Aug 2025 at 15:20, Jessica Clarke wrote: > > On 8 Aug 2025, at 10:49, Aymeric Wibo wrote: > > > > The branch main has been updated by obiwac: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D84bbfc32a3f47bd2e3274124= 7afe516cbeff7789 > > > > commit 84bbfc32a3f47bd2e32741247afe516cbeff7789 > > Author: Aymeric Wibo > > AuthorDate: 2025-06-14 15:29:25 +0000 > > Commit: Aymeric Wibo > > CommitDate: 2025-08-08 09:42:44 +0000 > > > > acpi_powerres: D3cold support > > > > Cherry-pick commit 0b76c0a from ACPICA (actypes: Distinguish between > > D3hot/cold, and default `ACPI_STATE_D3` to D3cold). > > > > The same distinction is made between `PCI_POWERSTATE_D3_HOT` and > > `PCI_POWERSTATE_D3_COLD`, as they're defined by ACPI (and are assert= ed > > to be the same). > > > > D3cold is essentially the same as D3hot except the power resources a= re > > turned off. Add support for D3cold to `acpi_pwr_switch_consumer`. > > > > `acpi_d_state_to_str` replaces the `printf("D%d", d_state)` pattern, > > allowing for "D3hot" and "D3cold" strings to be printed instead of j= ust > > "D3". > > > > 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(-) > > > > [...] > > 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 @@ > > > > #include > > > > +#include > > +#include > > + > > 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" > > > > @@ -2896,8 +2899,8 @@ pci_set_powerstate_method(device_t dev, device_t = child, int state) > > } > > > > 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)); > > > > PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_location + PCIR_POWER_STATUS, > > status, 2); > > [...] >