[Skiboot] [PATCH v4] phb4: Activate shared PCI slot on witherspoon

Stewart Smith stewart at linux.vnet.ibm.com
Thu Jun 8 12:32:47 AEST 2017

Frederic Barrat <fbarrat at linux.vnet.ibm.com> writes:
> Le 07/06/2017 à 12:28, Stewart Smith a écrit :
>> From: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
>> Witherspoon systems come with a 'shared' PCI slot: physically, it
>> looks like a x16 slot, but it's actually two x8 slots connected to two
>> PHBs of two different chips. Taking advantage of it requires some
>> logic on the PCI adapter. Only the Mellanox CX5 adapter is known to
>> support it at the time of this writing.
>> This patch enables support for the shared slot on witherspoon if a x16
>> adapter is detected. Each x8 slot has a presence bit, so both bits
>> need to be set for the activation to take place. Slot sharing is
>> activated through a gpio.
>> Note that there's no easy way to be sure that the card is indeed a
>> shared-slot compatible PCI adapter and not a normal x16 card. Plugging
>> a normal x16 adapter on the shared slot should be avoided on
>> witherspoon, as the link won't train on the second slot, resulting in
>> a timeout and a longer boot time. Only the first slot is usable and
>> the x16 adapter will end up using only half the lines.
>> If the PCI card plugged on the physical slot is only x8 (or less),
>> then the presence bit of the second slot is not set, so this patch
>> does nothing. The x8 (or less) adapter should work like on any other
>> physical slot.
>> Signed-off-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
>> [stewart at linux.vnet.ibm.com: re-org code, move into platform file]
>> Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
>> ---
> code reorg looks ok to me. I had the _witherspoon suffix on the 
> functions to show the context, so it could be removed now that they are 
> in withersoon.c
> I guess it's debatable where that code belongs, but 1) I don't feel 
> strongly about it and 2) it would be better done around a beer and 3) 
> you're the boss anyway :-)

I like this beer based discussion you mention.

Anyway, this version pushed to master as of 5201e811bd19eebc3fbeaa11c75fed12bc8c31fe

Stewart Smith
OPAL Architect, IBM.

More information about the Skiboot mailing list