summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2026-11-08 14:07:33 -0800
committerDave Jiang <dave.jiang@intel.com>2026-11-09 15:25:19 -0700
commite4c3f0d9666774886e05df83bb54f5b27324c979 (patch)
tree2c6cd323adf352ed6ff3da430f92e8d5f9ccf998 /scripts/Makefile.thinlto
parent617f6082758fc8490918490c0721a0def14ab4cf (diff)
downloadlinux-next-e4c3f0d9666774886e05df83bb54f5b27324c979.tar.gz
linux-next-e4c3f0d9666774886e05df83bb54f5b27324c979.zip
cxl: Add HDM-DB region creation
A region created through sysfs inherits its coherency from the chosen root decoder - HDM-DB if the root has CXL_DECODER_F_BI, otherwise HDM-H. An auto-assembled region takes its type from the committed decoder it is built from instead. cxl_acpi_cfmws_verify() rejects a Window that declares no coherency model at all (neither Device Coherent nor Host-only Coherent), and one that sets BI together with Host-only Coherent, which the CFMWS definition calls undefined behavior. A BI Window therefore always exposes device-coherent memory and nothing else, HDM-DB being defined only as bit[0] and bit[5] together. Introduce the following read-only sysfs ABI. - decoderX.Y/cap_back_invalidate (root) reports the CFMWS BI restriction. - decoderX.Y/back_invalidate (endpoint) reads '1' when configured for HDM-DB. cxl_region_attach() rejects endpoints whose device or HDM cannot serve the region's type; target_type is inherited from cxlr->type in cxl_rr_assign_decoder(), restored to the endpoint default on detach unless the decoder is still committed, and to whatever it was on a failed attach - a refusal may come before any inheritance, for a decoder another region owns or one firmware committed, and must not relabel it. An HDM that reports Unknown coherency support is not rejected. Supported Coherency Models is how a device declares whether Target Range Type is writable - Host-only+Device Coherent means RW, a single model means the bit may be hardwired to it, Unknown declares neither - so refusing Unknown would also exclude devices that support both models without saying so. A Type 3 decoder defaults to host-only, unless its HDM supports only device-coherent, and inherits device-coherent when it joins an HDM-DB region, which requires cxlds->bi. A Type 2 decoder defaults to device-coherent and an HDM-H region refuses it outright, since the spec reserves HDM-H for Type 3 devices. An HDM-D region is only assembled from a committed decoder, taking that decoder's type, so no inheritance is involved. The HDM Decoder Control BI bit is set at commit time for a device-coherent decoder in a region under a BI root, endpoint and switch decoders alike. Whether the device has BI enabled (cxlds->bi) is checked when an endpoint attaches and again for every target before a commit programs anything, since a reset in between invalidates it; the refusal is the same in both places. The BI bit a decoder was committed with is read back and recorded as CXL_DECODER_F_BI, and cleared with CXL_DECODER_F_ENABLE on reset. On a root decoder the same flag is the window's BI restriction, as F_LOCK already means a fixed window there and Lock On Commit below. A committed decoder cannot inherit a region's type, so its range type is checked instead: against the window before the region is built, as the manual path already does through can_create_ram(), and against the region at attach, where upstream's type mismatch refusal stays for committed decoders. Committed means CXL_DECODER_F_ENABLE, not an auto-assembly state: a decoder left committed by a region that never assembled, or by a locked one, is as committed as one in an assembled region. Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://patch.msgid.link/5d3ac10113c01cb52f12184b06eb6a1dcbb2516d.1794172701.git.dave@stgolabs.net Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions