LinuxPPC-Dev Archive on lore.kernel.org
 help / color / Atom feed
From: christophe lombard <clombard@linux.vnet.ibm.com>
To: Andrew Donnellan <ajd@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, fbarrat@linux.vnet.ibm.com,
	groug@kaod.org
Subject: Re: [PATCH 3/3] powerpc/pseries: Fixup config space size of OpenCAPI devices
Date: Thu, 7 Nov 2019 09:46:25 +0100
Message-ID: <35141b5c-a48c-d0c8-a566-cd3e36121c59@linux.vnet.ibm.com> (raw)
In-Reply-To: <f80de6db-cfea-5897-288f-64d002b25d8d@linux.ibm.com>

On 05/11/2019 06:01, Andrew Donnellan wrote:
> On 22/10/19 6:52 pm, christophe lombard wrote:
>> Fix up the pci config size of the OpenCAPI PCIe devices in the pseries
>> environment.
>> Most of OpenCAPI PCIe devices have 4096 bytes of configuration space.
> 
> It's not "most of", it's "all" - the OpenCAPI Discovery and 
> Configuration Spec requires the use of extended capabilities that fall 
> in the 0x100-0xFFF range.
> 
>>
>> Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
>> ---
>>   arch/powerpc/platforms/pseries/pci.c | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/powerpc/platforms/pseries/pci.c 
>> b/arch/powerpc/platforms/pseries/pci.c
>> index 1eae1d09980c..3397784767b0 100644
>> --- a/arch/powerpc/platforms/pseries/pci.c
>> +++ b/arch/powerpc/platforms/pseries/pci.c
>> @@ -291,6 +291,15 @@ static void fixup_winbond_82c105(struct pci_dev* 
>> dev)
>>   DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, 
>> PCI_DEVICE_ID_WINBOND_82C105,
>>                fixup_winbond_82c105);
>> +static void fixup_opencapi_cfg_size(struct pci_dev *pdev)
>> +{
>> +    if (!machine_is(pseries))
>> +        return;
>> +
>> +    pdev->cfg_size = PCI_CFG_SPACE_EXP_SIZE;
>> +}
>> +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_IBM, 0x062b, 
>> fixup_opencapi_cfg_size);
> 
> An OpenCAPI device can have any PCI ID, is there a particular reason 
> we're limiting this to 1014:062b? On PowerNV, we check the PHB type to 
> determine whether the device is OpenCAPI or not, what's the equivalent 
> for pseries?
> 

Thanks for the review. For pseries, there is no specific OpenCapi PHB 
type which constraints this kind of request.
We are working to found an other solution.

>> +
>>   int pseries_root_bridge_prepare(struct pci_host_bridge *bridge)
>>   {
>>       struct device_node *dn, *pdn;
>>
> 


  reply index

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22  7:52 [PATCH 0/3] ocxl: Support for an 0penCAPI device in a QEMU guest christophe lombard
2019-10-22  7:52 ` [PATCH 1/3] ocxl: Introduce implementation-specific API christophe lombard
2019-10-22  7:52 ` [PATCH 2/3] ocxl: Add pseries-specific code christophe lombard
2019-10-28 14:40   ` christophe lombard
2019-10-22  7:52 ` [PATCH 3/3] powerpc/pseries: Fixup config space size of OpenCAPI devices christophe lombard
2019-11-05  5:01   ` Andrew Donnellan
2019-11-07  8:46     ` christophe lombard [this message]
2019-11-09 13:07       ` Greg Kurz

Reply instructions:

You may reply publically 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=35141b5c-a48c-d0c8-a566-cd3e36121c59@linux.vnet.ibm.com \
    --to=clombard@linux.vnet.ibm.com \
    --cc=ajd@linux.ibm.com \
    --cc=fbarrat@linux.vnet.ibm.com \
    --cc=groug@kaod.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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

LinuxPPC-Dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linuxppc-dev/0 linuxppc-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linuxppc-dev linuxppc-dev/ https://lore.kernel.org/linuxppc-dev \
		linuxppc-dev@lists.ozlabs.org linuxppc-dev@ozlabs.org
	public-inbox-index linuxppc-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.ozlabs.lists.linuxppc-dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git