[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <671045fc36835_3ee2294a5@dwillia2-xfh.jf.intel.com.notmuch>
Date: Wed, 16 Oct 2024 16:02:20 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Zijun Hu <zijun_hu@...oud.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Davidlohr Bueso <dave@...olabs.net>, "Jonathan
Cameron" <jonathan.cameron@...wei.com>, Dave Jiang <dave.jiang@...el.com>,
Alison Schofield <alison.schofield@...el.com>, Vishal Verma
<vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>, Dan Williams
<dan.j.williams@...el.com>
CC: Przemek Kitszel <przemyslaw.kitszel@...el.com>, Zijun Hu
<zijun_hu@...oud.com>, <linux-cxl@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: Re: [PATCH v6] cxl/region: Fix wrong logic for finding a free switch
cxl decoder
Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@...cinc.com>
>
> Provided that all child switch cxl decoders are sorted by ID in ascending
> order, then it is wrong for current match_free_decoder()'s logic to find
> a free cxl decoder as explained below:
>
> Port
> ├── cxld A <----> region A
> ├── cxld B // no region
> ├── cxld C <----> region C
>
> Current logic will find cxld B as a free one, but cxld B is not true
> free since region C has not been torn down, so current logic is wrong.
>
> Fixed by verifying if cxl decoder with ID (@port->commit_end + 1) can
> be returned as finding result.
>
> Link: https://lore.kernel.org/all/670af54931b8_964fe29427@dwillia2-xfh.jf.intel.com.notmuch/
> Suggested-by: Dan Williams <dan.j.williams@...el.com>
> Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
> ---
> This patch is incremental to below patch series with title "cxl: Initialization and shutdown fixes"
> http://lore.kernel.org/172862483180.2150669.5564474284074502692.stgit@dwillia2-xfh.jf.intel.com
>
> This patch is based on Dan's recommendation shown by below link:
> https://lore.kernel.org/all/670af54931b8_964fe29427@dwillia2-xfh.jf.intel.com.notmuch/
...and Dan and already sent a patch he is happier with here:
http://lore.kernel.org/172895072669.39002.9296583943188706348.stgit@dwillia2-xfh.jf.intel.com
Powered by blists - more mailing lists