public inbox for linux-edac@vger.kernel.org
 help / color / mirror / Atom feed
From: "Naik, Avadhut" <avadnaik@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-edac@vger.kernel.org, yazen.ghannam@amd.com,
	linux-kernel@vger.kernel.org, Avadhut Naik <avadhut.naik@amd.com>
Subject: Re: [PATCH 2/4] EDAC/amd64: Remove NUM_CONTROLLERS macro
Date: Wed, 22 Oct 2025 01:07:21 -0500	[thread overview]
Message-ID: <5b4c5e2d-75c3-4236-81ad-ddc94945a54b@amd.com> (raw)
In-Reply-To: <20251021104426.GJaPdkCgb5JjXqvSZz@fat_crate.local>



On 10/21/2025 05:44, Borislav Petkov wrote:
> On Mon, Oct 13, 2025 at 05:30:41PM +0000, Avadhut Naik wrote:
>> Currently, the NUM_CONTROLLERS macro is only used to statically allocate
>> the csels array of struct chip_select in struct amd64_pvt.
> 
> "... is used to limit the amount of memory controllers available per node."
> 
> You don't need to explain the code - think big picture.
> 
Okay!

>> The size of this array, however, will never exceed the number of UMCs on
>> the SOC.
> 
> Not on the SOC - the thing is per node instance.
>
Will change this!
 
>> Since, max_mcs variable in struct amd64_pvt already stores the
>> number of UMCs on the SOC, the macro can be removed and the static array
> 
> Please describe your changes in imperative mood.
> 
> Also, pls read section "2) Describe your changes" in
> Documentation/process/submitting-patches.rst for more details.
> 
Will do!

>> can be dynamically allocated instead.
>>
>> The max_mcs variable and the csels array are used for legacy systems too.
>> These systems have a max of 2 controllers (DCTs). Since the default value
> 
> DCTs are DRAM controllers. Do not confuse the reader.
> 
Will remove the *DCTs* word altogether.

>> of max_mcs, set in per_family_init(), is 2, these legacy system are also
>> covered by this change.
> 
> ...
> 
>> @@ -347,8 +346,8 @@ struct amd64_pvt {
>>  	u32 dbam0;		/* DRAM Base Address Mapping reg for DCT0 */
>>  	u32 dbam1;		/* DRAM Base Address Mapping reg for DCT1 */
>>  
>> -	/* one for each DCT/UMC */
>> -	struct chip_select csels[NUM_CONTROLLERS];
>> +	/* Allocate one for each DCT/UMC */
> 
> You're not allocating here anything. Just explain what this variable
> represents - IOW, the comment was fine.
> 
Will revert this!

>> +	struct chip_select *csels;
>>  
>>  	/* DRAM base and limit pairs F1x[78,70,68,60,58,50,48,40] */
>>  	struct dram_range ranges[DRAM_RANGES];
>> -- 
>> 2.43.0
>>
> 

-- 
Thanks,
Avadhut Naik


  reply	other threads:[~2025-10-22  6:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-13 17:30 [PATCH 0/4] Cleanups in amd64_edac Avadhut Naik
2025-10-13 17:30 ` [PATCH 1/4] EDAC/amd64: Generate ctl_name string at runtime Avadhut Naik
2025-10-20 13:47   ` Borislav Petkov
2025-10-20 18:28     ` Naik, Avadhut
2025-10-20 19:09       ` Borislav Petkov
2025-10-13 17:30 ` [PATCH 2/4] EDAC/amd64: Remove NUM_CONTROLLERS macro Avadhut Naik
2025-10-21 10:44   ` Borislav Petkov
2025-10-22  6:07     ` Naik, Avadhut [this message]
2025-10-13 17:30 ` [PATCH 3/4] EDAC/amd64: Set zn_regs_v2 flag for all AMD Family 1Ah-based SOCs Avadhut Naik
2025-10-29 17:10   ` Borislav Petkov
2025-10-30 13:48     ` Yazen Ghannam
2025-11-03 21:18       ` Borislav Petkov
2025-11-04 14:59         ` Yazen Ghannam
2025-10-13 17:30 ` [PATCH 4/4] EDAC/mc_sysfs: Begin deprecating legacy sysfs EDAC interface Avadhut Naik
2025-10-29 17:24   ` Borislav Petkov
2025-10-30 14:52     ` Naik, Avadhut
2025-10-30 15:01     ` Greg KH
2025-10-30 19:18       ` Borislav Petkov
2025-10-31 12:38         ` Greg KH
2025-10-31 12:54           ` Borislav Petkov
2025-10-31 19:34             ` Naik, Avadhut

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=5b4c5e2d-75c3-4236-81ad-ddc94945a54b@amd.com \
    --to=avadnaik@amd.com \
    --cc=avadhut.naik@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yazen.ghannam@amd.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