-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cxl/hdm: Commit decoder state to hardware
After all the soft validation of the region has completed, convey the region configuration to hardware while being careful to commit decoders in specification mandated order. In addition to programming the endpoint decoder base-address, interleave ways and granularity, the switch decoder target lists are also established. While the kernel can enforce spec-mandated commit order, it can not enforce spec-mandated reset order. For example, the kernel can't stop someone from removing an endpoint device that is occupying decoderN in a switch decoder where decoderN+1 is also committed. To reset decoderN, decoderN+1 must be torn down first. That "tear down the world" implementation is saved for a follow-on patch. Callback operations are provided for the 'commit' and 'reset' operations. While those callbacks may prove useful for CXL accelerators (Type-2 devices with memory) the primary motivation is to enable a simple way for cxl_test to intercept those operations. Reviewed-by: Jonathan Cameron <[email protected]> Link: https://lore.kernel.org/r/165784338418.1758207.14659830845389904356.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams <[email protected]>
- Loading branch information
Showing
6 changed files
with
486 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -372,3 +372,19 @@ Description: | |
not an endpoint decoder. Once all positions have been | ||
successfully written a final validation for decode conflicts is | ||
performed before activating the region. | ||
|
||
|
||
What: /sys/bus/cxl/devices/regionZ/commit | ||
Date: May, 2022 | ||
KernelVersion: v5.20 | ||
Contact: [email protected] | ||
Description: | ||
(RW) Write a boolean 'true' string value to this attribute to | ||
trigger the region to transition from the software programmed | ||
state to the actively decoding in hardware state. The commit | ||
operation in addition to validating that the region is in proper | ||
configured state, validates that the decoders are being | ||
committed in spec mandated order (last committed decoder id + | ||
1), and checks that the hardware accepts the commit request. | ||
Reading this value indicates whether the region is committed or | ||
not. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.