[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [RFC PATCH 1/5] cxl/core: correct length of DPA field masks
From: |
Dan Williams |
Subject: |
RE: [RFC PATCH 1/5] cxl/core: correct length of DPA field masks |
Date: |
Fri, 9 Feb 2024 22:34:31 -0800 |
Shiyang Ruan wrote:
> The length of Physical Address in General Media Event Record/DRAM Event
> Record is 64-bit, so the field mask should be defined as such length.
Can you include this user visible side-effect of this change. Looks like
this could cause usages of CXL_DPA_FLAGS_MASK to return an incorrect
result?
>
> Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com>
> ---
> drivers/cxl/core/trace.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
> index 89445435303a..388a87d972c2 100644
> --- a/drivers/cxl/core/trace.h
> +++ b/drivers/cxl/core/trace.h
> @@ -253,11 +253,11 @@ TRACE_EVENT(cxl_generic_event,
> * DRAM Event Record
> * CXL rev 3.0 section 8.2.9.2.1.2; Table 8-44
> */
> -#define CXL_DPA_FLAGS_MASK 0x3F
> +#define CXL_DPA_FLAGS_MASK 0x3FULL
> #define CXL_DPA_MASK (~CXL_DPA_FLAGS_MASK)
>
> -#define CXL_DPA_VOLATILE BIT(0)
> -#define CXL_DPA_NOT_REPAIRABLE BIT(1)
> +#define CXL_DPA_VOLATILE BIT_ULL(0)
> +#define CXL_DPA_NOT_REPAIRABLE BIT_ULL(1)
> #define show_dpa_flags(flags) __print_flags(flags, "|",
> \
> { CXL_DPA_VOLATILE, "VOLATILE" }, \
> { CXL_DPA_NOT_REPAIRABLE, "NOT_REPAIRABLE" } \
> --
> 2.34.1
>
- RE: [RFC PATCH 5/5] cxl/core: add poison injection event handler, (continued)
- [RFC PATCH 1/2] hw/cxl/type3: add missing flag bit for GMER, Shiyang Ruan, 2024/02/09
- [RFC PATCH 2/5] cxl/core: introduce cxl_memdev_dpa_to_hpa(), Shiyang Ruan, 2024/02/09
- [RFC PATCH 3/5] cxl/core: introduce cxl_mem_report_poison(), Shiyang Ruan, 2024/02/09
- [RFC PATCH 1/5] cxl/core: correct length of DPA field masks, Shiyang Ruan, 2024/02/09
- RE: [RFC PATCH 1/5] cxl/core: correct length of DPA field masks,
Dan Williams <=
- [RFC PATCH 2/2] hw/cxl/type3: send a GMER while injecting poison, Shiyang Ruan, 2024/02/09
- [RFC PATCH 4/5] cxl/core: add report option for cxl_mem_get_poison(), Shiyang Ruan, 2024/02/09
- Re: [RFC PATCH SET] cxl: add poison event handler, Dave Jiang, 2024/02/12