All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] amd64_edac: Add support for newer F16h models
@ 2014-02-20 16:28 Aravind Gopalakrishnan
  2014-02-21 14:27 ` Borislav Petkov
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Aravind Gopalakrishnan @ 2014-02-20 16:28 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86, dougthompson, bp, bhelgaas, JBeulich,
	dan.carpenter, linux-kernel, linux-edac, linux-pci
  Cc: Arindam.Nath, Aravind Gopalakrishnan

Extending ECC decoding support for F16h M30h.

Tested on F16h M30h with ECC turned on using mce_amd_inj module and
the patch works fine.

Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Tested-by: Arindam Nath <Arindam.Nath@amd.com>
---
 arch/x86/kernel/amd_nb.c  |  2 ++
 drivers/edac/amd64_edac.c | 24 ++++++++++++++++++++++++
 drivers/edac/amd64_edac.h |  3 +++
 include/linux/pci_ids.h   |  2 ++
 4 files changed, 31 insertions(+)

diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
index dec8de4..f04dbb3 100644
--- a/arch/x86/kernel/amd_nb.c
+++ b/arch/x86/kernel/amd_nb.c
@@ -22,6 +22,7 @@ const struct pci_device_id amd_nb_misc_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F3) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
 	{}
 };
 EXPORT_SYMBOL(amd_nb_misc_ids);
@@ -30,6 +31,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F4) },
 	{}
 };
 
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 98e14ee..4c2d641 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1799,6 +1799,17 @@ static struct amd64_family_type family_types[] = {
 			.read_dct_pci_cfg	= f10_read_dct_pci_cfg,
 		}
 	},
+	[F16_M30H_CPUS] = {
+		.ctl_name = "F16h_M30h",
+		.f1_id = PCI_DEVICE_ID_AMD_16H_M30H_NB_F1,
+		.f3_id = PCI_DEVICE_ID_AMD_16H_M30H_NB_F3,
+		.ops = {
+			.early_channel_count	= f1x_early_channel_count,
+			.map_sysaddr_to_csrow	= f1x_map_sysaddr_to_csrow,
+			.dbam_to_cs		= f16_dbam_to_chip_select,
+			.read_dct_pci_cfg	= f10_read_dct_pci_cfg,
+		}
+	},
 };
 
 /*
@@ -2578,6 +2589,11 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)
 		break;
 
 	case 0x16:
+		if (pvt->model == 0x30) {
+			fam_type = &family_types[F16_M30H_CPUS];
+			pvt->ops = &family_types[F16_M30H_CPUS].ops;
+			break;
+		}
 		fam_type	= &family_types[F16_CPUS];
 		pvt->ops	= &family_types[F16_CPUS].ops;
 		break;
@@ -2830,6 +2846,14 @@ static const struct pci_device_id amd64_pci_table[] = {
 		.class		= 0,
 		.class_mask	= 0,
 	},
+	{
+		.vendor		= PCI_VENDOR_ID_AMD,
+		.device		= PCI_DEVICE_ID_AMD_16H_M30H_NB_F2,
+		.subvendor	= PCI_ANY_ID,
+		.subdevice	= PCI_ANY_ID,
+		.class		= 0,
+		.class_mask	= 0,
+	},
 
 	{0, }
 };
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index 6dc1fcc..d903e0c 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -168,6 +168,8 @@
 #define PCI_DEVICE_ID_AMD_15H_NB_F2	0x1602
 #define PCI_DEVICE_ID_AMD_16H_NB_F1	0x1531
 #define PCI_DEVICE_ID_AMD_16H_NB_F2	0x1532
+#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F1 0x1581
+#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F2 0x1582
 
 /*
  * Function 1 - Address Map
@@ -300,6 +302,7 @@ enum amd_families {
 	F15_CPUS,
 	F15_M30H_CPUS,
 	F16_CPUS,
+	F16_M30H_CPUS,
 	NUM_FAMILIES,
 };
 
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 97fbecd..e91ad27 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -528,6 +528,8 @@
 #define PCI_DEVICE_ID_AMD_15H_NB_F5	0x1605
 #define PCI_DEVICE_ID_AMD_16H_NB_F3	0x1533
 #define PCI_DEVICE_ID_AMD_16H_NB_F4	0x1534
+#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F3 0x1583
+#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F4 0x1584
 #define PCI_DEVICE_ID_AMD_CNB17H_F3	0x1703
 #define PCI_DEVICE_ID_AMD_LANCE		0x2000
 #define PCI_DEVICE_ID_AMD_LANCE_HOME	0x2001
-- 
1.8.1.2



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

* Re: [PATCH] amd64_edac: Add support for newer F16h models
  2014-02-20 16:28 [PATCH] amd64_edac: Add support for newer F16h models Aravind Gopalakrishnan
@ 2014-02-21 14:27 ` Borislav Petkov
  2014-02-21 21:04   ` Aravind Gopalakrishnan
  2014-02-27 16:31 ` Borislav Petkov
  2014-02-27 17:13 ` Borislav Petkov
  2 siblings, 1 reply; 9+ messages in thread
From: Borislav Petkov @ 2014-02-21 14:27 UTC (permalink / raw)
  To: Aravind Gopalakrishnan
  Cc: tglx, mingo, hpa, x86, dougthompson, bhelgaas, JBeulich,
	dan.carpenter, linux-kernel, linux-edac, linux-pci, Arindam.Nath

On Thu, Feb 20, 2014 at 10:28:46AM -0600, Aravind Gopalakrishnan wrote:
> Extending ECC decoding support for F16h M30h.
> 
> Tested on F16h M30h with ECC turned on using mce_amd_inj module and
> the patch works fine.
> 
> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
> Tested-by: Arindam Nath <Arindam.Nath@amd.com>
> ---
>  arch/x86/kernel/amd_nb.c  |  2 ++
>  drivers/edac/amd64_edac.c | 24 ++++++++++++++++++++++++
>  drivers/edac/amd64_edac.h |  3 +++
>  include/linux/pci_ids.h   |  2 ++
>  4 files changed, 31 insertions(+)

...

> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> index 97fbecd..e91ad27 100644
> --- a/include/linux/pci_ids.h
> +++ b/include/linux/pci_ids.h
> @@ -528,6 +528,8 @@
>  #define PCI_DEVICE_ID_AMD_15H_NB_F5	0x1605
>  #define PCI_DEVICE_ID_AMD_16H_NB_F3	0x1533
>  #define PCI_DEVICE_ID_AMD_16H_NB_F4	0x1534
> +#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F3 0x1583
> +#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F4 0x1584

Just put those in arch/x86/include/asm/amd_nb.h as amd64_edac.c includes
it already and you can avoid the pci_ids.h addition. Unless there are
plans to use F{3,4} in other places too...

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH] amd64_edac: Add support for newer F16h models
  2014-02-21 14:27 ` Borislav Petkov
@ 2014-02-21 21:04   ` Aravind Gopalakrishnan
  2014-02-24 14:09     ` Borislav Petkov
  0 siblings, 1 reply; 9+ messages in thread
From: Aravind Gopalakrishnan @ 2014-02-21 21:04 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: tglx, mingo, hpa, x86, dougthompson, bhelgaas, JBeulich,
	dan.carpenter, linux-kernel, linux-edac, linux-pci, Arindam.Nath

On 2/21/2014 8:27 AM, Borislav Petkov wrote:
> On Thu, Feb 20, 2014 at 10:28:46AM -0600, Aravind Gopalakrishnan wrote:
>> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
>> index 97fbecd..e91ad27 100644
>> --- a/include/linux/pci_ids.h
>> +++ b/include/linux/pci_ids.h
>> @@ -528,6 +528,8 @@
>>   #define PCI_DEVICE_ID_AMD_15H_NB_F5	0x1605
>>   #define PCI_DEVICE_ID_AMD_16H_NB_F3	0x1533
>>   #define PCI_DEVICE_ID_AMD_16H_NB_F4	0x1534
>> +#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F3 0x1583
>> +#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F4 0x1584
> Just put those in arch/x86/include/asm/amd_nb.h as amd64_edac.c includes
> it already and you can avoid the pci_ids.h addition. Unless there are
> plans to use F{3,4} in other places too...
>

F{3,4} are used by hwmon/k10temp.c and hwmon/fam15h_power.c and they 
will need definitions to be places here in pci_ids.h
But I'm not sure if the hwmon drivers need to carry support for this 
model yet (will verify that)

If not, I'll remove them and resend.

Thanks,
-Aravind.


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

* Re: [PATCH] amd64_edac: Add support for newer F16h models
  2014-02-21 21:04   ` Aravind Gopalakrishnan
@ 2014-02-24 14:09     ` Borislav Petkov
  2014-02-27 16:22       ` Aravind Gopalakrishnan
  0 siblings, 1 reply; 9+ messages in thread
From: Borislav Petkov @ 2014-02-24 14:09 UTC (permalink / raw)
  To: Aravind Gopalakrishnan
  Cc: tglx, mingo, hpa, x86, dougthompson, bhelgaas, JBeulich,
	dan.carpenter, linux-kernel, linux-edac, linux-pci, Arindam.Nath

On Fri, Feb 21, 2014 at 03:04:47PM -0600, Aravind Gopalakrishnan wrote:
> F{3,4} are used by hwmon/k10temp.c and hwmon/fam15h_power.c and they
> will need definitions to be places here in pci_ids.h But I'm not sure
> if the hwmon drivers need to carry support for this model yet (will
> verify that)
>
> If not, I'll remove them and resend.

Yes, please check that and let me know.

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH] amd64_edac: Add support for newer F16h models
  2014-02-24 14:09     ` Borislav Petkov
@ 2014-02-27 16:22       ` Aravind Gopalakrishnan
  2014-02-27 16:31         ` Borislav Petkov
  0 siblings, 1 reply; 9+ messages in thread
From: Aravind Gopalakrishnan @ 2014-02-27 16:22 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: tglx, mingo, hpa, x86, dougthompson, bhelgaas, JBeulich,
	dan.carpenter, linux-kernel, linux-edac, linux-pci, Arindam.Nath

On 2/24/2014 8:09 AM, Borislav Petkov wrote:
> On Fri, Feb 21, 2014 at 03:04:47PM -0600, Aravind Gopalakrishnan wrote:
>> F{3,4} are used by hwmon/k10temp.c and hwmon/fam15h_power.c and they
>> will need definitions to be places here in pci_ids.h But I'm not sure
>> if the hwmon drivers need to carry support for this model yet (will
>> verify that)
>>
>> If not, I'll remove them and resend.
> Yes, please check that and let me know.
>
>
Ok, here's more info: we will need to add support in k10temp for this 
model; and support is
not required in fam15h_power as register bits used by the driver code 
are unavailable for OS.
But F{3,4} usage is split: k10temp uses F3 device ID and fam15h_power 
uses F4 device ID.

Not sure if you want to split these definitions between amd_nb.h and 
pci_ids.h or just let it be.

Thanks,
-Aravind.





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

* Re: [PATCH] amd64_edac: Add support for newer F16h models
  2014-02-27 16:22       ` Aravind Gopalakrishnan
@ 2014-02-27 16:31         ` Borislav Petkov
  2014-02-27 16:32           ` Aravind Gopalakrishnan
  0 siblings, 1 reply; 9+ messages in thread
From: Borislav Petkov @ 2014-02-27 16:31 UTC (permalink / raw)
  To: Aravind Gopalakrishnan
  Cc: tglx, mingo, hpa, x86, dougthompson, bhelgaas, JBeulich,
	dan.carpenter, linux-kernel, linux-edac, linux-pci, Arindam.Nath

On Thu, Feb 27, 2014 at 10:22:27AM -0600, Aravind Gopalakrishnan wrote:
> Ok, here's more info: we will need to add support in k10temp for this
> model; and support is not required in fam15h_power as register bits
> used by the driver code are unavailable for OS. But F{3,4} usage is
> split: k10temp uses F3 device ID and fam15h_power uses F4 device ID.
>
> Not sure if you want to split these definitions between amd_nb.h and
> pci_ids.h or just let it be.

Yeah, let's let it be. Thanks for getting the info - I'll ack the
original submission.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH] amd64_edac: Add support for newer F16h models
  2014-02-20 16:28 [PATCH] amd64_edac: Add support for newer F16h models Aravind Gopalakrishnan
  2014-02-21 14:27 ` Borislav Petkov
@ 2014-02-27 16:31 ` Borislav Petkov
  2014-02-27 17:13 ` Borislav Petkov
  2 siblings, 0 replies; 9+ messages in thread
From: Borislav Petkov @ 2014-02-27 16:31 UTC (permalink / raw)
  To: Aravind Gopalakrishnan
  Cc: tglx, mingo, hpa, x86, dougthompson, bhelgaas, JBeulich,
	dan.carpenter, linux-kernel, linux-edac, linux-pci, Arindam.Nath

On Thu, Feb 20, 2014 at 10:28:46AM -0600, Aravind Gopalakrishnan wrote:
> Extending ECC decoding support for F16h M30h.
> 
> Tested on F16h M30h with ECC turned on using mce_amd_inj module and
> the patch works fine.
> 
> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
> Tested-by: Arindam Nath <Arindam.Nath@amd.com>

Acked-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH] amd64_edac: Add support for newer F16h models
  2014-02-27 16:31         ` Borislav Petkov
@ 2014-02-27 16:32           ` Aravind Gopalakrishnan
  0 siblings, 0 replies; 9+ messages in thread
From: Aravind Gopalakrishnan @ 2014-02-27 16:32 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: tglx, mingo, hpa, x86, dougthompson, bhelgaas, JBeulich,
	dan.carpenter, linux-kernel, linux-edac, linux-pci, Arindam.Nath

On 2/27/2014 10:31 AM, Borislav Petkov wrote:
> On Thu, Feb 27, 2014 at 10:22:27AM -0600, Aravind Gopalakrishnan wrote:
>> Ok, here's more info: we will need to add support in k10temp for this
>> model; and support is not required in fam15h_power as register bits
>> used by the driver code are unavailable for OS. But F{3,4} usage is
>> split: k10temp uses F3 device ID and fam15h_power uses F4 device ID.
>>
>> Not sure if you want to split these definitions between amd_nb.h and
>> pci_ids.h or just let it be.
> Yeah, let's let it be. Thanks for getting the info - I'll ack the
> original submission.
>

Thanks,
-Aravind.


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

* Re: [PATCH] amd64_edac: Add support for newer F16h models
  2014-02-20 16:28 [PATCH] amd64_edac: Add support for newer F16h models Aravind Gopalakrishnan
  2014-02-21 14:27 ` Borislav Petkov
  2014-02-27 16:31 ` Borislav Petkov
@ 2014-02-27 17:13 ` Borislav Petkov
  2 siblings, 0 replies; 9+ messages in thread
From: Borislav Petkov @ 2014-02-27 17:13 UTC (permalink / raw)
  To: Aravind Gopalakrishnan
  Cc: tglx, mingo, hpa, x86, dougthompson, bhelgaas, JBeulich,
	dan.carpenter, linux-kernel, linux-edac, linux-pci, Arindam.Nath

On Thu, Feb 20, 2014 at 10:28:46AM -0600, Aravind Gopalakrishnan wrote:
> Extending ECC decoding support for F16h M30h.
> 
> Tested on F16h M30h with ECC turned on using mce_amd_inj module and
> the patch works fine.
> 
> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
> Tested-by: Arindam Nath <Arindam.Nath@amd.com>

Added hpa's ack and applied,

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

end of thread, other threads:[~2014-02-27 17:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-20 16:28 [PATCH] amd64_edac: Add support for newer F16h models Aravind Gopalakrishnan
2014-02-21 14:27 ` Borislav Petkov
2014-02-21 21:04   ` Aravind Gopalakrishnan
2014-02-24 14:09     ` Borislav Petkov
2014-02-27 16:22       ` Aravind Gopalakrishnan
2014-02-27 16:31         ` Borislav Petkov
2014-02-27 16:32           ` Aravind Gopalakrishnan
2014-02-27 16:31 ` Borislav Petkov
2014-02-27 17:13 ` Borislav Petkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.