From patchwork Fri Feb 25 06:00:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 12759700 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C268C433EF for ; Fri, 25 Feb 2022 06:01:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236208AbiBYGBa (ORCPT ); Fri, 25 Feb 2022 01:01:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237716AbiBYGB2 (ORCPT ); Fri, 25 Feb 2022 01:01:28 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9915C52B06 for ; Thu, 24 Feb 2022 22:00:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645768857; x=1677304857; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=bWlKNfh2ogOUVi22RWouW3AeWqrfGQg0sAdn7A2eQww=; b=QJSJCThoKaN5kSCCcm+NaAh+A7KrRNgrbAdEAs4peVQ5vlkrIlRB00/Z MNc64chFLp5yTk0T85txIxRckL+tlntZctkiHzNnyfuNDVUOpb9RLM7GN 4iF5OXU6+M/0HO4KjDxPs01r8C6LJNVcP7Mt2DJTBMr2vvDITT54KbCRo nZ8cs2ihHE39G9wmYy3+ofOoGUVKjViPEZL5bcHxwvUK0jMcCyZeh665W w8xb4cXoryWQf2lBGU5xnxnIDGGd5LJD3s+FydWqS58/q1CgWW5vBTdLk OWhfO6OOuhiW72HrkW+a38drS0LhuV9eA3FY7NomadXKN4x9bzrbf6QbH g==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="252624491" X-IronPort-AV: E=Sophos;i="5.90,135,1643702400"; d="scan'208";a="252624491" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 22:00:56 -0800 X-IronPort-AV: E=Sophos;i="5.90,135,1643702400"; d="scan'208";a="549108223" Received: from tperters-mobl.amr.corp.intel.com (HELO localhost.localdomain) ([10.252.138.9]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 22:00:55 -0800 From: Ben Widawsky To: linux-cxl@vger.kernel.org Cc: patches@lists.linux.dev, Ben Widawsky , Alison Schofield , Dan Williams , Ira Weiny , Jonathan Cameron , Vishal Verma Subject: [RFC PATCH 0/2] Region creation/configuration ABI Date: Thu, 24 Feb 2022 22:00:36 -0800 Message-Id: <20220225060038.1511562-1-ben.widawsky@intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org I'm looking for feedback on the next generation of the region configuration and creation ABI. The primary changes from the v3 posting of the region driver [1] are: - Decoders instead of memdevs for targets - Substantial rework around creation - configuration sanitization at ABI boundary - teardown region on memdev/decoder removal With the new changes, it makes the most sense to rework the series so that existing region enumeration (setup by boot firmware) be done prior to allowing region creation. This is because the changes requested will require claiming resources at configuration time rather than region->probe() time. That said, these patches do reflect the proposed ABI and they can be reviewed in parallel with that work. I'd appreciate feedback around whether the proposed ABI is missing anything, and, whether there are inherent flaws in the implementation. [1]: https://lore.kernel.org/linux-cxl/20220128002707.391076-1-ben.widawsky@intel.com/ Ben Widawsky (2): cxl/region: Add region creation ABI cxl/region: Introduce concept of region configuration Documentation/ABI/testing/sysfs-bus-cxl | 82 +++ .../driver-api/cxl/memory-devices.rst | 11 + drivers/cxl/core/Makefile | 1 + drivers/cxl/core/core.h | 3 + drivers/cxl/core/port.c | 26 + drivers/cxl/core/region.c | 568 ++++++++++++++++++ drivers/cxl/cxl.h | 21 +- drivers/cxl/region.h | 93 +++ tools/testing/cxl/Kbuild | 1 + 9 files changed, 805 insertions(+), 1 deletion(-) create mode 100644 drivers/cxl/core/region.c create mode 100644 drivers/cxl/region.h base-commit: 3bdf187d313e067de2a81109f9a1dd3da7f3dc2c