Add support for OpenCAPI SCM devices
| From: | "Alastair D'Silva" <alastair-AT-au1.ibm.com> | |
| To: | alastair-AT-d-silva.org | |
| Subject: | [PATCH 00/10] Add support for OpenCAPI SCM devices | |
| Date: | Fri, 25 Oct 2019 15:46:55 +1100 | |
| Message-ID: | <20191025044721.16617-1-alastair@au1.ibm.com> | |
| Cc: | Benjamin Herrenschmidt <benh-AT-kernel.crashing.org>, Paul Mackerras <paulus-AT-samba.org>, Michael Ellerman <mpe-AT-ellerman.id.au>, Frederic Barrat <fbarrat-AT-linux.ibm.com>, Andrew Donnellan <ajd-AT-linux.ibm.com>, Arnd Bergmann <arnd-AT-arndb.de>, Greg Kroah-Hartman <gregkh-AT-linuxfoundation.org>, Dan Williams <dan.j.williams-AT-intel.com>, Vishal Verma <vishal.l.verma-AT-intel.com>, Dave Jiang <dave.jiang-AT-intel.com>, Keith Busch <keith.busch-AT-intel.com>, Ira Weiny <ira.weiny-AT-intel.com>, Anton Blanchard <anton-AT-ozlabs.org>, Krzysztof Kozlowski <krzk-AT-kernel.org>, Geert Uytterhoeven <geert+renesas-AT-glider.be>, Anju T Sudhakar <anju-AT-linux.vnet.ibm.com>, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg-AT-kaod.org>, Mahesh Salgaonkar <mahesh-AT-linux.vnet.ibm.com>, Hari Bathini <hbathini-AT-linux.ibm.com>, Vasant Hegde <hegdevasant-AT-linux.vnet.ibm.com>, Thomas Gleixner <tglx-AT-linutronix.de>, Allison Randal <allison-AT-lohutok.net>, Greg Kurz <groug-AT-kaod.org>, Nicholas Piggin <npiggin-AT-gmail.com>, Alexey Kardashevskiy <aik-AT-ozlabs.ru>, Masahiro Yamada <yamada.masahiro-AT-socionext.com>, Andrew Morton <akpm-AT-linux-foundation.org>, David Hildenbrand <david-AT-redhat.com>, Oscar Salvador <osalvador-AT-suse.com>, Michal Hocko <mhocko-AT-suse.com>, Pavel Tatashin <pasha.tatashin-AT-soleen.com>, Wei Yang <richard.weiyang-AT-gmail.com>, Qian Cai <cai-AT-lca.pw>, linuxppc-dev-AT-lists.ozlabs.org, linux-kernel-AT-vger.kernel.org, linux-nvdimm-AT-lists.01.org, linux-mm-AT-kvack.org | |
| Archive-link: | Article |
From: Alastair D'Silva <alastair@d-silva.org> This series adds support for OpenCAPI SCM devices, exposing them as nvdimms so that we can make use of the existing infrastructure. The first patch (in memory_hotplug) has reviews/acks, but has not yet made it upstream. Alastair D'Silva (10): memory_hotplug: Add a bounds check to __add_pages nvdimm: remove prototypes for nonexistent functions powerpc: Add OPAL calls for LPC memory alloc/release powerpc: Map & release OpenCAPI LPC memory ocxl: Tally up the LPC memory on a link & allow it to be mapped ocxl: Add functions to map/unmap LPC memory ocxl: Save the device serial number in ocxl_fn nvdimm: Add driver for OpenCAPI Storage Class Memory powerpc: Enable OpenCAPI Storage Class Memory driver on bare metal ocxl: Conditionally bind SCM devices to the generic OCXL driver arch/powerpc/configs/powernv_defconfig | 4 + arch/powerpc/include/asm/opal-api.h | 2 + arch/powerpc/include/asm/opal.h | 3 + arch/powerpc/include/asm/pnv-ocxl.h | 2 + arch/powerpc/platforms/powernv/ocxl.c | 41 + arch/powerpc/platforms/powernv/opal-call.c | 2 + drivers/misc/ocxl/Kconfig | 7 + drivers/misc/ocxl/config.c | 50 + drivers/misc/ocxl/core.c | 60 + drivers/misc/ocxl/link.c | 60 + drivers/misc/ocxl/ocxl_internal.h | 36 + drivers/misc/ocxl/pci.c | 3 + drivers/nvdimm/Kconfig | 17 + drivers/nvdimm/Makefile | 3 + drivers/nvdimm/nd-core.h | 4 - drivers/nvdimm/ocxl-scm.c | 2210 ++++++++++++++++++++ drivers/nvdimm/ocxl-scm_internal.c | 232 ++ drivers/nvdimm/ocxl-scm_internal.h | 331 +++ drivers/nvdimm/ocxl-scm_sysfs.c | 219 ++ include/linux/memory_hotplug.h | 5 + include/misc/ocxl.h | 19 + include/uapi/linux/ocxl-scm.h | 128 ++ mm/memory_hotplug.c | 22 + 23 files changed, 3456 insertions(+), 4 deletions(-) create mode 100644 drivers/nvdimm/ocxl-scm.c create mode 100644 drivers/nvdimm/ocxl-scm_internal.c create mode 100644 drivers/nvdimm/ocxl-scm_internal.h create mode 100644 drivers/nvdimm/ocxl-scm_sysfs.c create mode 100644 include/uapi/linux/ocxl-scm.h -- 2.21.0
