Linux Kernel
3.7.1
|
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/smp.h>
#include <linux/pci.h>
#include <linux/time.h>
#include <linux/nmi.h>
#include <linux/rcupdate.h>
#include <linux/completion.h>
#include <linux/kobject.h>
#include <linux/platform_device.h>
#include <linux/workqueue.h>
#include <linux/edac.h>
Go to the source code of this file.
Data Structures | |
struct | edac_device_counter |
struct | edac_dev_sysfs_attribute |
struct | edac_dev_sysfs_block_attribute |
struct | edac_device_block |
struct | edac_device_instance |
struct | edac_device_ctl_info |
Variables | |
const char * | edac_mem_types [] |
const char * | edac_layer_name [] |
#define BLOCK_OFFSET_VALUE_OFF ((unsigned) -1) |
Definition at line 318 of file edac_core.h.
#define EDAC_ATTRIB_VALUE_LEN 15 |
Definition at line 39 of file edac_core.h.
Definition at line 83 of file edac_core.h.
#define EDAC_DEBUG "DEBUG" |
Definition at line 67 of file edac_core.h.
Definition at line 95 of file edac_core.h.
#define EDAC_DEVICE_NAME_LEN 31 |
Definition at line 38 of file edac_core.h.
#define edac_device_printk | ( | ctl, | |
level, | |||
fmt, | |||
arg... | |||
) | printk(level "EDAC DEVICE%d: " fmt, ctl->dev_idx, ##arg) |
Definition at line 58 of file edac_core.h.
#define EDAC_MC "MC" |
Definition at line 65 of file edac_core.h.
#define edac_mc_chipset_printk | ( | mci, | |
level, | |||
prefix, | |||
fmt, | |||
arg... | |||
) | printk(level "EDAC " prefix " MC%d: " fmt, mci->mc_idx, ##arg) |
Definition at line 55 of file edac_core.h.
#define edac_mc_printk | ( | mci, | |
level, | |||
fmt, | |||
arg... | |||
) | printk(level "EDAC MC%d: " fmt, mci->mc_idx, ##arg) |
Definition at line 52 of file edac_core.h.
#define EDAC_PCI "PCI" |
Definition at line 66 of file edac_core.h.
#define edac_pci_printk | ( | ctl, | |
level, | |||
fmt, | |||
arg... | |||
) | printk(level "EDAC PCI%d: " fmt, ctl->pci_idx, ##arg) |
Definition at line 61 of file edac_core.h.
Definition at line 49 of file edac_core.h.
#define MiB_TO_PAGES | ( | mb | ) | ((mb) << (20 - PAGE_SHIFT)) |
Definition at line 43 of file edac_core.h.
#define PAGES_TO_MiB | ( | pages | ) | ((pages) >> (20 - PAGE_SHIFT)) |
Definition at line 42 of file edac_core.h.
#define to_edac_device_ctl_work | ( | w | ) | container_of(w,struct edac_device_ctl_info,work) |
Definition at line 295 of file edac_core.h.
#define to_edac_mem_ctl_work | ( | w | ) | container_of(w, struct mem_ctl_info, work) |
Definition at line 292 of file edac_core.h.
int edac_device_add_device | ( | struct edac_device_ctl_info * | edac_dev | ) |
edac_device_add_device: Insert the 'edac_dev' structure into the edac_device global list and create sysfs entries associated with edac_device structure. : pointer to the edac_device structure to be added to the list 'edac_device' structure.
Return: 0 Success !0 Failure
Definition at line 494 of file edac_device.c.
|
read |
Definition at line 68 of file edac_device.c.
Definition at line 475 of file edac_device.c.
|
read |
edac_device_del_device: Remove sysfs entries for specified edac_device structure and then remove edac_device structure from global list
: Pointer to 'struct device' representing edac_device structure to remove.
Return: Pointer to removed edac_device structure, OR NULL if device not found.
Definition at line 566 of file edac_device.c.
void edac_device_free_ctl_info | ( | struct edac_device_ctl_info * | ctl_info | ) |
Definition at line 252 of file edac_device.c.
void edac_device_handle_ce | ( | struct edac_device_ctl_info * | edac_dev, |
int | inst_nr, | ||
int | block_nr, | ||
const char * | msg | ||
) |
Definition at line 624 of file edac_device.c.
void edac_device_handle_ue | ( | struct edac_device_ctl_info * | edac_dev, |
int | inst_nr, | ||
int | block_nr, | ||
const char * | msg | ||
) |
Definition at line 670 of file edac_device.c.
int edac_mc_add_mc | ( | struct mem_ctl_info * | mci | ) |
|
read |
edac_mc_alloc: Allocate and partially fill a struct mem_ctl_info structure : Memory controller number : Number of MC hierarchy layers layers: Describes each layer as seen by the Memory Controller : size of private storage needed
Everything is kmalloc'ed as one big chunk - more efficient. Only can be used if all structures have the same lifetime - otherwise you have to allocate and initialize your own structures.
Use edac_mc_free() to free mc structures allocated by this function.
NOTE: drivers handle multi-rank memories in different ways: in some drivers, one multi-rank memory stick is mapped as one entry, while, in others, a single multi-rank memory stick would be mapped into several entries. Currently, this function will allocate multiple struct dimm_info on such scenarios, as grouping the multiple ranks require drivers change.
Returns: On failure: NULL On success: struct mem_ctl_info pointer
|
read |
|
read |
edac_mc_find: Search for a mem_ctl_info structure whose index is 'idx'.
If found, return a pointer to the structure. Else return NULL.
Caller must hold mem_ctls_mutex.
int edac_mc_find_csrow_by_page | ( | struct mem_ctl_info * | mci, |
unsigned long | page | ||
) |
void edac_mc_free | ( | struct mem_ctl_info * | mci | ) |
edac_mc_free 'Free' a previously allocated 'mci' structure : pointer to a struct mem_ctl_info structure
void edac_mc_handle_error | ( | const enum hw_event_mc_err_type | type, |
struct mem_ctl_info * | mci, | ||
const u16 | error_count, | ||
const unsigned long | page_frame_number, | ||
const unsigned long | offset_in_page, | ||
const unsigned long | syndrome, | ||
const int | top_layer, | ||
const int | mid_layer, | ||
const int | low_layer, | ||
const char * | msg, | ||
const char * | other_detail | ||
) |
edac_mc_handle_error - reports a memory event to userspace
: severity of the error (CE/UE/Fatal) : a struct mem_ctl_info pointer : Number of errors of the same type : mem page where the error occurred : offset of the error inside the page : ECC syndrome : Memory layer[0] position : Memory layer[1] position : Memory layer[2] position : Message meaningful to the end users that explains the event : Technical details about the event that may help hardware manufacturers and EDAC developers to analyse the event
Definition at line 32 of file edac_module.c.
Definition at line 334 of file edac_pci.c.
|
read |
Definition at line 41 of file edac_pci.c.
Definition at line 316 of file edac_pci.c.
|
read |
Definition at line 456 of file edac_pci.c.
Definition at line 392 of file edac_pci.c.
Definition at line 81 of file edac_pci.c.
Definition at line 492 of file edac_pci.c.
Definition at line 293 of file edac_pci.c.
|
read |