Re: [PATCH 10/13] ocxl: Add Makefile and Kconfig

From: Michael Ellerman
Date: Tue Jan 09 2018 - 18:21:11 EST




On 10 January 2018 2:45:56 am AEDT, Frederic Barrat <fbarrat@xxxxxxxxxxxxxxxxxx> wrote:
>
>
>Le 03/01/2018 Ã 06:48, Andrew Donnellan a ÃcritÂ:
>> On 19/12/17 02:21, Frederic Barrat wrote:
>>> OCXL_BASE triggers the platform support needed by the driver.
>>>
>>> Signed-off-by: Frederic Barrat <fbarrat@xxxxxxxxxxxxxxxxxx>
>>> ---
>>> Â drivers/misc/KconfigÂÂÂÂÂÂ |Â 1 +
>>> Â drivers/misc/MakefileÂÂÂÂÂ |Â 1 +
>>>  drivers/misc/ocxl/Kconfig | 25 +++++++++++++++++++++++++
>>> Â drivers/misc/ocxl/Makefile | 10 ++++++++++
>>> Â 4 files changed, 37 insertions(+)
>>> Â create mode 100644 drivers/misc/ocxl/Kconfig
>>> Â create mode 100644 drivers/misc/ocxl/Makefile
>>>
>>> diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
>>> index f1a5c2357b14..0534f338c84a 100644
>>> --- a/drivers/misc/Kconfig
>>> +++ b/drivers/misc/Kconfig
>>> @@ -508,4 +508,5 @@ source "drivers/misc/mic/Kconfig"
>>> Â source "drivers/misc/genwqe/Kconfig"
>>> Â source "drivers/misc/echo/Kconfig"
>>> Â source "drivers/misc/cxl/Kconfig"
>>> +source "drivers/misc/ocxl/Kconfig"
>>> Â endmenu
>>> diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
>>> index 5ca5f64df478..73326d54e246 100644
>>> --- a/drivers/misc/Makefile
>>> +++ b/drivers/misc/Makefile
>>> @@ -55,6 +55,7 @@ obj-$(CONFIG_CXL_BASE)ÂÂÂÂÂÂÂ += cxl/
>>> Â obj-$(CONFIG_ASPEED_LPC_CTRL)ÂÂÂ += aspeed-lpc-ctrl.o
>>> Â obj-$(CONFIG_ASPEED_LPC_SNOOP)ÂÂÂ += aspeed-lpc-snoop.o
>>> Â obj-$(CONFIG_PCI_ENDPOINT_TEST)ÂÂÂ += pci_endpoint_test.o
>>> +obj-$(CONFIG_OCXL)ÂÂÂÂÂÂÂ += ocxl/
>>>
>>> Â lkdtm-$(CONFIG_LKDTM)ÂÂÂÂÂÂÂ += lkdtm_core.o
>>> Â lkdtm-$(CONFIG_LKDTM)ÂÂÂÂÂÂÂ += lkdtm_bugs.o
>>> diff --git a/drivers/misc/ocxl/Kconfig b/drivers/misc/ocxl/Kconfig
>>> new file mode 100644
>>> index 000000000000..4496b61f48db
>>> --- /dev/null
>>> +++ b/drivers/misc/ocxl/Kconfig
>>> @@ -0,0 +1,25 @@
>>> +#
>>> +# Open Coherent Accelerator (OCXL) compatible devices
>>> +#
>>> +
>>> +config OCXL_BASE
>>> +ÂÂÂ bool
>>> +ÂÂÂ default n
>>> +ÂÂÂ select PPC_COPRO_BASE
>>> +
>>> +config OCXL
>>> +ÂÂÂ tristate "Support for Open Coherent Accelerators (OCXL)"
>>> +ÂÂÂ depends on PPC_POWERNV && PCI && EEH
>>> +ÂÂÂ select OCXL_BASE
>>> +ÂÂÂ default m
>>> +ÂÂÂ help
>>> +
>>> +ÂÂÂÂÂ Select this option to enable driver support for Open
>>> + Coherent Accelerators (OCXL). OCXL is otherwise known as
>>> +ÂÂÂÂÂ Open Coherent Accelerator Processor Interface (OCAPI).
>>> +ÂÂÂÂÂ OCAPI allows accelerators in FPGAs to be coherently attached
>>> + to a CPU through a Open CAPI link. This driver enables
>>> +ÂÂÂÂÂ userspace programs to access these accelerators through
>>> +ÂÂÂÂÂ devices found in /dev/ocxl/
>>
>> I'd prefer more consistency in how we refer to OpenCAPI. "ocxl" is a
>> driver name that we have purely for historical reasons, it's not
>really
>> the name of anything else. I know throughout the various specs and
>code,
>> we use "OCAPI" a lot, but that's not really an abbreviation that
>should
>> be "user-facing".
>>
>> Something like:
>>
>> config OCXL
>> ÂÂÂÂ tristate "OpenCAPI coherent accelerator support"
>> ÂÂÂÂ help
>>
>> ÂÂÂÂÂÂ Select this option to enable the ocxl driver for Open
>Coherent
>> ÂÂÂÂÂÂ Accelerator Processor Interface (OpenCAPI) devices.
>>
>> ÂÂÂÂÂÂ OpenCAPI allows FPGA and ASIC accelerators to be coherently
>> ÂÂÂÂÂÂ attached to a CPU over an OpenCAPI link.
>>
>> ÂÂÂÂÂÂ The ocxl driver enables userspace programs to access these
>> ÂÂÂÂÂÂ accelerators through devices in /dev/ocxl/.
>>
>> ÂÂÂÂÂÂ For more information, see http://opencapi.org.
>>
>> ÂÂÂÂÂÂ If unsure, say N.
>>
>
>Agreed, and stolen.

Would also be great to add something describing the relationship to CAPI and cxl. Otherwise people will be confused about whether they need this one or the other one or both.

cheers
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.