[PATCH] EDAC/amd64: Comment on which dram_type to use

From: Yazen Ghannam
Date: Fri Feb 04 2022 - 10:10:52 EST


A copy of enum mem_type was added to struct amd64_umc so that memory
type can be properly identified on each independent Unified Memory
Controller.

Add a comment to the original struct amd64_pvt variable to indicate it
shouldn't be used on newer systems.

Signed-off-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>
---
drivers/edac/amd64_edac.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index 6f8147abfa71..38e5ad95d010 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -397,7 +397,12 @@ struct amd64_pvt {
/* place to store error injection parameters prior to issue */
struct error_injection injection;

- /* cache the dram_type */
+ /*
+ * cache the dram_type
+ *
+ * NOTE: Don't use this for Family 17h and later.
+ * Use dram_type in struct amd64_umc instead.
+ */
enum mem_type dram_type;

struct amd64_umc *umc; /* UMC registers */
--
2.25.1