Skip to contentSkip to conversation

cxl: Sync up the driver-api/cxl documentation

PATCH Superseded [email protected] 3 participants 3 messages May 12, 2025 – May 13, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 cxl: Sync up the driver-api/cxl documentation

From: Alison Schofield <[email protected]>

pmem.c regs.c mbox.c identifiers were missing. Add them to memory-devices.rst following their respective DOC comment includes.

Two acpi.c identifiers were available, but not used in kernel-doc's:
1) Add add_cxl_resources to memory-devices.rst and fix up the Sphinx complaint on the ascii art (escape and indent the pipes).
2) Add cxl_acpi_evaluate_qtg_dsm to access-coordinates.rst.

core/features.c is newish. Add a "DOC: cxl features" comment to the source and the doc and identifiers to memory_devices.rst.

---

DaveJ: the "DOC: cxl features" addition was simply a copy from the Kconfig file. Please take a look and I can update.

 .../driver-api/cxl/access-coordinates.rst      |  3 +++
 .../driver-api/cxl/memory-devices.rst          | 18 ++++++++++++++++++
 drivers/cxl/acpi.c                             |  6 +++---
 drivers/cxl/core/features.c                    |  9 +++++++++
 4 files changed, 33 insertions(+), 3 deletions(-)
Documentation/driver-api/cxl/access-coordinates.rst +3 -0
index b07950ea30c9..5f2ad093fabe 100644
@@ -89,3 +89,6 @@ ACPI0017 device to form a new xarray.
 Finally, the cxl_region_update_bandwidth() is called and the aggregated
 bandwidth from all the members of the last xarray is updated for the
 access coordinates residing in the cxl region (cxlr) context.
+
+.. kernel-doc:: drivers/cxl/acpi.c
+   :identifiers: cxl_acpi_evaluate_qtg_dsm
Documentation/driver-api/cxl/memory-devices.rst +18 -0
index d732c42526df..f378a5d7ba40 100644
@@ -347,6 +347,9 @@ CXL Core
 .. kernel-doc:: drivers/cxl/cxl.h
    :internal:
 
+.. kernel-doc:: drivers/cxl/acpi.c
+   :identifiers: add_cxl_resources
+
 .. kernel-doc:: drivers/cxl/core/hdm.c
    :doc: cxl core hdm
 
@@ -371,12 +374,27 @@ CXL Core
 .. kernel-doc:: drivers/cxl/core/pmem.c
    :doc: cxl pmem
 
+.. kernel-doc:: drivers/cxl/core/pmem.c
+   :identifiers:
+
 .. kernel-doc:: drivers/cxl/core/regs.c
    :doc: cxl registers
 
+.. kernel-doc:: drivers/cxl/core/regs.c
+   :identifiers:
+
 .. kernel-doc:: drivers/cxl/core/mbox.c
    :doc: cxl mbox
 
+.. kernel-doc:: drivers/cxl/core/mbox.c
+   :identifiers:
+
+.. kernel-doc:: drivers/cxl/core/features.c
+   :doc: cxl features
+
+.. kernel-doc:: drivers/cxl/core/features.c
+   :identifiers:
+
 CXL Regions
 -----------
 .. kernel-doc:: drivers/cxl/core/region.c
drivers/cxl/acpi.c +3 -3
index 587ad5289f7e..a1a99ec3f12c 100644
@@ -749,10 +749,10 @@ static void remove_cxl_resources(void *data)
  * expanding its boundaries to ensure that any conflicting resources become
  * children. If a window is expanded it may then conflict with a another window
  * entry and require the window to be truncated or trimmed. Consider this
- * situation:
+ * situation::
  *
- * |-- "CXL Window 0" --||----- "CXL Window 1" -----|
- * |--------------- "System RAM" -------------|
+ *	|-- "CXL Window 0" --||----- "CXL Window 1" -----|
+ *	|--------------- "System RAM" -------------|
  *
  * ...where platform firmware has established as System RAM resource across 2
  * windows, but has left some portion of window 1 for dynamic CXL region
drivers/cxl/core/features.c +9 -0
index bdc2c492bdff..5461cf07e65c 100644
@@ -9,6 +9,15 @@
 #include "core.h"
 #include "cxlmem.h"
 
+/**
+ * DOC: cxl features
+ *
+ * A CXL device that includes a mailbox supports commands that allows
+ * listing, getting, and setting of optionally defined features such
+ * as memory sparing or post package sparing. Vendors may define custom
+ * features for the device.
+ */
+
 /* All the features below are exclusive to the kernel */
 static const uuid_t cxl_exclusive_feats[] = {
 	CXL_FEAT_PATROL_SCRUB_UUID,
Signature · 1 line
2.37.3
maintainer
#1 lore raw
Quoted 20 lines · On 5/12/25 4:58 PM, [email protected] wrote:

From: Alison Schofield <[email protected]>

pmem.c regs.c mbox.c identifiers were missing. Add them to memory-devices.rst following their respective DOC comment includes.

Two acpi.c identifiers were available, but not used in kernel-doc's:
1) Add add_cxl_resources to memory-devices.rst and fix up the Sphinx complaint on the ascii art (escape and indent the pipes).
2) Add cxl_acpi_evaluate_qtg_dsm to access-coordinates.rst.

core/features.c is newish. Add a "DOC: cxl features" comment to the source and the doc and identifiers to memory_devices.rst.

---

DaveJ: the "DOC: cxl features" addition was simply a copy from the Kconfig file. Please take a look and I can update.

Quoted 5 lines
 .../driver-api/cxl/access-coordinates.rst      |  3 +++
 .../driver-api/cxl/memory-devices.rst          | 18 ++++++++++++++++++
 drivers/cxl/acpi.c                             |  6 +++---
 drivers/cxl/core/features.c                    |  9 +++++++++
 4 files changed, 33 insertions(+), 3 deletions(-)

Looks good to me. Although I wonder if you will want to coordinate with Gregory as he's moving some stuff around in his doc series.

Quoted 92 lines
Documentation/driver-api/cxl/access-coordinates.rst +3 -0
index b07950ea30c9..5f2ad093fabe 100644
@@ -89,3 +89,6 @@ ACPI0017 device to form a new xarray.
 Finally, the cxl_region_update_bandwidth() is called and the aggregated
 bandwidth from all the members of the last xarray is updated for the
 access coordinates residing in the cxl region (cxlr) context.
+
+.. kernel-doc:: drivers/cxl/acpi.c
+   :identifiers: cxl_acpi_evaluate_qtg_dsm
Documentation/driver-api/cxl/memory-devices.rst +18 -0
index d732c42526df..f378a5d7ba40 100644
@@ -347,6 +347,9 @@ CXL Core
 .. kernel-doc:: drivers/cxl/cxl.h
    :internal:
 
+.. kernel-doc:: drivers/cxl/acpi.c
+   :identifiers: add_cxl_resources
+
 .. kernel-doc:: drivers/cxl/core/hdm.c
    :doc: cxl core hdm
 
@@ -371,12 +374,27 @@ CXL Core
 .. kernel-doc:: drivers/cxl/core/pmem.c
    :doc: cxl pmem
 
+.. kernel-doc:: drivers/cxl/core/pmem.c
+   :identifiers:
+
 .. kernel-doc:: drivers/cxl/core/regs.c
    :doc: cxl registers
 
+.. kernel-doc:: drivers/cxl/core/regs.c
+   :identifiers:
+
 .. kernel-doc:: drivers/cxl/core/mbox.c
    :doc: cxl mbox
 
+.. kernel-doc:: drivers/cxl/core/mbox.c
+   :identifiers:
+
+.. kernel-doc:: drivers/cxl/core/features.c
+   :doc: cxl features
+
+.. kernel-doc:: drivers/cxl/core/features.c
+   :identifiers:
+
 CXL Regions
 -----------
 .. kernel-doc:: drivers/cxl/core/region.c
drivers/cxl/acpi.c +3 -3
index 587ad5289f7e..a1a99ec3f12c 100644
@@ -749,10 +749,10 @@ static void remove_cxl_resources(void *data)
  * expanding its boundaries to ensure that any conflicting resources become
  * children. If a window is expanded it may then conflict with a another window
  * entry and require the window to be truncated or trimmed. Consider this
- * situation:
+ * situation::
  *
- * |-- "CXL Window 0" --||----- "CXL Window 1" -----|
- * |--------------- "System RAM" -------------|
+ *	|-- "CXL Window 0" --||----- "CXL Window 1" -----|
+ *	|--------------- "System RAM" -------------|
  *
  * ...where platform firmware has established as System RAM resource across 2
  * windows, but has left some portion of window 1 for dynamic CXL region
drivers/cxl/core/features.c +9 -0
index bdc2c492bdff..5461cf07e65c 100644
@@ -9,6 +9,15 @@
 #include "core.h"
 #include "cxlmem.h"
 
+/**
+ * DOC: cxl features
+ *
+ * A CXL device that includes a mailbox supports commands that allows
+ * listing, getting, and setting of optionally defined features such
+ * as memory sparing or post package sparing. Vendors may define custom
+ * features for the device.
+ */
+
 /* All the features below are exclusive to the kernel */
 static const uuid_t cxl_exclusive_feats[] = {
 	CXL_FEAT_PATROL_SCRUB_UUID,
Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 10 lines · alison.schofield@ wrote:

From: Alison Schofield <[email protected]>

pmem.c regs.c mbox.c identifiers were missing. Add them to memory-devices.rst following their respective DOC comment includes.

Two acpi.c identifiers were available, but not used in kernel-doc's:
1) Add add_cxl_resources to memory-devices.rst and fix up the Sphinx complaint on the ascii art (escape and indent the pipes).
2) Add cxl_acpi_evaluate_qtg_dsm to access-coordinates.rst.

Quoted 4 lines

core/features.c is newish. Add a "DOC: cxl features" comment to the source and the doc and identifiers to memory_devices.rst.

With coordination with Gregory.

[snip]