]> git.itanic.dy.fi Git - linux-stable/commit
cxl/region: Manage decoder target_type at decoder-attach time
authorDan Williams <dan.j.williams@intel.com>
Thu, 15 Jun 2023 01:30:25 +0000 (18:30 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 25 Jun 2023 21:31:09 +0000 (14:31 -0700)
commit8c897b366cda9c7e5ebbb6e8e3da238ecec84535
tree29e8be21da4ac2d53058760bc4ce9c345fc5ec70
parentcecbb5da921231aa0933667fba85bea5b91d6a46
cxl/region: Manage decoder target_type at decoder-attach time

Switch-level (mid-level) decoders between the platform root and an
endpoint can dynamically switch modes between HDM-H and HDM-D[B]
depending on which region they target. Use the region type to fixup each
decoder that gets allocated to map the given region.

Note that endpoint decoders are meant to determine the region type, so
warn if those ever need to be fixed up, but since it is possible to
continue do so.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/168679262543.3436160.13053831955768440312.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core/region.c