All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alison Schofield <alison.schofield@intel.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Dave Jiang <dave.jiang@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <iweiny@kernel.org>, "Dan Williams" <djbw@kernel.org>,
	Li Ming <ming.li@zohomail.com>, <linux-cxl@vger.kernel.org>,
	Srirangan Madhavan <smadhavan@nvidia.com>,
	Richard Cheng <icheng@nvidia.com>
Subject: Re: [PATCH v4 3/4] cxl/hdm: Make switch decoder target parsing endian-safe
Date: Fri, 7 Aug 2026 16:56:28 -0700	[thread overview]
Message-ID: <anZwrPrrnnomgKB0@aschofie-mobl2.lan> (raw)
In-Reply-To: <20260722020749.1826e787@jic23-huawei>

On Wed, Jul 22, 2026 at 02:07:49AM +0100, Jonathan Cameron wrote:
> On Mon, 20 Jul 2026 18:59:39 -0700
> Alison Schofield <alison.schofield@intel.com> wrote:
> 
> > Switch decoder target IDs are stored one per byte, starting with
> > target 0 in the least significant byte. The current code accesses
> > those bytes in memory order, which only matches register order on
> > little-endian hosts.
> > 
> > On big-endian hosts, the target IDs are reversed and the decoder is
> > associated with the wrong downstream ports.
> > 
> > Extract each target ID from the register value with an explicit shift
> > and mask so the target mapping is independent of host endianness.
> > 
> > Fixes: d17d0540a0db ("cxl/core/hdm: Add CXL standard decoder enumeration to the core")
> > Reviewed-by: Richard Cheng <icheng@nvidia.com>
> > Reviewed-by: Li Ming <ming.li@zohomail.com>
> > Signed-off-by: Alison Schofield <alison.schofield@intel.com>
> 
> Suggestion for explicitly handling the endian issue inline.

Done in v5.


> I'm also fine if you stick with what you have here.
> 
> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
>
Dropped all the Reviewed-by: tags for that change though. :(



  reply	other threads:[~2026-08-07 23:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-21  1:59 [PATCH v4 0/4] Harden HDM decoder enumeration Alison Schofield
2026-07-21  1:59 ` [PATCH v4 1/4] cxl/hdm: Reject switch decoder interleave ways that overflow targets Alison Schofield
2026-07-21  2:14   ` sashiko-bot
2026-07-21  6:27   ` Li Ming
2026-08-07 23:45     ` Alison Schofield
2026-07-22  0:55   ` Jonathan Cameron
2026-08-07 23:42     ` Alison Schofield
2026-07-29 16:45   ` Davidlohr Bueso
2026-07-21  1:59 ` [PATCH v4 2/4] cxl/hdm: Only interpret interleave settings on committed decoders Alison Schofield
2026-07-21  6:26   ` Li Ming
2026-08-07 23:50     ` Alison Schofield
2026-07-29 16:34   ` Davidlohr Bueso
2026-08-07 23:47     ` Alison Schofield
2026-07-21  1:59 ` [PATCH v4 3/4] cxl/hdm: Make switch decoder target parsing endian-safe Alison Schofield
2026-07-21 15:09   ` Dave Jiang
2026-07-22  1:07   ` Jonathan Cameron
2026-08-07 23:56     ` Alison Schofield [this message]
2026-07-21  1:59 ` [PATCH v4 4/4] cxl/hdm: Restore commit_end when decoder enumeration fails Alison Schofield
2026-07-21  6:28   ` Li Ming
2026-07-21 15:12   ` Dave Jiang
2026-08-07 23:58     ` Alison Schofield
2026-07-22  1:17   ` Jonathan Cameron
2026-07-21  9:41 ` [PATCH v4 0/4] Harden HDM decoder enumeration Richard Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=anZwrPrrnnomgKB0@aschofie-mobl2.lan \
    --to=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=djbw@kernel.org \
    --cc=icheng@nvidia.com \
    --cc=iweiny@kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=ming.li@zohomail.com \
    --cc=smadhavan@nvidia.com \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.