Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] EDAC/amd64: Set proper family type for Family 19h Models 20h-2Fh
@ 2020-10-09 17:18 Yazen Ghannam
  2020-10-09 17:42 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Yazen Ghannam @ 2020-10-09 17:18 UTC (permalink / raw)
  To: linux-edac
  Cc: Yazen Ghannam, linux-kernel, bp, Smita.KoralahalliChannabasappa

From: Yazen Ghannam <yazen.ghannam@amd.com>

AMD Family 19h Models 20h-2Fh use the same PCI IDs as Family 17h Models
70h-7Fh. The same family ops and number of channels also apply.

Use the Family17h Model 70h family_type and ops for Family 19h Models
20h-2Fh. Update the controller name to match the system.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
 drivers/edac/amd64_edac.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index fcc08bbf6945..1362274d840b 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -3385,6 +3385,12 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)
 		break;
 
 	case 0x19:
+		if (pvt->model >= 0x20 && pvt->model <= 0x2f) {
+			fam_type = &family_types[F17_M70H_CPUS];
+			pvt->ops = &family_types[F17_M70H_CPUS].ops;
+			fam_type->ctl_name = "F19h_M20h";
+			break;
+		}
 		fam_type	= &family_types[F19_CPUS];
 		pvt->ops	= &family_types[F19_CPUS].ops;
 		family_types[F19_CPUS].ctl_name = "F19h";
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] EDAC/amd64: Set proper family type for Family 19h Models 20h-2Fh
  2020-10-09 17:18 [PATCH] EDAC/amd64: Set proper family type for Family 19h Models 20h-2Fh Yazen Ghannam
@ 2020-10-09 17:42 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2020-10-09 17:42 UTC (permalink / raw)
  To: Yazen Ghannam; +Cc: linux-edac, linux-kernel, Smita.KoralahalliChannabasappa

On Fri, Oct 09, 2020 at 05:18:03PM +0000, Yazen Ghannam wrote:
> From: Yazen Ghannam <yazen.ghannam@amd.com>
> 
> AMD Family 19h Models 20h-2Fh use the same PCI IDs as Family 17h Models
> 70h-7Fh. The same family ops and number of channels also apply.
> 
> Use the Family17h Model 70h family_type and ops for Family 19h Models
> 20h-2Fh. Update the controller name to match the system.
> 
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
>  drivers/edac/amd64_edac.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
> index fcc08bbf6945..1362274d840b 100644
> --- a/drivers/edac/amd64_edac.c
> +++ b/drivers/edac/amd64_edac.c
> @@ -3385,6 +3385,12 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)
>  		break;
>  
>  	case 0x19:
> +		if (pvt->model >= 0x20 && pvt->model <= 0x2f) {
> +			fam_type = &family_types[F17_M70H_CPUS];
> +			pvt->ops = &family_types[F17_M70H_CPUS].ops;
> +			fam_type->ctl_name = "F19h_M20h";
> +			break;
> +		}
>  		fam_type	= &family_types[F19_CPUS];
>  		pvt->ops	= &family_types[F19_CPUS].ops;
>  		family_types[F19_CPUS].ctl_name = "F19h";
> -- 

Applied, thanks.

It is too close to the merge window but this is enablement for new hw
which no one has yet so nothing should break.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 17:18 [PATCH] EDAC/amd64: Set proper family type for Family 19h Models 20h-2Fh Yazen Ghannam
2020-10-09 17:42 ` Borislav Petkov

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git