Re: [PATCH v5 3/7] cxl/region: Skip decoder reset on detach for autodiscovered regions
From: Koralahalli Channabasappa, Smita
Date: Mon Jan 26 2026 - 16:38:36 EST
Hi Jonathan,
On 1/22/2026 8:18 AM, Jonathan Cameron wrote:
On Thu, 22 Jan 2026 04:55:39 +0000
Smita Koralahalli <Smita.KoralahalliChannabasappa@xxxxxxx> wrote:
__cxl_decoder_detach() currently resets decoder programming whenever aReviewed-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>
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 <Smita.KoralahalliChannabasappa@xxxxxxx>
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/6930dacd6510f_198110020@dwillia2-mobl4.notmuch/
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