Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
edac_device_sysfs.c File Reference
#include <linux/ctype.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/edac.h>
#include "edac_core.h"
#include "edac_module.h"

Go to the source code of this file.

Data Structures

struct  ctl_info_attribute
 
struct  instance_attribute
 

Macros

#define EDAC_DEVICE_SYMLINK   "device"
 
#define to_edacdev(k)   container_of(k, struct edac_device_ctl_info, kobj)
 
#define to_edacdev_attr(a)   container_of(a, struct edacdev_attribute, attr)
 
#define to_ctl_info(k)   container_of(k, struct edac_device_ctl_info, kobj)
 
#define to_ctl_info_attr(a)   container_of(a,struct ctl_info_attribute,attr)
 
#define CTL_INFO_ATTR(_name, _mode, _show, _store)
 
#define to_instance(k)   container_of(k, struct edac_device_instance, kobj)
 
#define to_instance_attr(a)   container_of(a,struct instance_attribute,attr)
 
#define INSTANCE_ATTR(_name, _mode, _show, _store)
 
#define to_block(k)   container_of(k, struct edac_device_block, kobj)
 
#define to_block_attr(a)   container_of(a, struct edac_dev_sysfs_block_attribute, attr)
 
#define BLOCK_ATTR(_name, _mode, _show, _store)
 

Functions

 CTL_INFO_ATTR (log_ue, S_IRUGO|S_IWUSR, edac_device_ctl_log_ue_show, edac_device_ctl_log_ue_store)
 
 CTL_INFO_ATTR (log_ce, S_IRUGO|S_IWUSR, edac_device_ctl_log_ce_show, edac_device_ctl_log_ce_store)
 
 CTL_INFO_ATTR (panic_on_ue, S_IRUGO|S_IWUSR, edac_device_ctl_panic_on_ue_show, edac_device_ctl_panic_on_ue_store)
 
 CTL_INFO_ATTR (poll_msec, S_IRUGO|S_IWUSR, edac_device_ctl_poll_msec_show, edac_device_ctl_poll_msec_store)
 
int edac_device_register_sysfs_main_kobj (struct edac_device_ctl_info *edac_dev)
 
void edac_device_unregister_sysfs_main_kobj (struct edac_device_ctl_info *dev)
 
 INSTANCE_ATTR (ce_count, S_IRUGO, instance_ce_count_show, NULL)
 
 INSTANCE_ATTR (ue_count, S_IRUGO, instance_ue_count_show, NULL)
 
 BLOCK_ATTR (ce_count, S_IRUGO, block_ce_count_show, NULL)
 
 BLOCK_ATTR (ue_count, S_IRUGO, block_ue_count_show, NULL)
 
int edac_device_create_sysfs (struct edac_device_ctl_info *edac_dev)
 
void edac_device_remove_sysfs (struct edac_device_ctl_info *edac_dev)
 

Macro Definition Documentation

#define BLOCK_ATTR (   _name,
  _mode,
  _show,
  _store 
)
Value:
static struct edac_dev_sysfs_block_attribute attr_block_##_name = { \
.attr = {.name = __stringify(_name), .mode = _mode }, \
.show = _show, \
.store = _store, \
};

Definition at line 487 of file edac_device_sysfs.c.

#define CTL_INFO_ATTR (   _name,
  _mode,
  _show,
  _store 
)
Value:
static struct ctl_info_attribute attr_ctl_info_##_name = { \
.attr = {.name = __stringify(_name), .mode = _mode }, \
.show = _show, \
.store = _store, \
};

Definition at line 147 of file edac_device_sysfs.c.

#define EDAC_DEVICE_SYMLINK   "device"

Definition at line 21 of file edac_device_sysfs.c.

#define INSTANCE_ATTR (   _name,
  _mode,
  _show,
  _store 
)
Value:
static struct instance_attribute attr_instance_##_name = { \
.attr = {.name = __stringify(_name), .mode = _mode }, \
.show = _show, \
.store = _store, \
};

Definition at line 384 of file edac_device_sysfs.c.

#define to_block (   k)    container_of(k, struct edac_device_block, kobj)

Definition at line 415 of file edac_device_sysfs.c.

#define to_block_attr (   a)    container_of(a, struct edac_dev_sysfs_block_attribute, attr)

Definition at line 416 of file edac_device_sysfs.c.

#define to_ctl_info (   k)    container_of(k, struct edac_device_ctl_info, kobj)

Definition at line 113 of file edac_device_sysfs.c.

#define to_ctl_info_attr (   a)    container_of(a,struct ctl_info_attribute,attr)

Definition at line 114 of file edac_device_sysfs.c.

#define to_edacdev (   k)    container_of(k, struct edac_device_ctl_info, kobj)

Definition at line 23 of file edac_device_sysfs.c.

#define to_edacdev_attr (   a)    container_of(a, struct edacdev_attribute, attr)

Definition at line 24 of file edac_device_sysfs.c.

#define to_instance (   k)    container_of(k, struct edac_device_instance, kobj)

Definition at line 329 of file edac_device_sysfs.c.

#define to_instance_attr (   a)    container_of(a,struct instance_attribute,attr)

Definition at line 330 of file edac_device_sysfs.c.

Function Documentation

BLOCK_ATTR ( ce_count  ,
S_IRUGO  ,
block_ce_count_show  ,
NULL   
)
BLOCK_ATTR ( ue_count  ,
S_IRUGO  ,
block_ue_count_show  ,
NULL   
)
CTL_INFO_ATTR ( log_ue  ,
S_IRUGO S_IWUSR,
edac_device_ctl_log_ue_show  ,
edac_device_ctl_log_ue_store   
)
CTL_INFO_ATTR ( log_ce  ,
S_IRUGO S_IWUSR,
edac_device_ctl_log_ce_show  ,
edac_device_ctl_log_ce_store   
)
CTL_INFO_ATTR ( panic_on_ue  ,
S_IRUGO S_IWUSR,
edac_device_ctl_panic_on_ue_show  ,
edac_device_ctl_panic_on_ue_store   
)
CTL_INFO_ATTR ( poll_msec  ,
S_IRUGO S_IWUSR,
edac_device_ctl_poll_msec_show  ,
edac_device_ctl_poll_msec_store   
)
int edac_device_create_sysfs ( struct edac_device_ctl_info edac_dev)

Definition at line 810 of file edac_device_sysfs.c.

int edac_device_register_sysfs_main_kobj ( struct edac_device_ctl_info edac_dev)

Definition at line 231 of file edac_device_sysfs.c.

void edac_device_remove_sysfs ( struct edac_device_ctl_info edac_dev)

Definition at line 867 of file edac_device_sysfs.c.

void edac_device_unregister_sysfs_main_kobj ( struct edac_device_ctl_info dev)

Definition at line 296 of file edac_device_sysfs.c.

INSTANCE_ATTR ( ce_count  ,
S_IRUGO  ,
instance_ce_count_show  ,
NULL   
)
INSTANCE_ATTR ( ue_count  ,
S_IRUGO  ,
instance_ue_count_show  ,
NULL   
)