]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] EDAC: disable sysfs interface
authorDave Peterson <dsp@llnl.gov>
Tue, 14 Mar 2006 05:20:50 +0000 (21:20 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 14 Mar 2006 15:57:18 +0000 (07:57 -0800)
- Disable the EDAC sysfs code.  The sysfs interface that EDAC presents to
  user space needs more thought, and is likely to change substantially.
  Therefore disable it for now so users don't start depending on it in its
  current form.

- Disable the default behavior of calling panic() when an uncorrectible
  error is detected (since for now, there is no sysfs interface that allows
  the user to configure this behavior).

Signed-off-by: David S. Peterson <dsp@llnl.gov>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/edac/edac_mc.c

index 262e44544dc874bca9eb962036a88f9c022ab980..9c205274c1cb9939e0b46249352636748c7ae1d0 100644 (file)
 
 #define        EDAC_MC_VERSION "edac_mc  Ver: 2.0.0 " __DATE__
 
+/* For now, disable the EDAC sysfs code.  The sysfs interface that EDAC
+ * presents to user space needs more thought, and is likely to change
+ * substantially.
+ */
+#define DISABLE_EDAC_SYSFS
+
 #ifdef CONFIG_EDAC_DEBUG
 /* Values of 0 to 4 will generate output */
 int edac_debug_level = 1;
@@ -47,7 +53,7 @@ EXPORT_SYMBOL(edac_debug_level);
 /* EDAC Controls, setable by module parameter, and sysfs */
 static int log_ue = 1;
 static int log_ce = 1;
-static int panic_on_ue = 1;
+static int panic_on_ue;
 static int poll_msec = 1000;
 
 static int check_pci_parity = 0;       /* default YES check PCI parity */
@@ -77,6 +83,8 @@ static int pci_whitelist_count ;
 
 /*  START sysfs data and methods */
 
+#ifndef DISABLE_EDAC_SYSFS
+
 static const char *mem_types[] = {
        [MEM_EMPTY] = "Empty",
        [MEM_RESERVED] = "Reserved",
@@ -241,6 +249,7 @@ static struct kobj_type ktype_memctrl = {
        .default_attrs  = (struct attribute **) memctrl_attr,
 };
 
+#endif  /* DISABLE_EDAC_SYSFS */
 
 /* Initialize the main sysfs entries for edac:
  *   /sys/devices/system/edac
@@ -251,6 +260,11 @@ static struct kobj_type ktype_memctrl = {
  *         !0 FAILURE
  */
 static int edac_sysfs_memctrl_setup(void)
+#ifdef DISABLE_EDAC_SYSFS
+{
+       return 0;
+}
+#else
 {
        int err=0;
 
@@ -283,6 +297,7 @@ static int edac_sysfs_memctrl_setup(void)
 
        return err;
 }
+#endif  /* DISABLE_EDAC_SYSFS */
 
 /*
  * MC teardown:
@@ -290,6 +305,7 @@ static int edac_sysfs_memctrl_setup(void)
  */
 static void edac_sysfs_memctrl_teardown(void)
 {
+#ifndef DISABLE_EDAC_SYSFS
        debugf0("MC: " __FILE__ ": %s()\n", __func__);
 
        /* Unregister the MC's kobject */
@@ -300,8 +316,11 @@ static void edac_sysfs_memctrl_teardown(void)
 
        /* Unregister the 'edac' object */
        sysdev_class_unregister(&edac_class);
+#endif  /* DISABLE_EDAC_SYSFS */
 }
 
+#ifndef DISABLE_EDAC_SYSFS
+
 /*
  * /sys/devices/system/edac/pci;
  *     data structures and methods
@@ -554,11 +573,18 @@ static struct kobj_type ktype_edac_pci = {
        .default_attrs  = (struct attribute **) edac_pci_attr,
 };
 
+#endif  /* DISABLE_EDAC_SYSFS */
+
 /**
  * edac_sysfs_pci_setup()
  *
  */
 static int edac_sysfs_pci_setup(void)
+#ifdef DISABLE_EDAC_SYSFS
+{
+       return 0;
+}
+#else
 {
        int err;
 
@@ -582,16 +608,20 @@ static int edac_sysfs_pci_setup(void)
        }
        return err;
 }
-
+#endif  /* DISABLE_EDAC_SYSFS */
 
 static void edac_sysfs_pci_teardown(void)
 {
+#ifndef DISABLE_EDAC_SYSFS
        debugf0("MC: " __FILE__ ": %s()\n", __func__);
 
        kobject_unregister(&edac_pci_kobj);
        kobject_put(&edac_pci_kobj);
+#endif
 }
 
+#ifndef DISABLE_EDAC_SYSFS
+
 /* EDAC sysfs CSROW data structures and methods */
 
 /* Set of more detailed csrow<id> attribute show/store functions */
@@ -1045,6 +1075,8 @@ static struct kobj_type ktype_mci = {
        .default_attrs  = (struct attribute **) mci_attr,
 };
 
+#endif  /* DISABLE_EDAC_SYSFS */
+
 #define EDAC_DEVICE_SYMLINK    "device"
 
 /*
@@ -1056,6 +1088,11 @@ static struct kobj_type ktype_mci = {
  *     !0      Failure
  */
 static int edac_create_sysfs_mci_device(struct mem_ctl_info *mci)
+#ifdef DISABLE_EDAC_SYSFS
+{
+       return 0;
+}
+#else
 {
        int i;
        int err;
@@ -1124,12 +1161,14 @@ fail:
 
        return err;
 }
+#endif  /* DISABLE_EDAC_SYSFS */
 
 /*
  * remove a Memory Controller instance
  */
 static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
 {
+#ifndef DISABLE_EDAC_SYSFS
        int i;
 
        debugf0("MC: " __FILE__ ": %s()\n", __func__);
@@ -1146,6 +1185,7 @@ static void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci)
 
        kobject_unregister(&mci->edac_mci_kobj);
        kobject_put(&mci->edac_mci_kobj);
+#endif  /* DISABLE_EDAC_SYSFS */
 }
 
 /* END OF sysfs data and methods */