Patch "cxl/trace: Correct DPA field masks for general_media & dram events" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    cxl/trace: Correct DPA field masks for general_media & dram events

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     cxl-trace-correct-dpa-field-masks-for-general_media-.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1059ef95c75e915c16233e1af2028e38df735d43
Author: Alison Schofield <alison.schofield@xxxxxxxxx>
Date:   Tue Apr 30 10:28:03 2024 -0700

    cxl/trace: Correct DPA field masks for general_media & dram events
    
    [ Upstream commit 2042d11cb57b7e0cbda7910e5ff80e9e8bf0ae17 ]
    
    The length of Physical Address in General Media and DRAM event
    records is 64-bit, so the field mask for extracting the DPA should
    be 64-bit also, otherwise the trace event reports DPA's with the
    upper 32 bits of a DPA address masked off. If users do DPA-to-HPA
    translations this could lead to incorrect page retirement decisions.
    
    Use GENMASK_ULL() for CXL_DPA_MASK to get all the DPA address bits.
    
    Tidy up CXL_DPA_FLAGS_MASK by using GENMASK() to only mask the exact
    flag bits.
    
    These bits are defined as part of the event record physical address
    descriptions of General Media and DRAM events in CXL Spec 3.1
    Section 8.2.9.2 Events.
    
    Fixes: d54a531a430b ("cxl/mem: Trace General Media Event Record")
    Co-developed-by: Shiyang Ruan <ruansy.fnst@xxxxxxxxxxx>
    Signed-off-by: Shiyang Ruan <ruansy.fnst@xxxxxxxxxxx>
    Signed-off-by: Alison Schofield <alison.schofield@xxxxxxxxx>
    Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>
    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/2867fc43c57720a4a15a3179431829b8dbd2dc16.1714496730.git.alison.schofield@xxxxxxxxx
    Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
index e5f13260fc524..7c5cd069f10cc 100644
--- a/drivers/cxl/core/trace.h
+++ b/drivers/cxl/core/trace.h
@@ -253,8 +253,8 @@ 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_MASK				(~CXL_DPA_FLAGS_MASK)
+#define CXL_DPA_FLAGS_MASK			GENMASK(1, 0)
+#define CXL_DPA_MASK				GENMASK_ULL(63, 6)
 
 #define CXL_DPA_VOLATILE			BIT(0)
 #define CXL_DPA_NOT_REPAIRABLE			BIT(1)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux