Re: [PATCH v4 4/4] EDAC/amd64: Enumerate memory on Aldebaran GPU nodes

Yazen Ghannam
2021-10-21T16:41:30Z

On Fri, Oct 15, 2021 at 12:24:00AM +0530, Naveen Krishna Chatradhi wrote:
...
> @@ -3726,6 +3935,17 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)
> pvt->ops = &family_types[F17_M70H_CPUS].ops;
> fam_type->ctl_name = "F19h_M20h";
> break;
> + } else if (pvt->model >= 0x30 && pvt->model <= 0x3f) {
> + if (pvt->mc_node_id >= amd_cpu_node_count()) {
> + fam_type = &family_types[ALDEBARAN_GPUS];

The fam_type needs to become part of amd64_pvt.

Otherwise, what happens here is the module loads on a CPU node and sets a CPU
family type. Then a GPU node is probed and the family type is overwritten
with a GPU family type.

> + pvt->ops = &family_types[ALDEBARAN_GPUS].ops;
> + pvt->is_gpu = true;
> + } else {
> + fam_type = &family_types[F19_CPUS];
> + pvt->ops = &family_types[F19_CPUS].ops;
> + fam_type->ctl_name = "F19h_M30h";
> + }
> + break;
> }
> fam_type = &family_types[F19_CPUS];
> pvt->ops = &family_types[F19_CPUS].ops;
> @@ -3808,9 +4028,10 @@ static int init_one_instance(struct amd64_pvt *pvt)

Thanks,
Yazen