[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <394a3748-37d5-429f-ab64-276e50b7e621@amd.com>
Date: Fri, 3 Oct 2025 15:11:49 -0500
From: "Cheatham, Benjamin" <benjamin.cheatham@....com>
To: "Bowman, Terry" <terry.bowman@....com>, Jonathan Cameron
<jonathan.cameron@...wei.com>
CC: <dave@...olabs.net>, <dave.jiang@...el.com>, <alison.schofield@...el.com>,
<dan.j.williams@...el.com>, <bhelgaas@...gle.com>, <shiju.jose@...wei.com>,
<ming.li@...omail.com>, <Smita.KoralahalliChannabasappa@....com>,
<rrichter@....com>, <dan.carpenter@...aro.org>,
<PradeepVineshReddy.Kodamati@....com>, <lukas@...ner.de>,
<sathyanarayanan.kuppuswamy@...ux.intel.com>, <linux-cxl@...r.kernel.org>,
<alucerop@....com>, <ira.weiny@...el.com>, <linux-kernel@...r.kernel.org>,
<linux-pci@...r.kernel.org>
Subject: Re: [PATCH v12 07/25] CXL/PCI: Move CXL DVSEC definitions into
uapi/linux/pci_regs.h
On 10/2/2025 10:25 AM, Bowman, Terry wrote:
>
>
> On 10/1/2025 10:58 AM, Jonathan Cameron wrote:
>> On Thu, 25 Sep 2025 17:34:22 -0500
>> Terry Bowman <terry.bowman@....com> wrote:
>>
>>> The CXL DVSECs are currently defined in cxl/core/cxlpci.h. These are not
>>> accessible to other subsystems.
>>>
>>> Change DVSEC name formatting to follow the existing PCI format in
>>> pci_regs.h. The current format uses CXL_DVSEC_XYZ. Change to be PCI_DVSEC_CXL_XYZ.
>>> Reuse the existing formatting.
>>>
>>> Update existing occurrences to match the name change.
>>>
>>> Update the inline documentation to refer to latest CXL spec version.
>>>
>>> Signed-off-by: Terry Bowman <terry.bowman@....com>
>> Maybe we discussed it in earlier versions and I've forgotten but generally renaming
>> uapi defines is a non starter.
>>
>> I was kind of assuming lspci used these, but nope, it uses hard coded
>> value of 3 and it's own defines for the fields. (A younger me even reviewed
>> the patch adding those :) )
>>
>> https://github.com/pciutils/pciutils/blob/master/ls-ecaps.c#L1279
>>
>> However, that doesn't mean other code isn't already using those defines.
>>
>> Minimum I think would be to state here why you think we can get away with
>> this change.
>>
>> Personally I'd just not bother changing that one.
>>
>> Jonathan
>>
>>
>
> Ok, I'll leave these below as-is.
>
> #define PCI_DVSEC_CXL_PORT 3
> #define PCI_DVSEC_CXL_PORT_CTL 0x0c
> #define PCI_DVSEC_CXL_PORT_CTL_UNMASK_SBR 0x00000001
>
> Terry
>
I think updating to the new names would be better here since they match the other #defines introduced here.
I don't know if this is a no-no, but just re-routing the old ones to the new ones with a comment along the
lines of "Deprecated to match other DVSEC definitions" seems fine to me.
Powered by blists - more mailing lists