linux/drivers/edac/edac_device.c


/*
 * edac_device.c
 * (C) 2007 www.douglaskthompson.com
 *
 * This file may be distributed under the terms of the
 * GNU General Public License.
 *
 * Written by Doug Thompson <[email protected]>
 *
 * edac_device API implementation
 * 19 Jan 2007
 */

#include <asm/page.h>
#include <linux/uaccess.h>
#include <linux/ctype.h>
#include <linux/highmem.h>
#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/smp.h>
#include <linux/spinlock.h>
#include <linux/sysctl.h>
#include <linux/timer.h>

#include "edac_device.h"
#include "edac_module.h"

/* lock for the list: 'edac_device_list', manipulation of this list
 * is protected by the 'device_ctls_mutex' lock
 */
static DEFINE_MUTEX(device_ctls_mutex);
static LIST_HEAD(edac_device_list);

/* Default workqueue processing interval on this instance, in msecs */
#define DEFAULT_POLL_INTERVAL

#ifdef CONFIG_EDAC_DEBUG
static void edac_device_dump_device(struct edac_device_ctl_info *edac_dev)
{}
#endif				/* CONFIG_EDAC_DEBUG */

/*
 * @off_val: zero, 1, or other based offset
 */
struct edac_device_ctl_info *
edac_device_alloc_ctl_info(unsigned pvt_sz, char *dev_name, unsigned nr_instances,
			   char *blk_name, unsigned nr_blocks, unsigned off_val,
			   int device_index)
{}
EXPORT_SYMBOL_GPL();

void edac_device_free_ctl_info(struct edac_device_ctl_info *ctl_info)
{}
EXPORT_SYMBOL_GPL();

/*
 * find_edac_device_by_dev
 *	scans the edac_device list for a specific 'struct device *'
 *
 *	lock to be held prior to call:	device_ctls_mutex
 *
 *	Return:
 *		pointer to control structure managing 'dev'
 *		NULL if not found on list
 */
static struct edac_device_ctl_info *find_edac_device_by_dev(struct device *dev)
{}

/*
 * add_edac_dev_to_global_list
 *	Before calling this function, caller must
 *	assign a unique value to edac_dev->dev_idx.
 *
 *	lock to be held prior to call:	device_ctls_mutex
 *
 *	Return:
 *		0 on success
 *		1 on failure.
 */
static int add_edac_dev_to_global_list(struct edac_device_ctl_info *edac_dev)
{}

/*
 * del_edac_device_from_global_list
 */
static void del_edac_device_from_global_list(struct edac_device_ctl_info
						*edac_device)
{}

/*
 * edac_device_workq_function
 *	performs the operation scheduled by a workq request
 *
 *	this workq is embedded within an edac_device_ctl_info
 *	structure, that needs to be polled for possible error events.
 *
 *	This operation is to acquire the list mutex lock
 *	(thus preventing insertation or deletion)
 *	and then call the device's poll function IFF this device is
 *	running polled and there is a poll function defined.
 */
static void edac_device_workq_function(struct work_struct *work_req)
{}

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

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

/*
 * edac_device_reset_delay_period
 *
 *	need to stop any outstanding workq queued up at this time
 *	because we will be resetting the sleep time.
 *	Then restart the workq on the new delay
 */
void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev,
				    unsigned long msec)
{}

int edac_device_alloc_index(void)
{}
EXPORT_SYMBOL_GPL();

int edac_device_add_device(struct edac_device_ctl_info *edac_dev)
{}
EXPORT_SYMBOL_GPL();

struct edac_device_ctl_info *edac_device_del_device(struct device *dev)
{}
EXPORT_SYMBOL_GPL();

static inline int edac_device_get_log_ce(struct edac_device_ctl_info *edac_dev)
{}

static inline int edac_device_get_log_ue(struct edac_device_ctl_info *edac_dev)
{}

static inline int edac_device_get_panic_on_ue(struct edac_device_ctl_info
					*edac_dev)
{}

void edac_device_handle_ce_count(struct edac_device_ctl_info *edac_dev,
				 unsigned int count, int inst_nr, int block_nr,
				 const char *msg)
{}
EXPORT_SYMBOL_GPL();

void edac_device_handle_ue_count(struct edac_device_ctl_info *edac_dev,
				 unsigned int count, int inst_nr, int block_nr,
				 const char *msg)
{}
EXPORT_SYMBOL_GPL();