Re: [PATCH v5 01/13] PCI/P2PDMA: Support peer-to-peer memory

2018-08-31 Thread Jonathan Cameron
On Thu, 30 Aug 2018 12:53:40 -0600 Logan Gunthorpe wrote: > Some PCI devices may have memory mapped in a BAR space that's > intended for use in peer-to-peer transactions. In order to enable > such transactions the memory must be registered with ZONE_DEVICE pages > so it can be used by DMA

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-27 Thread Jonathan Cameron
On Mon, 26 Mar 2018 09:46:24 -0600 Logan Gunthorpe <log...@deltatee.com> wrote: > On 26/03/18 08:01 AM, Bjorn Helgaas wrote: > > On Mon, Mar 26, 2018 at 12:11:38PM +0100, Jonathan Cameron wrote: > >> On Tue, 13 Mar 2018 10:43:55 -0600 > >> Logan Gunt

Re: [PATCH v3 01/11] PCI/P2PDMA: Support peer-to-peer memory

2018-03-26 Thread Jonathan Cameron
On Tue, 13 Mar 2018 10:43:55 -0600 Logan Gunthorpe wrote: > On 12/03/18 09:28 PM, Sinan Kaya wrote: > > On 3/12/2018 3:35 PM, Logan Gunthorpe wrote: > > Regarding the switch business, It is amazing how much trouble you went into > > limit this functionality into very

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-17 Thread Jonathan Cameron
ed all these drivers to ensure that all ioctl arguments > are used as pointers or are ignored, but are not interpreted as integer > values. > > Signed-off-by: Arnd Bergmann > --- For IIO part. Acked-by: Jonathan Cameron Thanks, > diff --git a/drivers/iio/industrialio-

Re: [RFC PATCH 4/5] acpi/hmat: Register special purpose memory as a device

2019-04-05 Thread Jonathan Cameron
target application. > However, if the administrator prefers that some or all of the special > purpose memory is made available to the core-mm the device-dax hotplug > facility can be used to online the memory with its own numa node. > > Cc: "Rafael J. Wysocki" > Cc: Len Brow

Re: [RFC PATCH 4/5] acpi/hmat: Register special purpose memory as a device

2019-04-05 Thread Jonathan Cameron
On Fri, 5 Apr 2019 08:43:03 -0700 Dan Williams wrote: > On Fri, Apr 5, 2019 at 4:19 AM Jonathan Cameron > wrote: > > > > On Thu, 4 Apr 2019 12:08:49 -0700 > > Dan Williams wrote: > > > > > Memory that has been tagged EFI_SPECIAL_PURPOSE, and has

Re: [RFC PATCH 4/5] acpi/hmat: Register special purpose memory as a device

2019-04-05 Thread Jonathan Cameron
On Fri, 5 Apr 2019 09:56:22 -0700 Dan Williams wrote: > On Fri, Apr 5, 2019 at 9:24 AM Jonathan Cameron > wrote: > > > > On Fri, 5 Apr 2019 08:43:03 -0700 > > Dan Williams wrote: > > > > > On Fri, Apr 5, 2019 at 4:19 AM Jonathan Cameron > > >

Re: [PATCH v4 01/10] acpi/numa: Establish a new drivers/acpi/numa/ directory

2019-06-25 Thread Jonathan Cameron
On Mon, 24 Jun 2019 11:19:32 -0700 Dan Williams wrote: > Currently hmat.c lives under an "hmat" directory which does not enhance > the description of the file. The initial motivation for giving hmat.c > its own directory was to delineate it as mm functionality in contrast to > ACPI device driver

Re: [PATCH v4 08/10] device-dax: Add a driver for "hmem" devices

2019-06-25 Thread Jonathan Cameron
Dave Hansen > Signed-off-by: Dan Williams No need to have a remove function at all. Otherwise this looks good to me. Reviewed-by: Jonathan Cameron > --- > drivers/dax/Kconfig| 27 +++ > drivers/dax/Makefile |2 ++ > drivers/dax/hmem.c | 57

Re: [PATCH v4 10/10] acpi/numa/hmat: Register "specific purpose" memory as an "hmem" device

2019-06-25 Thread Jonathan Cameron
29 GB)", > "align":2097152, > "devices":[ > { > "chardev":"dax0.0", > "size":"4.00 GiB (4.29 GB)" > } > ] > } > ] > > # cat /proc/iomem > [..] > 240

Re: [PATCH v2 08/27] ocxl: Save the device serial number in ocxl_fn

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:36 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > This patch retrieves the serial number of the card and makes it available > to consumers of the ocxl driver via the ocxl_fn struct. > > Signed-off-by: Alastair D'Silva > Acked-by: Frederic Barrat >

Re: [PATCH v2 24/27] nvdimm/ocxl: Implement Overwrite

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:52 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > The near storage command 'Secure Erase' overwrites all data on the > media. > > This patch hooks it up to the security function 'overwrite'. > > Signed-off-by: Alastair D'Silva A few things to tidy up in

Re: [PATCH v2 22/27] nvdimm/ocxl: Implement the heartbeat command

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:50 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > The heartbeat admin command is a simple admin command that exercises > the communication mechanisms within the controller. > > This patch issues a heartbeat command to the card during init to ensure > we

Re: [PATCH v2 10/27] nvdimm: Add driver for OpenCAPI Storage Class Memory

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:38 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > This driver exposes LPC memory on OpenCAPI SCM cards > as an NVDIMM, allowing the existing nvram infrastructure > to be used. > > Namespace metadata is stored on the media itself, so >

Re: [PATCH v2 07/27] ocxl: Add functions to map/unmap LPC memory

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:35 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > Add functions to map/unmap LPC memory > > Signed-off-by: Alastair D'Silva > --- > drivers/misc/ocxl/config.c| 4 +++ > drivers/misc/ocxl/core.c | 50 +++ >

Re: [PATCH v2 06/27] ocxl: Tally up the LPC memory on a link & allow it to be mapped

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:34 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > Tally up the LPC memory on an OpenCAPI link & allow it to be mapped > > Signed-off-by: Alastair D'Silva Hi Alastair, A few trivial comments inline. Jonathan > --- > drivers/misc/ocxl/core.c |

Re: [PATCH v2 14/27] nvdimm/ocxl: Add support for near storage commands

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:42 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > Similar to the previous patch, this adds support for near storage commands. > > Signed-off-by: Alastair D'Silva > --- > drivers/nvdimm/ocxl/scm.c | 6 + > drivers/nvdimm/ocxl/scm_internal.c

Re: [PATCH v2 12/27] nvdimm/ocxl: Read the capability registers & wait for device ready

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:40 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > This patch reads timeouts & firmware version from the controller, and > uses those timeouts to wait for the controller to report that it is ready > before handing the memory over to libnvdimm. > >

Re: [PATCH v2 13/27] nvdimm/ocxl: Add support for Admin commands

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:41 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > This patch requests the metadata required to issue admin commands, as well > as some helper functions to construct and check the completion of the > commands. > > Signed-off-by: Alastair D'Silva A few

Re: [PATCH 06/17] Documentation/driver-api: generic-counter: drop doubled word

2020-07-04 Thread Jonathan Cameron
On Sat, 4 Jul 2020 08:30:41 -0400 William Breathitt Gray wrote: > On Fri, Jul 03, 2020 at 08:44:51PM -0700, Randy Dunlap wrote: > > Drop the doubled word "the". > > > > Signed-off-by: Randy Dunlap > > Cc: Jonathan Corbet > > Cc: linux-...@vger.kernel.org > > Cc: William Breathitt Gray > >

Re: [PATCH 07/17] Documentation/driver-api: iio/buffers: drop doubled word

2020-07-04 Thread Jonathan Cameron
On Fri, 3 Jul 2020 20:44:52 -0700 Randy Dunlap wrote: > Drop the doubled word "struct". > > Signed-off-by: Randy Dunlap > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org > Cc: William Breathitt Gray > Cc: linux-...@vger.kernel.org Applied to the togreg branch of iio.git. Thanks,

Re: [PATCH 01/14] cxl/mem: Introduce a driver for CXL-2.0-Type-3 endpoints

2021-02-01 Thread Jonathan Cameron
On Fri, 29 Jan 2021 16:24:25 -0800 Ben Widawsky wrote: > From: Dan Williams > > The CXL.mem protocol allows a device to act as a provider of "System > RAM" and/or "Persistent Memory" that is fully coherent as if the memory > was attached to the typical CPU memory controller. > > With the

Re: [PATCH v2 1/8] cxl/mem: Introduce a driver for CXL-2.0-Type-3 endpoints

2021-02-10 Thread Jonathan Cameron
on future versions!) With the define of PCI_EXT_CAP_ID_DVSEC dropped (it's in the generic header already). Reviewed-by: Jonathan Cameron > --- > Documentation/driver-api/cxl/index.rst| 12 > .../driver-api/cxl/memory-devices.rst | 29 + >

Re: [PATCH v2 1/8] cxl/mem: Introduce a driver for CXL-2.0-Type-3 endpoints

2021-02-10 Thread Jonathan Cameron
On Wed, 10 Feb 2021 09:12:20 -0800 Ben Widawsky wrote: ... > > > +} > > > + > > > +static int cxl_mem_probe(struct pci_dev *pdev, const struct > > > pci_device_id *id) > > > +{ > > > + struct device *dev = >dev; > > > + int regloc; > > > + > > > + regloc = cxl_mem_dvsec(pdev,

Re: [PATCH v2 2/8] cxl/mem: Find device capabilities

2021-02-10 Thread Jonathan Cameron
On Wed, 10 Feb 2021 08:55:57 -0800 Ben Widawsky wrote: > On 21-02-10 15:07:59, Jonathan Cameron wrote: > > On Wed, 10 Feb 2021 13:32:52 + > > Jonathan Cameron wrote: > > > > > On Tue, 9 Feb 2021 16:02:53 -0800 > > > Ben Widawsky wrote: > &

Re: [PATCH v2 2/8] cxl/mem: Find device capabilities

2021-02-10 Thread Jonathan Cameron
On Tue, 9 Feb 2021 16:02:53 -0800 Ben Widawsky wrote: > Provide enough functionality to utilize the mailbox of a memory device. > The mailbox is used to interact with the firmware running on the memory > device. The flow is proven with one implemented command, "identify". > Because the class

Re: [PATCH v2 2/8] cxl/mem: Find device capabilities

2021-02-10 Thread Jonathan Cameron
On Tue, 9 Feb 2021 16:02:53 -0800 Ben Widawsky wrote: > Provide enough functionality to utilize the mailbox of a memory device. > The mailbox is used to interact with the firmware running on the memory > device. The flow is proven with one implemented command, "identify". > Because the class

Re: [PATCH v2 2/8] cxl/mem: Find device capabilities

2021-02-10 Thread Jonathan Cameron
On Wed, 10 Feb 2021 13:32:52 + Jonathan Cameron wrote: > On Tue, 9 Feb 2021 16:02:53 -0800 > Ben Widawsky wrote: > > > Provide enough functionality to utilize the mailbox of a memory device. > > The mailbox is used to interact with the firmware running on the memory

Re: [PATCH v2 3/8] cxl/mem: Register CXL memX devices

2021-02-10 Thread Jonathan Cameron
uction. Either way with the header move to earlier patch I'm fine with this one. Reviewed-by: Jonathan Cameron > --- > Documentation/ABI/testing/sysfs-bus-cxl | 26 ++ > .../driver-api/cxl/memory-devices.rst | 17 + > drivers/cxl/Makefile

Re: [PATCH v2 4/8] cxl/mem: Add basic IOCTL interface

2021-02-10 Thread Jonathan Cameron
On Tue, 9 Feb 2021 16:02:55 -0800 Ben Widawsky wrote: > Add a straightforward IOCTL that provides a mechanism for userspace to > query the supported memory device commands. CXL commands as they appear > to userspace are described as part of the UAPI kerneldoc. The command > list returned via

Re: [PATCH v2 2/8] cxl/mem: Find device capabilities

2021-02-11 Thread Jonathan Cameron
On Wed, 10 Feb 2021 11:54:29 -0800 Dan Williams wrote: > > > ... > > > > > > > +static void cxl_mem_mbox_timeout(struct cxl_mem *cxlm, > > > > +struct mbox_cmd *mbox_cmd) > > > > +{ > > > > + struct device *dev = >pdev->dev; > > > > + > > > > + dev_dbg(dev,

Re: [PATCH v2 4/8] cxl/mem: Add basic IOCTL interface

2021-02-11 Thread Jonathan Cameron
On Wed, 10 Feb 2021 20:40:52 -0800 Dan Williams wrote: > On Wed, Feb 10, 2021 at 10:47 AM Jonathan Cameron > wrote: > [..] > > > +#define CXL_CMDS > > > \ > > >

Re: [PATCH v2 3/8] cxl/mem: Register CXL memX devices

2021-02-11 Thread Jonathan Cameron
On Wed, 10 Feb 2021 18:17:25 + Jonathan Cameron wrote: > On Tue, 9 Feb 2021 16:02:54 -0800 > Ben Widawsky wrote: > > > From: Dan Williams > > > > Create the /sys/bus/cxl hierarchy to enumerate: > > > > * Memory Devices (per-endpoint control d

Re: [PATCH v2 2/8] cxl/mem: Find device capabilities

2021-02-11 Thread Jonathan Cameron
On Wed, 10 Feb 2021 10:16:05 -0800 Ben Widawsky wrote: > On 21-02-10 08:55:57, Ben Widawsky wrote: > > On 21-02-10 15:07:59, Jonathan Cameron wrote: > > > On Wed, 10 Feb 2021 13:32:52 +0000 > > > Jonathan Cameron wrote: > > > > > > > On Tue

Re: [PATCH v2 7/8] cxl/mem: Add set of informational commands

2021-02-11 Thread Jonathan Cameron
there has been no reason to inspect payload data. > Given the need to check the log type add a new "validate_payload" > operation to define a generic mechanism to restrict / filter commands. > > Signed-off-by: Ben Widawsky > Reviewed-by: Dan Williams Review

Re: [PATCH v2 5/8] cxl/mem: Add a "RAW" send command

2021-02-11 Thread Jonathan Cameron
On Tue, 9 Feb 2021 16:02:56 -0800 Ben Widawsky wrote: > The CXL memory device send interface will have a number of supported > commands. The raw command is not such a command. Raw commands allow > userspace to send a specified opcode to the underlying hardware and > bypass all driver checks on

Re: [PATCH v2 6/8] cxl/mem: Enable commands via CEL

2021-02-11 Thread Jonathan Cameron
On Tue, 9 Feb 2021 16:02:57 -0800 Ben Widawsky wrote: > CXL devices identified by the memory-device class code must implement > the Device Command Interface (described in 8.2.9 of the CXL 2.0 spec). > While the driver already maintains a list of commands it supports, there > is still a need to

Re: [PATCH 02/14] cxl/mem: Map memory device registers

2021-02-01 Thread Jonathan Cameron
On Mon, 1 Feb 2021 08:46:24 -0800 Ben Widawsky wrote: > On 21-01-30 15:51:42, David Rientjes wrote: > > On Fri, 29 Jan 2021, Ben Widawsky wrote: > > > > > diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h > > > new file mode 100644 > > > index ..d81d0ba4617c > > > --- /dev/null >

Re: [PATCH v2 5/8] cxl/mem: Add a "RAW" send command

2021-02-12 Thread Jonathan Cameron
On Thu, 11 Feb 2021 08:01:48 -0800 Ben Widawsky wrote: > On 21-02-11 11:19:24, Jonathan Cameron wrote: > > On Tue, 9 Feb 2021 16:02:56 -0800 > > Ben Widawsky wrote: > > > > > The CXL memory device send interface will have a number of supported &

Re: [PATCH v2 3/8] cxl/mem: Register CXL memX devices

2021-02-12 Thread Jonathan Cameron
On Thu, 11 Feb 2021 12:40:45 -0800 Dan Williams wrote: > On Thu, Feb 11, 2021 at 2:19 AM Jonathan Cameron > wrote: > > > > On Wed, 10 Feb 2021 18:17:25 + > > Jonathan Cameron wrote: > > > > > On Tue, 9 Feb 2021 16:02:54 -0800 > > > Ben Wid

Re: [PATCH v2 2/8] cxl/mem: Find device capabilities

2021-02-12 Thread Jonathan Cameron
On Thu, 11 Feb 2021 10:27:41 -0800 Ben Widawsky wrote: > On 21-02-11 09:55:48, Jonathan Cameron wrote: > > On Wed, 10 Feb 2021 10:16:05 -0800 > > Ben Widawsky wrote: > > > > > On 21-02-10 08:55:57, Ben Widawsky wrote: > > > > On

Re: [PATCH v2 2/8] cxl/mem: Find device capabilities

2021-02-12 Thread Jonathan Cameron
On Thu, 11 Feb 2021 07:55:29 -0800 Ben Widawsky wrote: > On 21-02-11 09:55:48, Jonathan Cameron wrote: > > On Wed, 10 Feb 2021 10:16:05 -0800 > > Ben Widawsky wrote: > > > > > On 21-02-10 08:55:57, Ben Widawsky wrote: > > > > On

Re: [PATCH v4 2/9] cxl/mem: Find device capabilities

2021-02-16 Thread Jonathan Cameron
On Mon, 15 Feb 2021 17:45:31 -0800 Ben Widawsky wrote: > Provide enough functionality to utilize the mailbox of a memory device. > The mailbox is used to interact with the firmware running on the memory > device. The flow is proven with one implemented command, "identify". > Because the class

Re: [PATCH v4 4/9] cxl/mem: Add basic IOCTL interface

2021-02-16 Thread Jonathan Cameron
On Mon, 15 Feb 2021 17:45:33 -0800 Ben Widawsky wrote: > Add a straightforward IOCTL that provides a mechanism for userspace to > query the supported memory device commands. CXL commands as they appear > to userspace are described as part of the UAPI kerneldoc. The command > list returned via

Re: [PATCH v4 5/9] cxl/mem: Add a "RAW" send command

2021-02-16 Thread Jonathan Cameron
ow' it has been done. I guess it's now just up to us to hassle our hardware colleagues into only using this facility when absolutely necessary... Reviewed-by: Jonathan Cameron > --- > drivers/cxl/Kconfig | 18 + > drivers/cxl/mem.c| 132 +

Re: [PATCH v4 6/9] cxl/mem: Enable commands via CEL

2021-02-16 Thread Jonathan Cameron
akes development > and debugging easier. > - Certain helpers are easily achievable, like cxl_for_each_cmd(). > > Signed-off-by: Ben Widawsky > Reviewed-by: Dan Williams A few trivial, now unnecessary casts following on from you changing the types of the buffer pointers passed to cxl_mem

Re: [PATCH v4 9/9] cxl/mem: Add payload dumping for debug

2021-02-16 Thread Jonathan Cameron
On Mon, 15 Feb 2021 17:45:38 -0800 Ben Widawsky wrote: > It's often useful in debug scenarios to see what the hardware has dumped > out. As it stands today, any device error will result in the payload not > being copied out, so there is no way to triage commands which weren't > expected to fail

Re: [PATCH v4 2/9] cxl/mem: Find device capabilities

2021-02-16 Thread Jonathan Cameron
On Tue, 16 Feb 2021 08:43:03 -0800 Ben Widawsky wrote: > On 21-02-16 14:51:48, Jonathan Cameron wrote: > > On Mon, 15 Feb 2021 17:45:31 -0800 > > Ben Widawsky wrote: > > > > > Provide enough functionality to utilize the mailbox of a memory device. > &g

Re: [PATCH v4 4/9] cxl/mem: Add basic IOCTL interface

2021-02-16 Thread Jonathan Cameron
On Tue, 16 Feb 2021 09:53:14 -0800 Ben Widawsky wrote: > On 21-02-16 15:22:23, Jonathan Cameron wrote: > > On Mon, 15 Feb 2021 17:45:33 -0800 > > Ben Widawsky wrote: > > > > > Add a straightforward IOCTL that provides a mechanism for userspace to > >

Re: [PATCH v4 4/9] cxl/mem: Add basic IOCTL interface

2021-02-17 Thread Jonathan Cameron
On Tue, 16 Feb 2021 10:34:32 -0800 Ben Widawsky wrote: ... > > > diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c > > > index 237b956f0be0..4ca4f5afd9d2 100644 > > > --- a/drivers/cxl/mem.c > > > +++ b/drivers/cxl/mem.c > > > @@ -686,7 +686,11 @@ static int cxl_validate_cmd_from_user(struct

Re: [PATCH v5 2/9] cxl/mem: Find device capabilities

2021-02-17 Thread Jonathan Cameron
Link: https://www.computeexpresslink.org/download-the-specification > Signed-off-by: Ben Widawsky > Reviewed-by: Dan Williams (v2) Looks good to me. Reviewed-by: Jonathan Cameron ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH v5 4/9] cxl/mem: Add basic IOCTL interface

2021-02-17 Thread Jonathan Cameron
ossibly inspect the input (or output) payload to determine whether > or not the command is allowed (or might taint the kernel). > > Reported-by: kernel test robot # bug in earlier revision > Reported-by: Stephen Rothwell > Cc: Al Viro > Signed-off-by: Ben Widawsky &

Re: [PATCH v2] cxl/mem: Fix potential memory leak

2021-02-22 Thread Jonathan Cameron
f-by: Ben Widawsky I'd probably have used a goto and label but I guess this works fine a well. FWIW on such a small patch. Reviewed-by: Jonathan Cameron > --- > drivers/cxl/mem.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/cxl/mem.c b/d