Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1040090pxj; Sat, 15 May 2021 01:50:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9824/b1n1Yhl//6mT+r0fGWAf+I/x8laZ/YNu87dBA605zIRL+1upbaZvWfaG5LTYPIIJ X-Received: by 2002:a05:6602:158a:: with SMTP id e10mr37313675iow.137.1621068617732; Sat, 15 May 2021 01:50:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621068617; cv=none; d=google.com; s=arc-20160816; b=UuPHcTuqIkevdB14KxLinnl37BizH1pT8sd/1LF0iq3iIFNSfHE/OClLiRCubqA+L5 Tg3ybAkLqaujZsGtfgq3BPrWOFgN+SJKTAkJ6f0B/MvD7gNV588fuCbxrDKlrueSU2Z1 dh4MaxNXdTFs9uxviv4gE3fVm3uMkqehGKjJcRsJs4W5tx4Uh95Airk7g/niLVhgIhi9 xXapfWHmaZjTzWOtC2WRCKODOK+Ry+DXjA+3auaythZymGPEEIjFy3PCghemGK2MfLGu f4FwmVmry5kSEeb4UCF+zF5Wq/nDXv000Z6uqQFSCo2Orf7Q7q/b6+FJl73RKHf5BkQJ JjAw== 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=5yLL40jnp/JyochnQZGNB1kpm63b4ANhjiGt5dp8TwM=; b=qu/UoAELnz+wPWp95+GPLY8kCih7E3nY6hWDXI0rXLpMwpZ8ZSTtDQw/oRN8YUfEqv j9OTZ7pHobiTEaTWH+EU323eqhwNq6nA12hQfLL+9x9IVa8qenNsY7EmA9DzR1pwCqMW AW0XaeQCADWOI9MRd/DE9uGgM2036DRXBqfvnoUHY3tKUPsfbRwgG2WGy5yTX1L7UzlO q3/rIT6cc6xuh5Dvrt/CaSU0pvZHHem+JjAW0y8OQs6rlRwIVvPYblmkunxpraJl5cjM XlziOWl6Wx6V9Y4pVRZTI4he6COjqeeGMiYHDinJ35AjPEZ7fp2rnxG7EdYB/C/hEdlJ yW2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=EgFraUSB; 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 s13si4875484iow.103.2021.05.15.01.50.04; Sat, 15 May 2021 01:50:17 -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=EgFraUSB; 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 S230433AbhENUa6 (ORCPT + 99 others); Fri, 14 May 2021 16:30:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230295AbhENUa4 (ORCPT ); Fri, 14 May 2021 16:30:56 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8E57C06174A for ; Fri, 14 May 2021 13:29:44 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id l7so4076edb.1 for ; Fri, 14 May 2021 13:29:44 -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=5yLL40jnp/JyochnQZGNB1kpm63b4ANhjiGt5dp8TwM=; b=EgFraUSBIbTQFFJbEIeB6T/26SFYGJlZBeS4e/DmQRBg6Jw2BQ37gymJBPeVX1ynng gLsbaKnm39XSGjgjcsOBrClWV9P2towyHWblzwNVlQ5dSUJxsf/jrcHUhk9MXKI9aUnP JOOFtbsCLXmzDvH70ekrNT7i7O87hx19FvLtC/dcHBQ4UON2Po//U6OZQha99KSVmVys Bs4ECRfRkRaYYKC/8sjpwUGc6BxWndaakM2RlpCKAkf12+Kms37etfKiOLo1r5Rv08Rn DeKNSXZj3Px380vwYPhSzVfDA0eI75tyQygSFJHLeyGRqV0WVM8ygu1y5XhhD22agMYF J05w== 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=5yLL40jnp/JyochnQZGNB1kpm63b4ANhjiGt5dp8TwM=; b=cF4PoraYTKE34MtdePyhmviGgnrvOvKD+xOP/XhGoKE+wmOSLUCa5XsJS2hWbqj0JU +wssvdp5Uqd26Tn5h3wI+AQoAIUNsxTFDSYAaRapN7jrir+oc5mUXdgDqJEI0h1W49zK I7LaL+KyV8+O25hKekda61nYrZPj4+4im1VI71zSUpTbcTY3HevTk65/ecG2T8EZ6sFP Q9S/vygHSGxitIdSuUuDN3uezOh4AVXFfNNlx66OMpAQhxpJuiAw8ySeBJL2TcsM5SxZ hMBVMYw1Yd8nIYtTbAMpRlpLtwfMQZRvQ5TXE+GGwwvPiwGc0jY6bySJm6qgqbXhWcV0 CUkA== X-Gm-Message-State: AOAM533khAK0vDIvQ6sM69NsDyBHgZtGNW05bB1LlAt98mBCzAoat1sH 9vN6xy9qNJRdsHZpMmyPzSlKh9uz/69kZRtsd5Ks36CBaX3B1g== X-Received: by 2002:a05:6402:128f:: with SMTP id w15mr12334574edv.354.1621024183325; Fri, 14 May 2021 13:29:43 -0700 (PDT) MIME-Version: 1.0 References: <162096970332.1865304.10280028741091576940.stgit@dwillia2-desk3.amr.corp.intel.com> <162096973052.1865304.12885652112595883151.stgit@dwillia2-desk3.amr.corp.intel.com> <20210514101700.00004fbc@Huawei.com> In-Reply-To: <20210514101700.00004fbc@Huawei.com> From: Dan Williams Date: Fri, 14 May 2021 13:29:32 -0700 Message-ID: Subject: Re: [PATCH v4 5/8] cxl/acpi: Introduce ACPI0017 driver and cxl_root To: Jonathan Cameron Cc: linux-cxl@vger.kernel.org, Christoph Hellwig , Linux ACPI , Linux PCI , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 14, 2021 at 2:19 AM Jonathan Cameron wrote: > > On Thu, 13 May 2021 22:22:10 -0700 > Dan Williams wrote: > > > While CXL builds upon the PCI software model for dynamic enumeration and > > control, a static platform component is required to bootstrap the CXL > > memory layout. In addition to identifying the host bridges ACPI is > > responsible for enumerating the CXL memory space that can be addressed > > by decoders. This is similar to the requirement for ACPI to publish > > resources reported by _CRS for PCI host bridges. > > > > Introduce the cxl_root object as an abstract "port" into the CXL.mem > > address space described by HDM decoders identified by the ACPI > > CEDT.CHBS. > > > > For now just establish the initial boilerplate and sysfs attributes, to > > be followed by enumeration of the ports within the host bridge. > > > > Note the allocation of CXL core device objects is split into separate > > alloc and add steps in order to separate the alloc error path (kfree()) > > from the device add error path (put_device()). > > > > Cc: Jonathan Cameron > > Signed-off-by: Dan Williams > > A few really minor editorial things in the docs that need tidying up. Sure, I'm going to see if b4 can follow a v5 reply to just this one patch, or otherwise hack it to support that flow so I don't need to resend the full series. > With that done > Reviewed-by: Jonathan Cameron > > I'll make the bold assumption that this is going to get applied > before the DOE series and base that on top of this one. Yes, the plan is to make the 'next' branch of: git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git ...the stable non-rebasing development branch for contributions. bf gntcbttttt > > Thanks, > > Jonathan > > > --- > > Documentation/ABI/testing/sysfs-bus-cxl | 78 +++++++ > > drivers/cxl/Kconfig | 14 + > > drivers/cxl/Makefile | 2 > > drivers/cxl/acpi.c | 39 +++ > > drivers/cxl/core.c | 360 +++++++++++++++++++++++++++++++ > > drivers/cxl/cxl.h | 65 ++++++ > > 6 files changed, 558 insertions(+) > > create mode 100644 drivers/cxl/acpi.c > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-cxl b/Documentation/ABI/testing/sysfs-bus-cxl > > index 2fe7490ad6a8..d21469e2bf8b 100644 > > --- a/Documentation/ABI/testing/sysfs-bus-cxl > > +++ b/Documentation/ABI/testing/sysfs-bus-cxl > > @@ -24,3 +24,81 @@ Description: > > (RO) "Persistent Only Capacity" as bytes. Represents the > > identically named field in the Identify Memory Device Output > > Payload in the CXL-2.0 specification. > > + > > +What: /sys/bus/cxl/devices/address_spaceX/start > > +Date: May, 2021 > > +KernelVersion: v5.14 > > +Contact: linux-cxl@vger.kernel.org > > +Description: > > I'm not that fussy about this, but others may comment on wrapping lines around 70 chars > whereas can at least go to 80 for docs. Sure I can reflow. > > > + (RO) System-physical base address for an address range > > + that supports CXL.mem targets. A CXL address space can > > + be optionally populated with endpoints that decode that > > + range, similar to how devices behind a PCI bridge can > > + decode a portion of the bridge's secondary bus address > > + space. > > + > > +What: /sys/bus/cxl/devices/address_spaceX/end > > +Date: May, 2021 > > +KernelVersion: v5.14 > > +Contact: linux-cxl@vger.kernel.org > > +Description: > > + (RO) System-physical end address for an address range > > + that supports CXL.mem targets. A CXL address space can > > + be optionally populated with endpoints that decode that > > + range, similar to how devices behind a PCI bridge can > > + decode a portion of the bridge's secondary bus address > > + space. > > + > > +What: /sys/bus/cxl/devices/address_spaceX/supports_ram > > Inconsistent tabs vs spaces. ok.