Re: [PATCH v4 2/4] cxl/hdm: Only interpret interleave settings on committed decoders

Alison Schofield <[email protected]>
Newsgroups org.kernel.vger.linux-cxl
Message-ID <[email protected]>
On Wed, Jul 29, 2026 at 09:34:35AM -0700, Davidlohr Bueso wrote:
> On Mon, 20 Jul 2026, Alison Schofield wrote:
> 
> > Decoder enumeration reads the interleave ways and granularity fields
> > from the CTRL register unconditionally, then decodes and validates
> > them for every decoder. On an uncommitted decoder these fields are
> > stale. They hold whatever was last latched and are reprogrammed when
> > the decoder is committed. Interpreting them serves no purpose, and
> > rejecting enumeration on a reserved encoding in those stale bits can
> > fail an otherwise usable decoder.
> > 
> > Decode and validate interleave ways and granularity only when the
> > decoder is committed. On an uncommitted decoder the stale register
> > values are not interpreted. The interleave fields are set when the
> > decoder is programmed at commit time.
> > 
> 
> It's weird to cat the respective sysfs file and get bogus values.
> imo this should be kept as is.

Thanks for the reviews Davidlohr,

Agreed, the patch is dropped in v5. It changes what userspace sees:
decoderX.Y/interleave_ways and decoderX.Y/interleave_granularity are
documented read-only attributes that report the decoded register fields,
and skipping the decode makes them report driver defaults instead.


> 
> Thanks,
> Davidlohr
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.