]> git.baikalelectronics.ru Git - kernel.git/commit
cxl: Make vPHB device node match adapter's
authorFrederic Barrat <fbarrat@linux.vnet.ibm.com>
Wed, 15 Jun 2016 14:42:16 +0000 (16:42 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 16 Jun 2016 13:11:30 +0000 (23:11 +1000)
commit61ea05cb0cb51ec427575ac2d73e37de85aa5b67
tree05156165570aecbc681ef49423a594efc96e5594
parent933323e581fbfab42dfa446d957a3f765389b897
cxl: Make vPHB device node match adapter's

On bare-metal, when a device is attached to the cxl card, lsvpd shows
a location code such as (with cxlflash):
     # lsvpd -l sg22
     ...
     *YL U78CB.001.WZS0073-P1-C33-B0-T0-L0
which makes it hard to easily identify the cxl adapter owning the
flash device, since in this example C33 refers to a P8 processor.

lsvpd looks in the parent devices until it finds a location code, so the
device node for the vPHB ends up being used.

By reusing the device node of the adapter for the vPHB, lsvpd shows:
     # lsvpd -l sg16
     ...
     *YL U78C9.001.WZS09XA-P1-C7-B1-T0-L3
where C7 is the PCI slot of the cxl adapter.

On powerVM, the vPHB was already using the adapter device node, so
there's no change there.

Tested by cxlflash on bare-metal and powerVM.

Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/cxl/vphb.c