Hi Jonathan,
On 1/22/2026 8:18 AM, Jonathan Cameron wrote:
On Thu, 22 Jan 2026 04:55:39 +0000
Smita Koralahalli <[email protected]> wrote:
__cxl_decoder_detach() currently resets decoder programming whenever a
region is detached if cxl_config_state is beyond CXL_CONFIG_ACTIVE. For
autodiscovered regions, this can incorrectly tear down decoder state
that may be relied upon by other consumers or by subsequent ownership
decisions.
Skip cxl_region_decode_reset() during detach when CXL_REGION_F_AUTO is
set.
Signed-off-by: Smita Koralahalli <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
purely on basis we should probably not undo things we didn't do in the
first place.
J
Thank you!
I’m re reading Dan’s note here:
https://lore.kernel.org/all/[email protected]/
Specifically this part:
"If the administrator actually wants to destroy and reclaim that
physical address space then they need to forcefully de-commit that
auto-assembled region via the @commit sysfs attribute. So that means
commit_store() needs to clear CXL_REGION_F_AUTO to get the decoder reset
to happen."
Today the sysfs commit=0 path inside commit_store() resets decoders
without the AUTO check whereas the detach path now skips the reset when
CXL_REGION_F_AUTO is set.
I think the same rationale should apply to the sysfs de-commit path as
well? I’m trying to understand the implications of not guarding the
reset with AUTO in commit_store().
Thanks
Smita