mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <borislav.petkov@amd.com>
To: <linux-kernel@vger.kernel.org>
Cc: <x86@kernel.org>, <norsk5@yahoo.com>
Subject: [PATCH 18/21] amd64_edac: remove early hw support check
Date: Mon, 16 Nov 2009 15:16:45 +0100	[thread overview]
Message-ID: <1258381008-18783-19-git-send-email-borislav.petkov@amd.com> (raw)
In-Reply-To: <1258381008-18783-1-git-send-email-borislav.petkov@amd.com>

The .probe_valid_hardware low_ops member checked whether the DCTs are in
DDR3 mode and bailed out if so. Now that all the needed changes for DDR3
support is in place, remove it.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
 drivers/edac/amd64_edac.c |   47 +--------------------------------------------
 drivers/edac/amd64_edac.h |    1 -
 2 files changed, 1 insertions(+), 47 deletions(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index d9cde71..351334e 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1739,42 +1739,6 @@ static void amd64_debug_display_dimm_sizes(int ctrl, struct amd64_pvt *pvt)
 }
 
 /*
- * Very early hardware probe on pci_probe thread to determine if this module
- * supports the hardware.
- *
- * Return:
- *      0 for OK
- *      1 for error
- */
-static int f10_probe_valid_hardware(struct amd64_pvt *pvt)
-{
-	int ret = 0;
-
-	/*
-	 * If we are on a DDR3 machine, we don't know yet if
-	 * we support that properly at this time
-	 */
-	if ((pvt->dchr0 & DDR3_MODE) ||
-	    (pvt->dchr1 & DDR3_MODE)) {
-
-		amd64_printk(KERN_WARNING,
-			"%s() This machine is running with DDR3 memory. "
-			"This is not currently supported. "
-			"DCHR0=0x%x DCHR1=0x%x\n",
-			__func__, pvt->dchr0, pvt->dchr1);
-
-		amd64_printk(KERN_WARNING,
-			"   Contact '%s' module MAINTAINER to help add"
-			" support.\n",
-			EDAC_MOD_STR);
-
-		ret = 1;
-
-	}
-	return ret;
-}
-
-/*
  * There currently are 3 types type of MC devices for AMD Athlon/Opterons
  * (as per PCI DEVICE_IDs):
  *
@@ -1803,7 +1767,6 @@ static struct amd64_family_type amd64_family_types[] = {
 		.addr_f1_ctl = PCI_DEVICE_ID_AMD_10H_NB_MAP,
 		.misc_f3_ctl = PCI_DEVICE_ID_AMD_10H_NB_MISC,
 		.ops = {
-			.probe_valid_hardware	= f10_probe_valid_hardware,
 			.early_channel_count	= f10_early_channel_count,
 			.get_error_address	= f10_get_error_address,
 			.read_dram_base_limit	= f10_read_dram_base_limit,
@@ -1817,7 +1780,6 @@ static struct amd64_family_type amd64_family_types[] = {
 		.addr_f1_ctl = PCI_DEVICE_ID_AMD_11H_NB_MAP,
 		.misc_f3_ctl = PCI_DEVICE_ID_AMD_11H_NB_MISC,
 		.ops = {
-			.probe_valid_hardware	= f10_probe_valid_hardware,
 			.early_channel_count	= f10_early_channel_count,
 			.get_error_address	= f10_get_error_address,
 			.read_dram_base_limit	= f10_read_dram_base_limit,
@@ -2851,17 +2813,10 @@ static int amd64_init_2nd_stage(struct amd64_pvt *pvt)
 {
 	int node_id = pvt->mc_node_id;
 	struct mem_ctl_info *mci;
-	int ret, err = 0;
+	int ret;
 
 	amd64_read_mc_registers(pvt);
 
-	ret = -ENODEV;
-	if (pvt->ops->probe_valid_hardware) {
-		err = pvt->ops->probe_valid_hardware(pvt);
-		if (err)
-			goto err_exit;
-	}
-
 	/*
 	 * We need to determine how many memory channels there are. Then use
 	 * that information for calculating the size of the dynamic instance
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index f8c187e..e84f164 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -526,7 +526,6 @@ extern struct mcidev_sysfs_attribute amd64_dbg_attrs[NUM_DBG_ATTRS],
  * functions and per device encoding/decoding logic.
  */
 struct low_ops {
-	int (*probe_valid_hardware)	(struct amd64_pvt *pvt);
 	int (*early_channel_count)	(struct amd64_pvt *pvt);
 
 	u64 (*get_error_address)	(struct mem_ctl_info *mci,
-- 
1.6.4.3



  parent reply	other threads:[~2009-11-16 14:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16 14:16 [PATCH 00/21] amd64_edac queue for .33 Borislav Petkov
2009-11-16 14:16 ` [PATCH 01/21] amd64_edac: clarify DRAM CTL debug reporting Borislav Petkov
2009-11-16 14:16 ` [PATCH 02/21] amd64_edac: make DRAM regions output more human-readable Borislav Petkov
2009-11-16 14:16 ` [PATCH 03/21] x86, msr: Unify rdmsr_on_cpus/wrmsr_on_cpus Borislav Petkov
2009-11-16 14:16 ` [PATCH 04/21] cpumask: use modern cpumask style in drivers/edac/amd64_edac.c Borislav Petkov
2009-11-16 14:16 ` [PATCH 05/21] amd64_edac: unify MCGCTL ECC switching Borislav Petkov
2009-11-16 14:16 ` [PATCH 06/21] amd64_edac: wrap-up pci config read error handling Borislav Petkov
2009-11-16 14:16 ` [PATCH 07/21] amd64_edac: cleanup DRAM cfg low debug output Borislav Petkov
2009-11-16 14:16 ` [PATCH 08/21] amd64_edac: cleanup rest of amd64_dump_misc_regs Borislav Petkov
2009-11-16 14:16 ` [PATCH 09/21] amd64_edac: dump DIMM sizes on K8 too Borislav Petkov
2009-11-16 14:16 ` [PATCH 10/21] amd64_edac: cleanup f10_early_channel_count Borislav Petkov
2009-11-16 14:16 ` [PATCH 11/21] amd64_edac: enhance address to DRAM bank mapping Borislav Petkov
2009-11-16 14:16 ` [PATCH 12/21] amd64_edac: remove superfluous dbg printk Borislav Petkov
2009-11-16 14:16 ` [PATCH 13/21] amd64_edac: rename StinkyIdentifier Borislav Petkov
2009-11-16 14:16 ` [PATCH 14/21] amd64_edac: remove unneeded extract_error_address wrapper Borislav Petkov
2009-11-16 14:16 ` [PATCH 15/21] edac, mce: update AMD F10h revD check Borislav Petkov
2009-11-16 14:16 ` [PATCH 16/21] edac: add memory types strings for debugging Borislav Petkov
2009-11-16 14:16 ` [PATCH 17/21] amd64_edac: detect DDR3 memory type Borislav Petkov
2009-11-16 14:16 ` Borislav Petkov [this message]
2009-11-16 14:16 ` [PATCH 19/21] amd64_edac: add a leaner syndrome decoding algorithm Borislav Petkov
2009-11-16 14:16 ` [PATCH 20/21] amd64_edac: correct sys address to chip select mapping Borislav Petkov
2009-11-16 14:16 ` [PATCH 21/21] amd64_edac: bump driver version Borislav Petkov

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=1258381008-18783-19-git-send-email-borislav.petkov@amd.com \
    --to=borislav.petkov@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=norsk5@yahoo.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®