Re: [PATCH v10 03/12] cxl: Share HDM decoder decode logic
From: Srirangan Madhavan
Date: Tue Sep 01 2026 - 22:12:23 EST
On 8/20/26 4:25 PM, Dave Jiang wrote:
I'm concerned about here modifying cxled->skip without the DPA write lock. Should it be:Thank you, addressed in v11.
skip = settings.target_or_skip;
And leave modification of cxled->skip to exclusively with devm_cxl_dpa_reserve()?
Also this change isn't mentioned by the commit log.
DJ
- Changed the decoder-count check to return bool and renamed the internal and wrapper helpers to __cxl_pci_hdm_decoder_count_match() and cxl_pci_hdm_decoder_count_match().
- Renamed the switch helper to cxl_switch_get_target_list().
- Renamed the cache update helper to cxl_hdm_save_decoder_info().
- Initialize the settings ID before the enabled-decoder check, removing the multi-line else.
- Added a lock assertion to cxl_decoder_snapshot() using a lockdep_assert_held().
After the refactor, the snapshot and switch-target changes now appear in patch 1. The PCI HDM cache updates remain in patch 4.
--
Regards,
Srirangan