Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
From: Jacky Hu <hengqing.hu@gmail.com>
To: linux-edac@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, bp@alien8.de, tony.luck@intel.com,
	x86@kernel.org, Jacky Hu <hengqing.hu@gmail.com>
Subject: [PATCH 2/2] EDAC/amd64: Add family ops for Family 17h Models 60h-6Fh
Date: Sun,  7 Jun 2020 12:37:09 +0800
Message-ID: <20200607043709.48178-3-hengqing.hu@gmail.com> (raw)
In-Reply-To: <20200607043709.48178-1-hengqing.hu@gmail.com>

Add family ops to support AMD Family 17h, Models 60h-6Fh systems.

Signed-off-by: Jacky Hu <hengqing.hu@gmail.com>
---
 drivers/edac/amd64_edac.c | 14 ++++++++++++++
 drivers/edac/amd64_edac.h |  3 +++
 2 files changed, 17 insertions(+)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 9cf7cc1f3f72..0e74027d3660 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2319,6 +2319,16 @@ static struct amd64_family_type family_types[] = {
 			.dbam_to_cs		= f17_addr_mask_to_cs_size,
 		}
 	},
+	[F17_M60H_CPUS] = {
+		.ctl_name = "F17h_M60h",
+		.f0_id = PCI_DEVICE_ID_AMD_17H_M60H_DF_F0,
+		.f6_id = PCI_DEVICE_ID_AMD_17H_M60H_DF_F6,
+		.max_mcs = 2,
+		.ops = {
+			.early_channel_count	= f17_early_channel_count,
+			.dbam_to_cs		= f17_addr_mask_to_cs_size,
+		}
+	},
 	[F17_M70H_CPUS] = {
 		.ctl_name = "F17h_M70h",
 		.f0_id = PCI_DEVICE_ID_AMD_17H_M70H_DF_F0,
@@ -3357,6 +3367,10 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)
 			fam_type = &family_types[F17_M30H_CPUS];
 			pvt->ops = &family_types[F17_M30H_CPUS].ops;
 			break;
+		} else if (pvt->model >= 0x60 && pvt->model <= 0x6f) {
+			fam_type = &family_types[F17_M60H_CPUS];
+			pvt->ops = &family_types[F17_M60H_CPUS].ops;
+			break;
 		} else if (pvt->model >= 0x70 && pvt->model <= 0x7f) {
 			fam_type = &family_types[F17_M70H_CPUS];
 			pvt->ops = &family_types[F17_M70H_CPUS].ops;
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index abbf3c274d74..52b5d03eeba0 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -120,6 +120,8 @@
 #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F6 0x15ee
 #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F0 0x1490
 #define PCI_DEVICE_ID_AMD_17H_M30H_DF_F6 0x1496
+#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F0 0x1448
+#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F6 0x144e
 #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F0 0x1440
 #define PCI_DEVICE_ID_AMD_17H_M70H_DF_F6 0x1446
 #define PCI_DEVICE_ID_AMD_19H_DF_F0	0x1650
@@ -293,6 +295,7 @@ enum amd_families {
 	F17_CPUS,
 	F17_M10H_CPUS,
 	F17_M30H_CPUS,
+	F17_M60H_CPUS,
 	F17_M70H_CPUS,
 	F19_CPUS,
 	NUM_FAMILIES,
-- 
2.27.0


  parent reply index

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-07  4:37 [PATCH 0/2] MCA and EDAC updates for AMD Family 17h, Model 60h Jacky Hu
2020-06-07  4:37 ` [PATCH 1/2] x86/amd_nb: Add Family 17h, Model 60h PCI IDs Jacky Hu
2020-06-16 18:08   ` Borislav Petkov
2020-06-07  4:37 ` Jacky Hu [this message]
2020-06-16 18:09   ` [PATCH 2/2] EDAC/amd64: Add family ops for Family 17h Models 60h-6Fh Borislav Petkov
2020-06-17  1:32     ` [PATCH] hwmon: (k10temp) Add AMD family 17h model 60h probe Jacky Hu
2020-06-17  3:40       ` Guenter Roeck
2020-06-17  7:19         ` Jacky Hu
2020-06-17 14:33           ` Guenter Roeck
2020-06-17 14:55             ` Jacky Hu
2020-06-17 14:54           ` Alexander Monakov
2020-06-17 15:07             ` Jacky Hu
2020-06-17 15:22               ` Borislav Petkov
2020-06-15 11:59 ` [PATCH 0/2] MCA and EDAC updates for AMD Family 17h, Model 60h Borislav Petkov
2020-06-15 15:01   ` Guenter Roeck
2020-06-16 14:35     ` Borislav Petkov
2020-06-16 14:46       ` Guenter Roeck
2020-06-16 14:55         ` Borislav Petkov
2020-06-16 14:11   ` 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=20200607043709.48178-3-hengqing.hu@gmail.com \
    --to=hengqing.hu@gmail.com \
    --cc=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /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

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