Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273295
b: refs/heads/master
c: 4140c54
h: refs/heads/master
i:
  273293: 9c3688a
  273291: 7989968
  273287: 16ddc87
  273279: 902cdb2
v: v3
  • Loading branch information
Borislav Petkov authored and Mauro Carvalho Chehab committed Nov 1, 2011
1 parent 4f340ef commit b3e776e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 124 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0cb54524366654e72c87e0a1f87c0b3ff36deb3
refs/heads/master: 4140c54266365e4267a2dbc5765101bba3b42896
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/cpu/mcheck/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/debugfs.h>
#include <linux/edac_mce.h>
#include <linux/irq_work.h>

#include <asm/processor.h>
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/edac/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ config EDAC_MM_EDAC
occurred so that a particular failing memory module can be
replaced. If unsure, select 'Y'.

config EDAC_MCE
bool

config EDAC_AMD64
tristate "AMD64 (Opteron, Athlon64) K8, F10h"
depends on EDAC_MM_EDAC && AMD_NB && X86_64 && EDAC_DECODE_MCE
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/edac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

obj-$(CONFIG_EDAC) := edac_stub.o
obj-$(CONFIG_EDAC_MM_EDAC) += edac_core.o
obj-$(CONFIG_EDAC_MCE) += edac_mce.o

edac_core-y := edac_mc.o edac_device.o edac_mc_sysfs.o edac_pci_sysfs.o
edac_core-y += edac_module.o edac_device_sysfs.o
Expand Down
61 changes: 0 additions & 61 deletions trunk/drivers/edac/edac_mce.c

This file was deleted.

51 changes: 25 additions & 26 deletions trunk/drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#include <linux/delay.h>
#include <linux/edac.h>
#include <linux/mmzone.h>
#include <linux/edac_mce.h>
#include <linux/smp.h>
#include <asm/mce.h>
#include <asm/processor.h>

#include "edac_core.h"
Expand Down Expand Up @@ -265,9 +265,6 @@ struct i7core_pvt {

bool is_registered, enable_scrub;

/* mcelog glue */
struct edac_mce edac_mce;

/* Fifo double buffers */
struct mce mce_entry[MCE_LOG_LEN];
struct mce mce_outentry[MCE_LOG_LEN];
Expand Down Expand Up @@ -1899,33 +1896,43 @@ static void i7core_check_error(struct mem_ctl_info *mci)
* WARNING: As this routine should be called at NMI time, extra care should
* be taken to avoid deadlocks, and to be as fast as possible.
*/
static int i7core_mce_check_error(void *priv, struct mce *mce)
static int i7core_mce_check_error(struct notifier_block *nb, unsigned long val,
void *data)
{
struct mem_ctl_info *mci = priv;
struct i7core_pvt *pvt = mci->pvt_info;
struct mce *mce = (struct mce *)data;
struct i7core_dev *i7_dev;
struct mem_ctl_info *mci;
struct i7core_pvt *pvt;

i7_dev = get_i7core_dev(mce->socketid);
if (!i7_dev)
return NOTIFY_BAD;

mci = i7_dev->mci;
pvt = mci->pvt_info;

/*
* Just let mcelog handle it if the error is
* outside the memory controller
*/
if (((mce->status & 0xffff) >> 7) != 1)
return 0;
return NOTIFY_DONE;

/* Bank 8 registers are the only ones that we know how to handle */
if (mce->bank != 8)
return 0;
return NOTIFY_DONE;

#ifdef CONFIG_SMP
/* Only handle if it is the right mc controller */
if (mce->socketid != pvt->i7core_dev->socket)
return 0;
return NOTIFY_DONE;
#endif

smp_rmb();
if ((pvt->mce_out + 1) % MCE_LOG_LEN == pvt->mce_in) {
smp_wmb();
pvt->mce_overrun++;
return 0;
return NOTIFY_DONE;
}

/* Copy memory error at the ringbuffer */
Expand All @@ -1938,9 +1945,13 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
i7core_check_error(mci);

/* Advise mcelog that the errors were handled */
return 1;
return NOTIFY_STOP;
}

static struct notifier_block i7_mce_dec = {
.notifier_call = i7core_mce_check_error,
};

/*
* set_sdram_scrub_rate This routine sets byte/sec bandwidth scrub rate
* to hardware according to SCRUBINTERVAL formula
Expand Down Expand Up @@ -2093,8 +2104,7 @@ static void i7core_unregister_mci(struct i7core_dev *i7core_dev)
if (pvt->enable_scrub)
disable_sdram_scrub_setting(mci);

/* Disable MCE NMI handler */
edac_mce_unregister(&pvt->edac_mce);
atomic_notifier_chain_unregister(&x86_mce_decoder_chain, &i7_mce_dec);

/* Disable EDAC polling */
i7core_pci_ctl_release(pvt);
Expand Down Expand Up @@ -2193,21 +2203,10 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev)
/* allocating generic PCI control info */
i7core_pci_ctl_create(pvt);

/* Registers on edac_mce in order to receive memory errors */
pvt->edac_mce.priv = mci;
pvt->edac_mce.check_error = i7core_mce_check_error;
rc = edac_mce_register(&pvt->edac_mce);
if (unlikely(rc < 0)) {
debugf0("MC: " __FILE__
": %s(): failed edac_mce_register()\n", __func__);
goto fail1;
}
atomic_notifier_chain_register(&x86_mce_decoder_chain, &i7_mce_dec);

return 0;

fail1:
i7core_pci_ctl_release(pvt);
edac_mc_del_mc(mci->dev);
fail0:
kfree(mci->ctl_name);
edac_mc_free(mci);
Expand Down
31 changes: 0 additions & 31 deletions trunk/include/linux/edac_mce.h

This file was deleted.

0 comments on commit b3e776e

Please sign in to comment.