]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/edac/edac_core.h
x86: don't use MP_processor_info for ACPI mode
[linux-2.6-omap-h63xx.git] / drivers / edac / edac_core.h
index 63691cf3a1d69d87b7b2474d108cc2aaa701cdd8..a9aa845dbe74c864d9b5126d272051b5e18223f6 100644 (file)
@@ -75,7 +75,7 @@ extern int edac_debug_level;
 #define edac_debug_printk(level, fmt, arg...)                            \
        do {                                                             \
                if (level <= edac_debug_level)                           \
-                       edac_printk(KERN_EMERG, EDAC_DEBUG, fmt, ##arg); \
+                       edac_printk(KERN_DEBUG, EDAC_DEBUG, fmt, ##arg); \
        } while(0)
 
 #define debugf0( ... ) edac_debug_printk(0, __VA_ARGS__ )
@@ -94,8 +94,6 @@ extern int edac_debug_level;
 
 #endif                         /* !CONFIG_EDAC_DEBUG */
 
-#define BIT(x) (1 << (x))
-
 #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \
        PCI_DEVICE_ID_ ## vend ## _ ## dev
 
@@ -138,6 +136,7 @@ enum mem_type {
        MEM_DDR2,               /* DDR2 RAM */
        MEM_FB_DDR2,            /* fully buffered DDR2 */
        MEM_RDDR2,              /* Registered DDR2 RAM */
+       MEM_XDR,                /* Rambus XDR */
 };
 
 #define MEM_FLAG_EMPTY         BIT(MEM_EMPTY)
@@ -154,6 +153,7 @@ enum mem_type {
 #define MEM_FLAG_DDR2           BIT(MEM_DDR2)
 #define MEM_FLAG_FB_DDR2        BIT(MEM_FB_DDR2)
 #define MEM_FLAG_RDDR2          BIT(MEM_RDDR2)
+#define MEM_FLAG_XDR            BIT(MEM_XDR)
 
 /* chipset Error Detection and Correction capabilities and mode */
 enum edac_type {
@@ -317,9 +317,8 @@ struct csrow_info {
        struct mem_ctl_info *mci;       /* the parent */
 
        struct kobject kobj;    /* sysfs kobject for this csrow */
-       struct completion kobj_complete;
 
-       /* FIXME the number of CHANNELs might need to become dynamic */
+       /* channel information for this csrow */
        u32 nr_channels;
        struct channel_info *channels;
 };
@@ -338,6 +337,9 @@ struct mcidev_sysfs_attribute {
  */
 struct mem_ctl_info {
        struct list_head link;  /* for global list of mem_ctl_info structs */
+
+       struct module *owner;   /* Module owner of this control struct */
+
        unsigned long mtype_cap;        /* memory types supported by mc */
        unsigned long edac_ctl_cap;     /* Mem controller EDAC capabilities */
        unsigned long edac_cap; /* configuration capabilities - this is
@@ -403,7 +405,6 @@ struct mem_ctl_info {
 
        /* edac sysfs device control */
        struct kobject edac_mci_kobj;
-       struct completion kobj_complete;
 
        /* Additional top controller level attributes, but specified
         * by the low level driver.
@@ -484,7 +485,16 @@ struct edac_dev_sysfs_attribute {
 };
 
 /* edac_dev_sysfs_block_attribute structure
+ *
  *     used in leaf 'block' nodes for adding controls/attributes
+ *
+ *     each block in each instance of the containing control structure
+ *     can have an array of the following. The show and store functions
+ *     will be filled in with the show/store function in the
+ *     low level driver.
+ *
+ *     The 'value' field will be the actual value field used for
+ *     counting
  */
 struct edac_dev_sysfs_block_attribute {
        struct attribute attr;
@@ -493,8 +503,6 @@ struct edac_dev_sysfs_block_attribute {
                        const char *, size_t);
        struct edac_device_block *block;
 
-       /* low driver use */
-       void *arg;
        unsigned int value;
 };
 
@@ -512,7 +520,6 @@ struct edac_device_block {
 
        /* edac sysfs device control */
        struct kobject kobj;
-       struct completion kobj_complete;
 };
 
 /* device instance control structure */
@@ -527,7 +534,6 @@ struct edac_device_instance {
 
        /* edac sysfs device control */
        struct kobject kobj;
-       struct completion kobj_complete;
 };
 
 
@@ -539,6 +545,8 @@ struct edac_device_ctl_info {
        /* for global list of edac_device_ctl_info structs */
        struct list_head link;
 
+       struct module *owner;   /* Module owner of this control struct */
+
        int dev_idx;
 
        /* Per instance controls for this edac_device */
@@ -589,7 +597,7 @@ struct edac_device_ctl_info {
         * NMI handlers may be traversing list
         */
        struct rcu_head rcu;
-       struct completion complete;
+       struct completion removal_complete;
 
        /* sysfs top name under 'edac' directory
         * and instance name:
@@ -613,7 +621,6 @@ struct edac_device_ctl_info {
         * device this structure controls
         */
        struct kobject kobj;
-       struct completion kobj_complete;
 };
 
 /* To get from the instance's wq to the beginning of the ctl structure */
@@ -634,7 +641,8 @@ extern struct edac_device_ctl_info *edac_device_alloc_ctl_info(
                char *edac_block_name, unsigned nr_blocks,
                unsigned offset_value,
                struct edac_dev_sysfs_block_attribute *block_attributes,
-               unsigned nr_attribs);
+               unsigned nr_attribs,
+               int device_index);
 
 /* The offset value can be:
  *     -1 indicating no offset value
@@ -806,8 +814,7 @@ extern void edac_mc_handle_fbd_ce(struct mem_ctl_info *mci, unsigned int csrow,
 /*
  * edac_device APIs
  */
-extern int edac_device_add_device(struct edac_device_ctl_info *edac_dev,
-                               int dev_idx);
+extern int edac_device_add_device(struct edac_device_ctl_info *edac_dev);
 extern struct edac_device_ctl_info *edac_device_del_device(struct device *dev);
 extern void edac_device_handle_ue(struct edac_device_ctl_info *edac_dev,
                                int inst_nr, int block_nr, const char *msg);