public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: William Roche <william.roche@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
	mchehab@kernel.org, tony.luck@intel.com, james.morse@arm.com,
	rric@kernel.org, Smita.KoralahalliChannabasappa@amd.com
Subject: Re: [PATCH v4 1/2] EDAC/amd64: Set memory type per DIMM
Date: Fri, 4 Feb 2022 15:51:14 +0000	[thread overview]
Message-ID: <Yf1LchOlECslWK2b@yaz-ubuntu> (raw)
In-Reply-To: <962dc65c-6e52-bf02-5ba5-7e8731442390@oracle.com>

On Thu, Feb 03, 2022 at 04:46:44PM +0100, William Roche wrote:
> On 03/02/2022 15:09, Borislav Petkov wrote:
> 
> > On Thu, Feb 03, 2022 at 02:19:19PM +0100, William Roche wrote:
> > > As we are moving the dram_type cached date from pvt to umc for family >=
> > > 0x17, should we also add a small comment for the dram_type field in the
> > > amd64_pvt structure to indicate that ?
> > Who would be that comment for? People who are looking at the code, so
> > that they know which is which?
> 
> Yes, it could be a hint about the use case of this field.
> Of course we could be more complete and also comment the umc field use in
> this same structure that depends on the family higher or lower than 17 too.
> But I had the impression that the creation of a new dram_type cache field
> would be clarified by a comment on the old location, that's it.
> It's up to Yazen and you to include or not  this small addition about
> dram_type.
>

Thanks William for the review.

I think this is a good suggestion. I think it could be a bit more verbose.
Please see below.

Thanks,
Yazen

---
 
From 028207619fb01008a2defc65183cbd30f98c021f Mon Sep 17 00:00:00 2001
From: Yazen Ghannam <yazen.ghannam@amd.com>
Date: Fri, 4 Feb 2022 15:10:52 +0000
Subject: [PATCH] EDAC/amd64: Comment on which dram_type to use

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@amd.com>
---
 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


  reply	other threads:[~2022-02-04 15:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02 14:43 [PATCH v4 0/2] AMD Family 19h Models 10h-1Fh Updates Yazen Ghannam
2022-02-02 14:43 ` [PATCH v4 1/2] EDAC/amd64: Set memory type per DIMM Yazen Ghannam
2022-02-03 13:19   ` William Roche
2022-02-03 14:09     ` Borislav Petkov
2022-02-03 15:46       ` William Roche
2022-02-04 15:51         ` Yazen Ghannam [this message]
2022-02-04 17:20           ` William Roche
2022-02-23 20:55   ` Borislav Petkov
2022-02-24 18:18     ` Yazen Ghannam
2022-02-02 14:43 ` [PATCH v4 2/2] EDAC/amd64: Add new register offset support and related changes Yazen Ghannam
2022-02-03 13:19   ` William Roche
2022-03-06 16:18 ` [PATCH v4 0/2] AMD Family 19h Models 10h-1Fh Updates Borislav Petkov
2022-03-09 21:05   ` Yazen Ghannam

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=Yf1LchOlECslWK2b@yaz-ubuntu \
    --to=yazen.ghannam@amd.com \
    --cc=Smita.KoralahalliChannabasappa@amd.com \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=william.roche@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox