All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Ming <ming.li@zohomail.com>
To: Alison Schofield <alison.schofield@intel.com>
Cc: linux-cxl@vger.kernel.org,
	Srirangan Madhavan <smadhavan@nvidia.com>,
	Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jic23@kernel.org>,
	Dave Jiang <dave.jiang@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <iweiny@kernel.org>
Subject: Re: [PATCH v5 2/4] cxl/hdm: Make switch decoder target parsing endian-safe
Date: Sat, 8 Aug 2026 13:51:23 +0800	[thread overview]
Message-ID: <99802ed3-8141-4e3a-87f4-a71e4e4ffde0@zohomail.com> (raw)
In-Reply-To: <b0526825b3c3ffdb78837563e178d9aa27b6bbb8.1786143520.git.alison.schofield@intel.com>

On 8/8/2026 8:05 AM, Alison Schofield 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.
>
> Place the register values in a byte array in little-endian order and
> index the target IDs from there, so the target mapping is independent
> of host endianness.
>
> Fixes: d17d0540a0db ("cxl/core/hdm: Add CXL standard decoder enumeration to the core")
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Li Ming <ming.li@zohomail.com>

  reply	other threads:[~2026-08-08  5:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-08  0:05 [PATCH v5 0/4] Harden HDM decoder enumeration Alison Schofield
2026-08-08  0:05 ` [PATCH v5 1/4] cxl/hdm: Reject switch decoder interleave ways that overflow targets Alison Schofield
2026-08-08  0:17   ` sashiko-bot
2026-08-08  0:36     ` Alison Schofield
2026-08-08  5:50   ` Li Ming
2026-08-08  0:05 ` [PATCH v5 2/4] cxl/hdm: Make switch decoder target parsing endian-safe Alison Schofield
2026-08-08  5:51   ` Li Ming [this message]
2026-08-08  0:05 ` [PATCH v5 3/4] cxl/hdm: Restore commit_end when decoder enumeration fails Alison Schofield
2026-08-08  0:05 ` [PATCH v5 4/4] cxl/port: Bound switch decoder target array access by nr_targets Alison Schofield
2026-08-08  5:52   ` Li Ming

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=99802ed3-8141-4e3a-87f4-a71e4e4ffde0@zohomail.com \
    --to=ming.li@zohomail.com \
    --cc=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=iweiny@kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --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.