Re: [PATCH v5 5/5] EDAC/amd64: Enumerate memory on Aldebaran GPU nodes

From: Yazen Ghannam
Date: Wed Oct 27 2021 - 18:33:42 EST


On Mon, Oct 25, 2021 at 08:20:18PM +0530, Naveen Krishna Chatradhi wrote:
...
> @@ -3726,10 +3944,21 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)
> pvt->ops = &family_types[F17_M70H_CPUS].ops;
> pvt->fam_type->ctl_name = "F19h_M20h";
> break;
> + } else if (pvt->model >= 0x30 && pvt->model <= 0x3f) {
> + if (pvt->mc_node_id >= amd_cpu_node_count()) {
> + pvt->fam_type = &family_types[ALDEBARAN_GPUS];
> + pvt->ops = &family_types[ALDEBARAN_GPUS].ops;
> + pvt->is_gpu = true;
> + } else {
> + pvt->fam_type = &family_types[F19_CPUS];
> + pvt->ops = &family_types[F19_CPUS].ops;
> + family_types[F19_CPUS].ctl_name = "F19h_M30h";
> + }
> + } else {
> + pvt->fam_type = &family_types[F19_CPUS];
> + pvt->ops = &family_types[F19_CPUS].ops;
> + family_types[F19_CPUS].ctl_name = "F19h";
> }
> - pvt->fam_type = &family_types[F19_CPUS];
> - pvt->ops = &family_types[F19_CPUS].ops;
> - family_types[F19_CPUS].ctl_name = "F19h";
> break;
>

Why move these lines into the else clause above?

Thanks,
Yazen