From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20D6EC3F2C6 for ; Wed, 11 Mar 2020 03:32:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C634421927 for ; Wed, 11 Mar 2020 03:32:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C634421927 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=au1.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 464496B0003; Tue, 10 Mar 2020 23:32:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4150A6B0006; Tue, 10 Mar 2020 23:32:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2DD586B0007; Tue, 10 Mar 2020 23:32:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0170.hostedemail.com [216.40.44.170]) by kanga.kvack.org (Postfix) with ESMTP id 0F6EC6B0003 for ; Tue, 10 Mar 2020 23:32:39 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CD5775DD3 for ; Wed, 11 Mar 2020 03:32:38 +0000 (UTC) X-FDA: 76581659196.29.fold40_51376c5032f5a X-HE-Tag: fold40_51376c5032f5a X-Filterd-Recvd-Size: 18572 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Wed, 11 Mar 2020 03:32:37 +0000 (UTC) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02B3KVJ0131916 for ; Tue, 10 Mar 2020 23:32:36 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ypqrr10mr-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 10 Mar 2020 23:32:36 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 11 Mar 2020 03:32:33 -0000 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 11 Mar 2020 03:32:26 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02B3VPUv9503050 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Mar 2020 03:31:25 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4CB8842045; Wed, 11 Mar 2020 03:32:25 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A131342041; Wed, 11 Mar 2020 03:32:24 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 11 Mar 2020 03:32:24 +0000 (GMT) Received: from adsilva.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 834C3A0130; Wed, 11 Mar 2020 14:32:19 +1100 (AEDT) Subject: Re: [PATCH v3 20/27] powerpc/powernv/pmem: Forward events to userspace From: "Alastair D'Silva" To: Frederic Barrat Cc: "Aneesh Kumar K . V" , "Oliver O'Halloran" , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Andrew Donnellan , Arnd Bergmann , Greg Kroah-Hartman , Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny , Andrew Morton , Mauro Carvalho Chehab , "David S. Miller" , Rob Herring , Anton Blanchard , Krzysztof Kozlowski , Mahesh Salgaonkar , Madhavan Srinivasan , =?ISO-8859-1?Q?C=E9dric?= Le Goater , Anju T Sudhakar , Hari Bathini , Thomas Gleixner , Greg Kurz , Nicholas Piggin , Masahiro Yamada , Alexey Kardashevskiy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-nvdimm@lists.01.org, linux-mm@kvack.org Date: Wed, 11 Mar 2020 14:32:23 +1100 In-Reply-To: <7ee589c0-2c02-9b8e-95a9-743ce29674ec@linux.ibm.com> References: <20200221032720.33893-1-alastair@au1.ibm.com> <20200221032720.33893-21-alastair@au1.ibm.com> <7ee589c0-2c02-9b8e-95a9-743ce29674ec@linux.ibm.com> Organization: IBM Australia Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 20031103-0012-0000-0000-0000038F3534 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20031103-0013-0000-0000-000021CC0233 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-03-10_17:2020-03-10,2020-03-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 spamscore=0 malwarescore=0 suspectscore=2 adultscore=0 phishscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003110019 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 2020-03-04 at 12:00 +0100, Frederic Barrat wrote: >=20 > Le 21/02/2020 =C3=A0 04:27, Alastair D'Silva a =C3=A9crit : > > From: Alastair D'Silva > >=20 > > Some of the interrupts that the card generates are better handled > > by the userspace daemon, in particular: > > Controller Hardware/Firmware Fatal > > Controller Dump Available > > Error Log available > >=20 > > This patch allows a userspace application to register an eventfd > > with > > the driver via SCM_IOCTL_EVENTFD to receive notifications of these > > interrupts. > >=20 > > Userspace can then identify what events have occurred by calling > > SCM_IOCTL_EVENT_CHECK and checking against the SCM_IOCTL_EVENT_FOO > > masks. > >=20 > > Signed-off-by: Alastair D'Silva > > --- > > arch/powerpc/platforms/powernv/pmem/ocxl.c | 216 > > ++++++++++++++++++ > > .../platforms/powernv/pmem/ocxl_internal.h | 5 + > > include/uapi/nvdimm/ocxl-pmem.h | 16 ++ > > 3 files changed, 237 insertions(+) > >=20 > > diff --git a/arch/powerpc/platforms/powernv/pmem/ocxl.c > > b/arch/powerpc/platforms/powernv/pmem/ocxl.c > > index 009d4fd29e7d..e46696d3cc36 100644 > > --- a/arch/powerpc/platforms/powernv/pmem/ocxl.c > > +++ b/arch/powerpc/platforms/powernv/pmem/ocxl.c > > @@ -10,6 +10,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -335,11 +336,22 @@ static void free_ocxlpmem(struct ocxlpmem > > *ocxlpmem) > > { > > int rc; > > =20 > > + // Disable doorbells > > + (void)ocxl_global_mmio_set64(ocxlpmem->ocxl_afu, > > GLOBAL_MMIO_CHIEC, > > + OCXL_LITTLE_ENDIAN, > > + GLOBAL_MMIO_CHI_ALL); > > + > > if (ocxlpmem->nvdimm_bus) > > nvdimm_bus_unregister(ocxlpmem->nvdimm_bus); > > =20 > > free_minor(ocxlpmem); > > =20 > > + if (ocxlpmem->irq_addr[1]) > > + iounmap(ocxlpmem->irq_addr[1]); > > + > > + if (ocxlpmem->irq_addr[0]) > > + iounmap(ocxlpmem->irq_addr[0]); > > + > > if (ocxlpmem->cdev.owner) > > cdev_del(&ocxlpmem->cdev); > > =20 > > @@ -443,6 +455,11 @@ static int file_release(struct inode *inode, > > struct file *file) > > { > > struct ocxlpmem *ocxlpmem =3D file->private_data; > > =20 > > + if (ocxlpmem->ev_ctx) { > > + eventfd_ctx_put(ocxlpmem->ev_ctx); > > + ocxlpmem->ev_ctx =3D NULL; > > + } > > + > > ocxlpmem_put(ocxlpmem); > > return 0; > > } > > @@ -938,6 +955,51 @@ static int ioctl_controller_stats(struct > > ocxlpmem *ocxlpmem, > > return rc; > > } > > =20 > > +static int ioctl_eventfd(struct ocxlpmem *ocxlpmem, > > + struct ioctl_ocxl_pmem_eventfd __user *uarg) > > +{ > > + struct ioctl_ocxl_pmem_eventfd args; > > + > > + if (copy_from_user(&args, uarg, sizeof(args))) > > + return -EFAULT; > > + > > + if (ocxlpmem->ev_ctx) > > + return -EINVAL; >=20 > EBUSY? >=20 Ok >=20 > > + > > + ocxlpmem->ev_ctx =3D eventfd_ctx_fdget(args.eventfd); > > + if (!ocxlpmem->ev_ctx) > > + return -EFAULT; >=20 > Why not use what eventfd_ctx_fdget() returned? (through some > IS_ERR()=20 > and PTR_ERR() convolution) >=20 Ok >=20 > > + > > + return 0; > > +} > > + > > +static int ioctl_event_check(struct ocxlpmem *ocxlpmem, u64 __user > > *uarg) > > +{ > > + u64 val =3D 0; > > + int rc; > > + u64 chi =3D 0; > > + > > + rc =3D ocxlpmem_chi(ocxlpmem, &chi); > > + if (rc < 0) > > + return rc; > > + > > + if (chi & GLOBAL_MMIO_CHI_ELA) > > + val |=3D IOCTL_OCXL_PMEM_EVENT_ERROR_LOG_AVAILABLE; > > + > > + if (chi & GLOBAL_MMIO_CHI_CDA) > > + val |=3D IOCTL_OCXL_PMEM_EVENT_CONTROLLER_DUMP_AVAILABLE; > > + > > + if (chi & GLOBAL_MMIO_CHI_CFFS) > > + val |=3D IOCTL_OCXL_PMEM_EVENT_FIRMWARE_FATAL; > > + > > + if (chi & GLOBAL_MMIO_CHI_CHFS) > > + val |=3D IOCTL_OCXL_PMEM_EVENT_HARDWARE_FATAL; > > + > > + rc =3D copy_to_user((u64 __user *) uarg, &val, sizeof(val)); > > + >=20 > copy_to_user doesn't return an errno. Should be: >=20 > if (copy_to_user((u64 __user *) uarg, &val, sizeof(val))) > return -EFAULT; >=20 Ok >=20 > > + return rc; > > +} > > + > > static long file_ioctl(struct file *file, unsigned int cmd, > > unsigned long args) > > { > > struct ocxlpmem *ocxlpmem =3D file->private_data; > > @@ -966,6 +1028,15 @@ static long file_ioctl(struct file *file, > > unsigned int cmd, unsigned long args) > > rc =3D ioctl_controller_stats(ocxlpmem, > > (struct > > ioctl_ocxl_pmem_controller_stats __user *)args); > > break; > > + > > + case IOCTL_OCXL_PMEM_EVENTFD: > > + rc =3D ioctl_eventfd(ocxlpmem, > > + (struct ioctl_ocxl_pmem_eventfd > > __user *)args); > > + break; > > + > > + case IOCTL_OCXL_PMEM_EVENT_CHECK: > > + rc =3D ioctl_event_check(ocxlpmem, (u64 __user *)args); > > + break; > > } > > =20 > > return rc; > > @@ -1107,6 +1178,146 @@ static void dump_error_log(struct ocxlpmem > > *ocxlpmem) > > kfree(buf); > > } > > =20 > > +static irqreturn_t imn0_handler(void *private) > > +{ > > + struct ocxlpmem *ocxlpmem =3D private; > > + u64 chi =3D 0; > > + > > + (void)ocxlpmem_chi(ocxlpmem, &chi); > > + > > + if (chi & GLOBAL_MMIO_CHI_ELA) { > > + dev_warn(&ocxlpmem->dev, "Error log is available\n"); > > + > > + if (ocxlpmem->ev_ctx) > > + eventfd_signal(ocxlpmem->ev_ctx, 1); > > + } > > + > > + if (chi & GLOBAL_MMIO_CHI_CDA) { > > + dev_warn(&ocxlpmem->dev, "Controller dump is > > available\n"); > > + > > + if (ocxlpmem->ev_ctx) > > + eventfd_signal(ocxlpmem->ev_ctx, 1); > > + } > > + > > + >=20 > (at least) one empty line too many. >=20 Ok >=20 > > + return IRQ_HANDLED; > > +} > > + > > +static irqreturn_t imn1_handler(void *private) > > +{ > > + struct ocxlpmem *ocxlpmem =3D private; > > + u64 chi =3D 0; > > + > > + (void)ocxlpmem_chi(ocxlpmem, &chi); > > + > > + if (chi & (GLOBAL_MMIO_CHI_CFFS | GLOBAL_MMIO_CHI_CHFS)) { > > + dev_err(&ocxlpmem->dev, > > + "Controller status is fatal, chi=3D0x%llx, going > > offline\n", chi); > > + > > + if (ocxlpmem->nvdimm_bus) { > > + nvdimm_bus_unregister(ocxlpmem->nvdimm_bus); > > + ocxlpmem->nvdimm_bus =3D NULL; > > + } > > + > > + if (ocxlpmem->ev_ctx) > > + eventfd_signal(ocxlpmem->ev_ctx, 1); > > + } > > + > > + return IRQ_HANDLED; > > +} > > + > > + > > +/** > > + * ocxlpmem_setup_irq() - Set up the IRQs for the OpenCAPI > > Persistent Memory device > > + * @ocxlpmem: the device metadata > > + * Return: 0 on success, negative on failure > > + */ > > +static int ocxlpmem_setup_irq(struct ocxlpmem *ocxlpmem) > > +{ > > + int rc; > > + u64 irq_addr; > > + > > + rc =3D ocxl_afu_irq_alloc(ocxlpmem->ocxl_context, &ocxlpmem- > > >irq_id[0]); > > + if (rc) > > + return rc; > > + > > + rc =3D ocxl_irq_set_handler(ocxlpmem->ocxl_context, ocxlpmem- > > >irq_id[0], > > + imn0_handler, NULL, ocxlpmem); > > + > > + irq_addr =3D ocxl_afu_irq_get_addr(ocxlpmem->ocxl_context, > > ocxlpmem->irq_id[0]); > > + if (!irq_addr) > > + return -EINVAL; > > + > > + ocxlpmem->irq_addr[0] =3D ioremap(irq_addr, PAGE_SIZE); > > + if (!ocxlpmem->irq_addr[0]) > > + return -EINVAL; > > + > > + rc =3D ocxl_global_mmio_write64(ocxlpmem->ocxl_afu, > > GLOBAL_MMIO_IMA0_OHP, > > + OCXL_LITTLE_ENDIAN, > > + (u64)ocxlpmem->irq_addr[0]); > > + if (rc) > > + goto out_irq0; > > + > > + rc =3D ocxl_global_mmio_write64(ocxlpmem->ocxl_afu, > > GLOBAL_MMIO_IMA0_CFP, > > + OCXL_LITTLE_ENDIAN, 0); > > + if (rc) > > + goto out_irq0; >=20 > That's a few lines of duplicate code. On the other hand, there's > enough=20 > varying parameters between the 2 interrupts that factorizing in a=20 > subfunction would be slightly less readable. So duplicating is > probably ok. >=20 >=20 >=20 > > + rc =3D ocxl_afu_irq_alloc(ocxlpmem->ocxl_context, &ocxlpmem- > > >irq_id[1]); > > + if (rc) > > + goto out_irq0; > > + > > + > > + rc =3D ocxl_irq_set_handler(ocxlpmem->ocxl_context, ocxlpmem- > > >irq_id[1], > > + imn1_handler, NULL, ocxlpmem); > > + if (rc) > > + goto out_irq0; > > + > > + irq_addr =3D ocxl_afu_irq_get_addr(ocxlpmem->ocxl_context, > > ocxlpmem->irq_id[1]); > > + if (!irq_addr) { > > + rc =3D -EFAULT; > > + goto out_irq0; > > + } > > + > > + ocxlpmem->irq_addr[1] =3D ioremap(irq_addr, PAGE_SIZE); > > + if (!ocxlpmem->irq_addr[1]) { > > + rc =3D -EINVAL; > > + goto out_irq0; > > + } > > + > > + rc =3D ocxl_global_mmio_write64(ocxlpmem->ocxl_afu, > > GLOBAL_MMIO_IMA1_OHP, > > + OCXL_LITTLE_ENDIAN, > > + (u64)ocxlpmem->irq_addr[1]); > > + if (rc) > > + goto out_irq1; > > + > > + rc =3D ocxl_global_mmio_write64(ocxlpmem->ocxl_afu, > > GLOBAL_MMIO_IMA1_CFP, > > + OCXL_LITTLE_ENDIAN, 0); > > + if (rc) > > + goto out_irq1; > > + > > + // Enable doorbells > > + rc =3D ocxl_global_mmio_set64(ocxlpmem->ocxl_afu, > > GLOBAL_MMIO_CHIE, > > + OCXL_LITTLE_ENDIAN, > > + GLOBAL_MMIO_CHI_ELA | > > GLOBAL_MMIO_CHI_CDA | > > + GLOBAL_MMIO_CHI_CFFS | > > GLOBAL_MMIO_CHI_CHFS | > > + GLOBAL_MMIO_CHI_NSCRA); >=20 > GLOBAL_MMIO_CHI_NSCRA doesn't seem to be handled in the handlers. >=20 This will be moved to the overwrite patch. >=20 >=20 > > + if (rc) > > + goto out_irq1; > > + > > + return 0; > > + > > +out_irq1: > > + iounmap(ocxlpmem->irq_addr[1]); > > + ocxlpmem->irq_addr[1] =3D NULL; > > + > > +out_irq0: > > + iounmap(ocxlpmem->irq_addr[0]); > > + ocxlpmem->irq_addr[0] =3D NULL; > > + > > + return rc; > > +} > > + > > /** > > * probe_function0() - Set up function 0 for an OpenCAPI > > persistent memory device > > * This is important as it enables templates higher than 0 across > > all other functions, > > @@ -1216,6 +1427,11 @@ static int probe(struct pci_dev *pdev, const > > struct pci_device_id *ent) > > goto err; > > } > > =20 > > + if (ocxlpmem_setup_irq(ocxlpmem)) { > > + dev_err(&pdev->dev, "Could not set up OCXL IRQs\n"); >=20 > Like with other patches, rc needs to be set. >=20 ok >=20 > > + goto err; > > + } > > + > > if (setup_command_metadata(ocxlpmem)) { > > dev_err(&pdev->dev, "Could not read OCXL command > > matada\n"); > > goto err; > > diff --git a/arch/powerpc/platforms/powernv/pmem/ocxl_internal.h > > b/arch/powerpc/platforms/powernv/pmem/ocxl_internal.h > > index b953ee522ed4..927690f4888f 100644 > > --- a/arch/powerpc/platforms/powernv/pmem/ocxl_internal.h > > +++ b/arch/powerpc/platforms/powernv/pmem/ocxl_internal.h > > @@ -103,6 +103,10 @@ struct ocxlpmem { > > struct pci_dev *pdev; > > struct cdev cdev; > > struct ocxl_fn *ocxl_fn; > > +#define SCM_IRQ_COUNT 2 > > + int irq_id[SCM_IRQ_COUNT]; > > + struct dev_pagemap irq_pgmap[SCM_IRQ_COUNT]; >=20 > irq_pgmap is not used. Ok >=20 >=20 > > + void *irq_addr[SCM_IRQ_COUNT]; > > struct nd_interleave_set nd_set; > > struct nvdimm_bus_descriptor bus_desc; > > struct nvdimm_bus *nvdimm_bus; > > @@ -113,6 +117,7 @@ struct ocxlpmem { > > struct command_metadata ns_command; > > struct resource pmem_res; > > struct nd_region *nd_region; > > + struct eventfd_ctx *ev_ctx; > > char fw_version[8+1]; > > u32 timeouts[ADMIN_COMMAND_MAX+1]; > > =20 > > diff --git a/include/uapi/nvdimm/ocxl-pmem.h > > b/include/uapi/nvdimm/ocxl-pmem.h > > index add223aa2fdb..988eb0bc413d 100644 > > --- a/include/uapi/nvdimm/ocxl-pmem.h > > +++ b/include/uapi/nvdimm/ocxl-pmem.h > > @@ -66,6 +66,20 @@ struct ioctl_ocxl_pmem_controller_stats { > > __u64 cache_write_latency; /* nanoseconds */ > > }; > > =20 > > +struct ioctl_ocxl_pmem_eventfd { > > + __s32 eventfd; > > + __u32 reserved; > > +}; > > + > > +#ifndef BIT_ULL > > +#define BIT_ULL(nr) (1ULL << (nr)) > > +#endif > > + > > +#define IOCTL_OCXL_PMEM_EVENT_CONTROLLER_DUMP_AVAILABLE BIT_ULL > > (0) > > +#define IOCTL_OCXL_PMEM_EVENT_ERROR_LOG_AVAILABLE BIT_ULL(1) > > +#define IOCTL_OCXL_PMEM_EVENT_HARDWARE_FATAL BIT_ULL > > (2) > > +#define IOCTL_OCXL_PMEM_EVENT_FIRMWARE_FATAL BIT_ULL > > (3) > > + >=20 > I'm not fond of adding a macro with such a generic name as BIT_ULL() > in=20 > a user header file. What's wrong with: >=20 > #define IOCTL_OCXL_PMEM_EVENT_CONTROLLER_DUMP_AVAILABLE 0x1 > #define IOCTL_OCXL_PMEM_EVENT_ERROR_LOG_AVAILABLE 0x2 > #define IOCTL_OCXL_PMEM_EVENT_HARDWARE_FATAL 0x4 > #define IOCTL_OCXL_PMEM_EVENT_FIRMWARE_FATAL 0x8 >=20 >=20 Nothing, I'll change it. > Fred >=20 >=20 > > /* ioctl numbers */ > > #define OCXL_PMEM_MAGIC 0x5C > > /* SCM devices */ > > @@ -74,5 +88,7 @@ struct ioctl_ocxl_pmem_controller_stats { > > #define IOCTL_OCXL_PMEM_CONTROLLER_DUMP_DATA _IOWR(O > > CXL_PMEM_MAGIC, 0x03, struct ioctl_ocxl_pmem_controller_dump_data) > > #define IOCTL_OCXL_PMEM_CONTROLLER_DUMP_COMPLETE _IO(OCXL_PMEM_M > > AGIC, 0x04) > > #define IOCTL_OCXL_PMEM_CONTROLLER_STATS _IO(OCXL_PMEM_M > > AGIC, 0x05) > > +#define IOCTL_OCXL_PMEM_EVENTFD _IOW(OC > > XL_PMEM_MAGIC, 0x06, struct ioctl_ocxl_pmem_eventfd) > > +#define IOCTL_OCXL_PMEM_EVENT_CHECK _IOR(OC > > XL_PMEM_MAGIC, 0x07, __u64) > > =20 > > #endif /* _UAPI_OCXL_SCM_H */ > >=20 --=20 Alastair D'Silva Open Source Developer Linux Technology Centre, IBM Australia mob: 0423 762 819