From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: <linux-cxl@vger.kernel.org>, <dan.j.williams@intel.com>,
<ira.weiny@intel.com>, <vishal.l.verma@intel.com>,
<alison.schofield@intel.com>
Subject: Re: [PATCH] cxl: fix cxl_report_and_clear() RAS UE addr mis-assignment
Date: Mon, 9 Jan 2023 14:19:18 +0000 [thread overview]
Message-ID: <20230109141918.00001f48@Huawei.com> (raw)
In-Reply-To: <167302318779.580155.15233596744650706167.stgit@djiang5-mobl3.local>
On Fri, 06 Jan 2023 09:39:49 -0700
Dave Jiang <dave.jiang@intel.com> wrote:
> 'addr' that contains RAS UE register address is re-assigned to
> RAS_CAP_CONTROL offset if there are multiple UE errors. Use different addr
> variable to avoid the reassignment mistake.
>
> Fixes: 2905cb5236cb ("cxl/pci: Add (hopeful) error handling support")
> Reported-by: Jonathan Cameron <jonathan.cameron@huawei.com>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Exactly what I expected. Thanks for the quick turn around.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
I'm working on adding multiple header log handling on top of your
code. Will hopefully have something to share on that later in the week.
> ---
> drivers/cxl/pci.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
> index 33083a522fd1..258004f34281 100644
> --- a/drivers/cxl/pci.c
> +++ b/drivers/cxl/pci.c
> @@ -554,8 +554,11 @@ static bool cxl_report_and_clear(struct cxl_dev_state *cxlds)
>
> /* If multiple errors, log header points to first error from ctrl reg */
> if (hweight32(status) > 1) {
> - addr = cxlds->regs.ras + CXL_RAS_CAP_CONTROL_OFFSET;
> - fe = BIT(FIELD_GET(CXL_RAS_CAP_CONTROL_FE_MASK, readl(addr)));
> + void __iomem *rcc_addr =
> + cxlds->regs.ras + CXL_RAS_CAP_CONTROL_OFFSET;
> +
> + fe = BIT(FIELD_GET(CXL_RAS_CAP_CONTROL_FE_MASK,
> + readl(rcc_addr)));
> } else {
> fe = status;
> }
>
>
prev parent reply other threads:[~2023-01-09 14:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 16:39 [PATCH] cxl: fix cxl_report_and_clear() RAS UE addr mis-assignment Dave Jiang
2023-01-06 17:05 ` Ira Weiny
2023-01-09 14:19 ` Jonathan Cameron [this message]
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=20230109141918.00001f48@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--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.