Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Anshuman Gupta <anshuman.gupta@intel.com>,
	intel-xe@lists.freedesktop.org, linux-acpi@vger.kernel.org,
	linux-pci@vger.kernel.org, lenb@kernel.org, bhelgaas@google.com,
	ilpo.jarvinen@linux.intel.com, lucas.demarchi@intel.com,
	rodrigo.vivi@intel.com, badal.nilawar@intel.com,
	varun.gupta@intel.com, ville.syrjala@linux.intel.com,
	uma.shankar@intel.com
Subject: Re: [PATCH 02/12] PCI/ACPI: Add PERST# Assertion Delay _DSM method
Date: Tue, 8 Apr 2025 15:48:32 -0500	[thread overview]
Message-ID: <20250408204832.GA64565@bhelgaas> (raw)
In-Reply-To: <CAJZ5v0hQjtTCu1wXgKvBWBBegbj-VD+Z0yBspt1uFes8Xun7Cw@mail.gmail.com>

On Wed, Apr 02, 2025 at 09:36:01PM +0200, Rafael J. Wysocki wrote:
> On Wed, Apr 2, 2025 at 8:48 PM Bjorn Helgaas <helgaas@kernel.org> wrote:

> > I don't *expect* rev 5 to be different.  But as a user of it, why
> > would I change working, tested code that is not broken?
> >
> > The PCI DPC function 0xc is an example where rev 5 (per ECN) and rev 6
> > (per r3.3) are not compatible.
> >
> > If the OS implemented rev 5, then learns via function 0 that function
> > 0xc is also supported at rev 6, and starts using the same OS code with
> > rev 6, the OS is broken.
> 
> Yes, in this case the backward compatibility language in the _DSM
> definition is obviously not followed.

Rev 5 in the ECN isn't compatible with rev 6 in the PCI FW r3.3 spec,
so it doesn't follow the ACPI compatibility requirement.  And this is
documented in PCI FW, which says "Fn 0xC was added with rev 5 (see ECN
for rev 5 details); here is how rev 6 works."

An OS implemented to the ECN doesn't know that rev 6 is different from
rev 5; it assumes they're the same because ACPI says we can assume
that, and PCI FW r3.3 even says the OS should use the same rev for all
functions.  If OS adds support for rev 6 of a some other function, it
is supposed to use rev 6 of Fn 0xC, which doesn't work as the OS
expects.

I guess one could argue that "OS didn't add rev 6 support for anything
until PCI FW r3.3 added a function at rev 6, r3.3 did mention the
difference between Fn 0xC rev 5 and 6, and OS should have looked at
all the already-implemented unrelated functions for possible changes
between rev 5 and rev 6."

I think that causes unnecessary changes in unrelated code.  The OS can
avoid the problem by *always* using Fn 0xC rev 5, regardless of what
rev it uses for other functions.

Of course, the OS can include support for multiple revs, e.g., it
could add support for Fn 0xC rev 6 and use that when available.  And
it could retain support for Fn 0xC rev 5 and use that if rev 6 isn't
available.

Bjorn

  reply	other threads:[~2025-04-08 20:48 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 15:32 [PATCH 00/12] VRAM Self Refresh Anshuman Gupta
2025-04-01 15:32 ` [PATCH 01/12] PCI/ACPI: Add D3cold Aux Power Limit_DSM method Anshuman Gupta
2025-04-01 18:25   ` Bjorn Helgaas
2025-04-02 10:59     ` Rafael J. Wysocki
2025-04-03  5:25     ` Gupta, Anshuman
2025-04-01 15:32 ` [PATCH 02/12] PCI/ACPI: Add PERST# Assertion Delay _DSM method Anshuman Gupta
2025-04-01 18:30   ` Bjorn Helgaas
2025-04-03  5:59     ` Gupta, Anshuman
2025-04-02 11:06   ` Rafael J. Wysocki
2025-04-02 14:21     ` Bjorn Helgaas
2025-04-02 14:52       ` Rafael J. Wysocki
2025-04-02 15:50         ` Bjorn Helgaas
2025-04-02 17:51           ` Rafael J. Wysocki
2025-04-02 18:48             ` Bjorn Helgaas
2025-04-02 19:36               ` Rafael J. Wysocki
2025-04-08 20:48                 ` Bjorn Helgaas [this message]
2025-04-09 12:30                   ` Rafael J. Wysocki
2025-04-09 14:47                     ` Bjorn Helgaas
2025-04-09 16:28                       ` Rafael J. Wysocki
2025-04-01 15:32 ` [PATCH 03/12] PCI/ACPI: Add aux power grant notifier Anshuman Gupta
2025-04-01 20:13   ` Bjorn Helgaas
2025-04-02 11:23     ` Rafael J. Wysocki
2025-04-03 11:30       ` Gupta, Anshuman
2025-04-03 13:34         ` Rafael J. Wysocki
2025-04-03 16:08           ` Gupta, Anshuman
2025-04-03 18:15             ` Rafael J. Wysocki
2025-04-04 12:53               ` Gupta, Anshuman
2025-04-08 13:01                 ` Rafael J. Wysocki
2025-04-03  7:56     ` Gupta, Anshuman
2025-04-03 13:48       ` Rafael J. Wysocki
2025-04-01 15:32 ` [PATCH 04/12] drm/xe/vrsr: Introduce flag has_vrsr Anshuman Gupta
2025-04-01 15:32 ` [PATCH 05/12] drm/xe/vrsr: Detect VRSR Capability Anshuman Gupta
2025-04-01 15:32 ` [PATCH 06/12] drm/xe/vrsr: Initialize VRSR feature Anshuman Gupta
2025-04-01 19:56   ` Bjorn Helgaas
2025-04-03  6:09     ` Gupta, Anshuman
2025-04-01 15:32 ` [PATCH 07/12] drm/xe/vrsr: Enable VRSR on default VGA boot device Anshuman Gupta
2025-04-01 15:32 ` [PATCH 08/12] drm/xe: Add PCIe ACPI Aux Power notifier Anshuman Gupta
2025-04-01 15:32 ` [PATCH 09/12] drm/xe/vrsr: Refactor d3cold.allowed to a enum Anshuman Gupta
2025-04-01 15:32 ` [PATCH 10/12] drm/xe/pm: D3Cold target state Anshuman Gupta
2025-04-02 10:28   ` [10/12] " Poosa, Karthik
2025-04-01 15:32 ` [PATCH 11/12] drm/xe/vrsr: Enable VRSR Anshuman Gupta
2025-04-01 15:32 ` [PATCH 12/12] drm/xe/vrsr: Introduce a debugfs node named vrsr_capable Anshuman Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250408204832.GA64565@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=bhelgaas@google.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=rafael@kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=uma.shankar@intel.com \
    --cc=varun.gupta@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox