Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4131219pxj; Tue, 15 Jun 2021 16:21:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwccH58uY7o5nwcOd/YPL1HBL00PKA8Qa5ri03IsWXNTj1a37PLhA9g8iFQcKkykyqknX1E X-Received: by 2002:a05:6e02:1ca5:: with SMTP id x5mr1220855ill.139.1623799308705; Tue, 15 Jun 2021 16:21:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623799308; cv=none; d=google.com; s=arc-20160816; b=Ie15mnEdS7/RNY6JCS7To70pzFCjkktxn5U1QhseGHYY/6wGawcJzlttY6KQN35Y/y xWn5OHul+SKNvDndJEOtDDRilX3KAibt/swKjnxqRXi5b2y/RJTA/eKwEEZkvDzcw/pG gZ+rkhQ8Rs7IS0FkUrVVxT9ycKa3TM99vKkdQsBl08OY7CE6/bKR1e6qsAtzHxQCvsln JPt0Y/Dj+NVRs8IXdenIfUYwiM0IgMj7RrsjTQHBZcHsRBxTAdO7oFNkQIK7Okfih45Y nbgGVQK/F2p89CfK6XA5x06T9jXLWsYlw6PmXPy0hJns7jXexEGu3dZgbNypwjfePscZ xpVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zd5vgVNz+BmI/+O1FJjX2xJNxwUvhrCsjTqsqRhVW9Y=; b=P0tpJg9pGIV2QjKia1PE61yEhm8PpPGjCcR4YINHGMNOvb97Z243YLfvJdb/RTLGYP QltEECMcDKda7mRaqQo0dMznwNPExsGlT2SexpFnuZTW6x6sJJAwpGXhrLGbxhh0+EDm DVqlttxuMe89tyGpeF5IVv2T3LoQ2h8iBViVbHJF9ytESGfe3e/o+tzyi9/bKiGroALx V3sVUz6bBZhFLe02NRBaeOQq8w2JPJD4Z6dZ8/wtynIttUGCk+KfkX2xCQFEUIG9Ti7/ N3m4qH9L9hVdmkii8V16z2+youpjc/t/conyO4AiqiNsABGa1tF+iqE3My89U5aDhDTQ y0/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=CrcZsdj6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si266449ioh.24.2021.06.15.16.21.33; Tue, 15 Jun 2021 16:21:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=CrcZsdj6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231165AbhFOXW6 (ORCPT + 99 others); Tue, 15 Jun 2021 19:22:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229811AbhFOXW5 (ORCPT ); Tue, 15 Jun 2021 19:22:57 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC6FFC061574 for ; Tue, 15 Jun 2021 16:20:52 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id m13-20020a17090b068db02901656cc93a75so2814853pjz.3 for ; Tue, 15 Jun 2021 16:20:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zd5vgVNz+BmI/+O1FJjX2xJNxwUvhrCsjTqsqRhVW9Y=; b=CrcZsdj6rEXbgOdwBBdjg1x0Eme5binzIOsQkq/2hl+SeN6h0GaGuYWlr1mHOpmorF FId2dpmBgweNYfW9qXSjEBMcpLVIkYFcJ/YyyeT+h+l8zDyk+Zv/BsUdk6Ajt5cRY6Yf QnXQpzmjJSoTTf3Z8jBEFcRnOPIMHiVPM2LpRvdltjtRom3YMK4QbdyeTdqncRvWh3Uh +AGU1EXL/njsND3pc85Aml2RcFDyi8pJnixCESzkWDWL4sDmXar1ZSxukkI4ukHjR6BP iMfHlT2jKaAyIQM27M5km8bKAx0MqS0rxzEFsG4uYCVlg1Ms9G26WSHmkoJazaTb9/bR kegA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zd5vgVNz+BmI/+O1FJjX2xJNxwUvhrCsjTqsqRhVW9Y=; b=ud+AyAEePCLBXxCn7vhBLU3z0juKi9UI84j6sPG4ycIERiShoUHgQdyNmSOaSlVcq3 jUa5UlWyoQ0o+TC4l0DOfyIgAiviyez5kocdn8O9nhnoc+s9aGnco+tPwE3TTSqUsael PIS4GZYeERGMFEKSCtmzuKzPRhtZCUOHveJhtUaGDSO55nYvtrWb5z0yJIdl/GR5Mapj uRj7TtCd3AkVNL1Pyx6JjZ5iUiagaqsCcaIyN9hkhd+7Ok7l7xUedP57MhHIquCAsHU/ r0uCJDUMPksZe82SmufaOPw5dmjnr4AgDXzJK6SBAESaU0psNED9F8GddzYIdtoiL96L UmSQ== X-Gm-Message-State: AOAM533oAcqzvfA73wc2ZnQx0XeIW9otUddPoUrRghhNJVRWZCs8nl2W VgHB5PSK2DAeMG4F9Io5gtxYKWHVUlcIliX/aLTIyagFrnKQhQ== X-Received: by 2002:a17:90a:ea8c:: with SMTP id h12mr7223781pjz.149.1623799252369; Tue, 15 Jun 2021 16:20:52 -0700 (PDT) MIME-Version: 1.0 References: <162379908663.2993820.16543025953842049041.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <162379908663.2993820.16543025953842049041.stgit@dwillia2-desk3.amr.corp.intel.com> From: Dan Williams Date: Tue, 15 Jun 2021 16:20:41 -0700 Message-ID: Subject: Re: [PATCH v2 0/5] cxl/pmem: Add core infrastructure for PMEM support To: linux-cxl@vger.kernel.org Cc: Jonathan Cameron , Linux Kernel Mailing List , Linux NVDIMM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 15, 2021 at 4:18 PM Dan Williams wrote: > > Changes since v1 [1]: Neglected the v1 link: https://lore.kernel.org/r/162336395765.2462439.11368504490069925374.stgit@dwillia2-desk3.amr.corp.intel.com > - cleanup @flush determination in unregister_nvb() (Jonathan) > - cleanup online_nvdimm_bus() to return a status code (Jonathan) > - drop unnecessary header includes (Jonathan) > - drop unused cxl_nvdimm driver data (Jonathan) > - rename the bus to be unregistered as @victim_bus in > cxl_nvb_update_state() (Jonathan) > - miscellaneous cleanups and pick up reviewed-by's (Jonathan) > > --- > > CXL Memory Expander devices (CXL 2.0 Type-3) support persistent memory > in addition to volatile memory expansion. The most significant changes > this requires of the existing LIBNVDIMM infrastructure, compared to what > was needed to support ACPI NFIT defined PMEM, is the ability to > dynamically provision regions in addition to namespaces, and a formal > model for hotplug. > > Before region provisioning can be added the CXL enabling needs to > enumerate "nvdimm" devices on a CXL nvdimm-bus. This is modeled as a > CXL-nvdimm-bridge device (bridging CXL to nvdimm) and an associated > driver to activate and deactivate that bus-bridge. Once the bridge is > registered it scans for CXL nvdimm devices registered by endpoints. The > CXL core bus is used as a rendezvous for nvdimm bridges and endpoints > allowing them to be registered and enabled in any order. > > At the end of this series the ndctl utility can see CXL nvdimm resources > just like any other nvdimm bus. > > # ndctl list -BDiu -b CXL > { > "provider":"CXL", > "dev":"ndbus1", > "dimms":[ > { > "dev":"nmem1", > "state":"disabled" > }, > { > "dev":"nmem0", > "state":"disabled" > } > ] > } > > Follow-on patches extend the nvdimm core label support for CXL region > and namespace labels. For now just add the machinery to register the > bus and nvdimm base objects. > > --- > > Dan Williams (5): > cxl/core: Add cxl-bus driver infrastructure > cxl/pmem: Add initial infrastructure for pmem support > libnvdimm: Export nvdimm shutdown helper, nvdimm_delete() > libnvdimm: Drop unused device power management support > cxl/pmem: Register 'pmem' / cxl_nvdimm devices > > > drivers/cxl/Kconfig | 13 ++ > drivers/cxl/Makefile | 2 > drivers/cxl/acpi.c | 37 ++++++ > drivers/cxl/core.c | 280 ++++++++++++++++++++++++++++++++++++++++++++ > drivers/cxl/cxl.h | 56 +++++++++ > drivers/cxl/mem.h | 1 > drivers/cxl/pci.c | 23 +++- > drivers/cxl/pmem.c | 230 ++++++++++++++++++++++++++++++++++++ > drivers/nvdimm/bus.c | 64 ++++++---- > drivers/nvdimm/dimm_devs.c | 18 +++ > include/linux/libnvdimm.h | 1 > 11 files changed, 694 insertions(+), 31 deletions(-) > create mode 100644 drivers/cxl/pmem.c > > base-commit: 87815ee9d0060a91bdf18266e42837a9adb5972e