Skip to content

Commit

Permalink
Merge tag 'edac_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/bp/bp

Pull EDAC updates from Borislav Petkov:

 - hide EDAC workqueue from users (Borislav Petkov)

 - edac_subsys init/teardown cleanup (Borislav Petkov)

 - make mpc85xx-pci-edac a platform device (Scott Wood)

 - sb_edac KNL gen2 support (Jim Snow)

 - other small cleanups all over the place

* tag 'edac_for_4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  EDAC, i5100: Use to_delayed_work()
  MAINTAINERS: Fix EDAC repo URLs format
  EDAC, sb_edac: Set fixed DIMM width on Xeon Knights Landing
  EDAC: Rework workqueue handling
  EDAC: Make edac_device workqueue setup/teardown functions static
  EDAC: Remove edac_get_sysfs_subsys() error handling
  EDAC: Unexport and make edac_subsys static
  EDAC: Rip out the edac_subsys reference counting
  EDAC: Robustify workqueues destruction
  EDAC, mc_sysfs: Fix freeing bus' name
  EDAC, mpc85xx: Make mpc85xx-pci-edac a platform device
  EDAC, sb_edac: Add Knights Landing (Xeon Phi gen 2) support
  EDAC, sb_edac: Add support for duplicate device IDs
  EDAC, sb_edac: Virtualize several hard-coded functions
  EDAC, mv64x60: Use platform_register/unregister_drivers()
  EDAC, mpc85xx: Use platform_register/unregister_drivers()
  EDAC: Add DDR4 flag
  EDAC: Remove references to bluesmoke.sourceforge.net
  EDAC, pci: Remove old disabled code
  • Loading branch information
torvalds committed Jan 12, 2016
2 parents 2634bf2 + 1cac550 commit d870a9d
Show file tree
Hide file tree
Showing 21 changed files with 1,236 additions and 369 deletions.
10 changes: 7 additions & 3 deletions Documentation/edac.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
EDAC - Error Detection And Correction
=====================================

"bluesmoke" was the name for this device driver when it was "out-of-tree"
and maintained at sourceforge.net. When it was pushed into 2.6.16 for the
first time, it was renamed to 'EDAC'.
"bluesmoke" was the name for this device driver when it
was "out-of-tree" and maintained at sourceforge.net -
bluesmoke.sourceforge.net. That site is mostly archaic now and can be
used only for historical purposes.

When the subsystem was pushed into 2.6.16 for the first time, it was
renamed to 'EDAC'.

PURPOSE
-------
Expand Down
23 changes: 2 additions & 21 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3933,9 +3933,8 @@ M: Doug Thompson <[email protected]>
M: Borislav Petkov <[email protected]>
M: Mauro Carvalho Chehab <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
T: git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git#for-next
T: git://git.kernel.org/pub/linux/kernel/git/mchehab/linux-edac.git#linux_next
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git for-next
T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac.git linux_next
S: Supported
F: Documentation/edac.txt
F: drivers/edac/
Expand All @@ -3945,15 +3944,13 @@ EDAC-AMD64
M: Doug Thompson <[email protected]>
M: Borislav Petkov <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/amd64_edac*

EDAC-CALXEDA
M: Doug Thompson <[email protected]>
M: Robert Richter <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/highbank*

Expand All @@ -3962,114 +3959,98 @@ M: Ralf Baechle <[email protected]>
M: David Daney <[email protected]>
L: [email protected]
L: [email protected]
W: bluesmoke.sourceforge.net
S: Supported
F: drivers/edac/octeon_edac*

EDAC-E752X
M: Mark Gross <[email protected]>
M: Doug Thompson <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/e752x_edac.c

EDAC-E7XXX
M: Doug Thompson <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/e7xxx_edac.c

EDAC-GHES
M: Mauro Carvalho Chehab <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/ghes_edac.c

EDAC-I82443BXGX
M: Tim Small <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/i82443bxgx_edac.c

EDAC-I3000
M: Jason Uhlenkott <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/i3000_edac.c

EDAC-I5000
M: Doug Thompson <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/i5000_edac.c

EDAC-I5400
M: Mauro Carvalho Chehab <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/i5400_edac.c

EDAC-I7300
M: Mauro Carvalho Chehab <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/i7300_edac.c

EDAC-I7CORE
M: Mauro Carvalho Chehab <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/i7core_edac.c

EDAC-I82975X
M: Ranganathan Desikan <[email protected]>
M: "Arvind R." <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/i82975x_edac.c

EDAC-IE31200
M: Jason Baron <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/ie31200_edac.c

EDAC-MPC85XX
M: Johannes Thumshirn <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/mpc85xx_edac.[ch]

EDAC-PASEMI
M: Egor Martovetsky <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/pasemi_edac.c

EDAC-R82600
M: Tim Small <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/r82600_edac.c

EDAC-SBRIDGE
M: Mauro Carvalho Chehab <[email protected]>
L: [email protected]
W: bluesmoke.sourceforge.net
S: Maintained
F: drivers/edac/sb_edac.c

Expand Down
28 changes: 27 additions & 1 deletion arch/powerpc/sysdev/fsl_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/fsl/edac.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/memblock.h>
#include <linux/log2.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/suspend.h>
#include <linux/syscore_ops.h>
Expand Down Expand Up @@ -1255,15 +1257,39 @@ void fsl_pcibios_fixup_phb(struct pci_controller *phb)
#endif
}

static int add_err_dev(struct platform_device *pdev)
{
struct platform_device *errdev;
struct mpc85xx_edac_pci_plat_data pd = {
.of_node = pdev->dev.of_node
};

errdev = platform_device_register_resndata(&pdev->dev,
"mpc85xx-pci-edac",
PLATFORM_DEVID_AUTO,
pdev->resource,
pdev->num_resources,
&pd, sizeof(pd));
if (IS_ERR(errdev))
return PTR_ERR(errdev);

return 0;
}

static int fsl_pci_probe(struct platform_device *pdev)
{
struct device_node *node;
int ret;

node = pdev->dev.of_node;
ret = fsl_add_bridge(pdev, fsl_pci_primary == node);
if (ret)
return ret;

mpc85xx_pci_err_probe(pdev);
ret = add_err_dev(pdev);
if (ret)
dev_err(&pdev->dev, "couldn't register error device: %d\n",
ret);

return 0;
}
Expand Down
9 changes: 0 additions & 9 deletions arch/powerpc/sysdev/fsl_pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,6 @@ void fsl_pci_assign_primary(void);
static inline void fsl_pci_assign_primary(void) {}
#endif

#ifdef CONFIG_EDAC_MPC85XX
int mpc85xx_pci_err_probe(struct platform_device *op);
#else
static inline int mpc85xx_pci_err_probe(struct platform_device *op)
{
return -ENOTSUPP;
}
#endif

#ifdef CONFIG_FSL_PCI
extern int fsl_pci_mcheck_exception(struct pt_regs *);
#else
Expand Down
2 changes: 1 addition & 1 deletion drivers/edac/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ obj-$(CONFIG_EDAC) := edac_stub.o
obj-$(CONFIG_EDAC_MM_EDAC) += edac_core.o

edac_core-y := edac_mc.o edac_device.o edac_mc_sysfs.o
edac_core-y += edac_module.o edac_device_sysfs.o
edac_core-y += edac_module.o edac_device_sysfs.o wq.o

edac_core-$(CONFIG_EDAC_DEBUG) += debugfs.o

Expand Down
41 changes: 16 additions & 25 deletions drivers/edac/edac_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,20 +390,18 @@ static void edac_device_workq_function(struct work_struct *work_req)
* between integral seconds
*/
if (edac_dev->poll_msec == 1000)
queue_delayed_work(edac_workqueue, &edac_dev->work,
round_jiffies_relative(edac_dev->delay));
edac_queue_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay));
else
queue_delayed_work(edac_workqueue, &edac_dev->work,
edac_dev->delay);
edac_queue_work(&edac_dev->work, edac_dev->delay);
}

/*
* edac_device_workq_setup
* initialize a workq item for this edac_device instance
* passing in the new delay period in msec
*/
void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev,
unsigned msec)
static void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev,
unsigned msec)
{
edac_dbg(0, "\n");

Expand All @@ -422,29 +420,23 @@ void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev,
* to fire together on the 1 second exactly
*/
if (edac_dev->poll_msec == 1000)
queue_delayed_work(edac_workqueue, &edac_dev->work,
round_jiffies_relative(edac_dev->delay));
edac_queue_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay));
else
queue_delayed_work(edac_workqueue, &edac_dev->work,
edac_dev->delay);
edac_queue_work(&edac_dev->work, edac_dev->delay);
}

/*
* edac_device_workq_teardown
* stop the workq processing on this edac_dev
*/
void edac_device_workq_teardown(struct edac_device_ctl_info *edac_dev)
static void edac_device_workq_teardown(struct edac_device_ctl_info *edac_dev)
{
int status;

if (!edac_dev->edac_check)
return;

status = cancel_delayed_work(&edac_dev->work);
if (status == 0) {
/* workq instance might be running, wait for it */
flush_workqueue(edac_workqueue);
}
edac_dev->op_state = OP_OFFLINE;

edac_stop_work(&edac_dev->work);
}

/*
Expand All @@ -457,16 +449,15 @@ void edac_device_workq_teardown(struct edac_device_ctl_info *edac_dev)
void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev,
unsigned long value)
{
/* cancel the current workq request, without the mutex lock */
edac_device_workq_teardown(edac_dev);
unsigned long jiffs = msecs_to_jiffies(value);

/* acquire the mutex before doing the workq setup */
mutex_lock(&device_ctls_mutex);
if (value == 1000)
jiffs = round_jiffies_relative(value);

/* restart the workq request, with new delay value */
edac_device_workq_setup(edac_dev, value);
edac_dev->poll_msec = value;
edac_dev->delay = jiffs;

mutex_unlock(&device_ctls_mutex);
edac_mod_work(&edac_dev->work, jiffs);
}

/*
Expand Down
11 changes: 1 addition & 10 deletions drivers/edac/edac_device_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,6 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev)

/* get the /sys/devices/system/edac reference */
edac_subsys = edac_get_sysfs_subsys();
if (edac_subsys == NULL) {
edac_dbg(1, "no edac_subsys error\n");
err = -ENODEV;
goto err_out;
}

/* Point to the 'edac_subsys' this instance 'reports' to */
edac_dev->edac_subsys = edac_subsys;
Expand All @@ -256,7 +251,7 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev)

if (!try_module_get(edac_dev->owner)) {
err = -ENODEV;
goto err_mod_get;
goto err_out;
}

/* register */
Expand All @@ -282,9 +277,6 @@ int edac_device_register_sysfs_main_kobj(struct edac_device_ctl_info *edac_dev)
err_kobj_reg:
module_put(edac_dev->owner);

err_mod_get:
edac_put_sysfs_subsys();

err_out:
return err;
}
Expand All @@ -306,7 +298,6 @@ void edac_device_unregister_sysfs_main_kobj(struct edac_device_ctl_info *dev)
* b) 'kfree' the memory
*/
kobject_put(&dev->kobj);
edac_put_sysfs_subsys();
}

/* edac_dev -> instance information */
Expand Down
Loading

0 comments on commit d870a9d

Please sign in to comment.