Linux CXL
 help / color / mirror / Atom feed
* [PATCH v2 0/3] cxl: Format the device serial number as unsigned
@ 2026-07-02  0:30 Alison Schofield
  2026-07-02  0:30 ` [PATCH v2 1/3] cxl/pmem: Format the nvdimm serial number as unsigned decimal Alison Schofield
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alison Schofield @ 2026-07-02  0:30 UTC (permalink / raw)
  To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
	Vishal Verma, Ira Weiny, Dan Williams, Li Ming
  Cc: linux-cxl

This series supersedes the previously posted standalone fix:
  cxl/pmem: Format nvdimm serial number as decimal

That patch addressed the immediate auto-unlock failure caused by the
kernel formatting the nvdimm security key description differently than
the decimal 'id' sysfs attribute used by ndctl.

Further review uncovered a second formatting issue affecting the same
serial number. The CXL device serial number is a u64 PCIe Device Serial
Number, yet several kernel interfaces format it with signed "%lld".
Devices whose vendor OUI sets bit 63 therefore appear with negative
decimal serial numbers.

Serials with bit 64 set are expected. The most significant byte of the
PCIe Device Serial Number contains the vendor OUI, so vendors such as
Montage naturally produce serial numbers with bit 63 set.

Rather than merge the decimal-format fix and immediately follow it with
another patch changing the same code to "%llu", fold both fixes into a
single series that consistently formats CXL serial numbers as unsigned
where appropriate and adds cxl_test coverage for the large serial case.


Alison Schofield (3):
  cxl/pmem: Format the nvdimm serial number as unsigned decimal
  cxl/core: Format the memdev serial number as unsigned in TP_printk
  cxl/test: Assign one mock memdev a full-width serial number

 Documentation/ABI/testing/sysfs-bus-nvdimm |  3 ++-
 drivers/cxl/core/pmem.c                    | 10 ++++++----
 drivers/cxl/core/trace.h                   | 10 +++++-----
 drivers/cxl/cxl.h                          |  3 ++-
 drivers/cxl/pmem.c                         |  2 +-
 tools/testing/cxl/test/mem.c               | 15 ++++++++++++++-
 6 files changed, 30 insertions(+), 13 deletions(-)


base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
-- 
2.37.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-03  6:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02  0:30 [PATCH v2 0/3] cxl: Format the device serial number as unsigned Alison Schofield
2026-07-02  0:30 ` [PATCH v2 1/3] cxl/pmem: Format the nvdimm serial number as unsigned decimal Alison Schofield
2026-07-03  6:28   ` Richard Cheng
2026-07-02  0:30 ` [PATCH v2 2/3] cxl/core: Format the memdev serial number as unsigned in TP_printk Alison Schofield
2026-07-02  0:30 ` [PATCH v2 3/3] cxl/test: Assign one mock memdev a full-width serial number Alison Schofield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox