]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/P2PDMA: Introduce configfs/sysfs enable attribute helpers
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 4 Oct 2018 21:27:38 +0000 (15:27 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 17 Oct 2018 17:18:17 +0000 (12:18 -0500)
commit10c923d0a29bc005120a689c618c539d3c977806
treed54ab047d59ef11976e6c0929e7df9eb89397e39
parent739241d4385984e61a5de81820aac8276b6ad922
PCI/P2PDMA: Introduce configfs/sysfs enable attribute helpers

Users of the P2PDMA infrastructure will typically need a way for the user
to tell the kernel to use P2P resources.  Typically this will be a simple
on/off boolean operation but sometimes it may be desirable for the user to
specify the exact device to use for the P2P operation.

Add new helpers for attributes which take a boolean or a PCI device.  Any
boolean as accepted by strtobool() turn P2P on or off (such as 'y', 'n',
'1', '0', etc).  Specifying a full PCI device name/BDF will select the
specific device.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
drivers/pci/p2pdma.c
include/linux/pci-p2pdma.h