drivers/edac/edac_module.h

Source file repositories/reference/linux-study-clean/drivers/edac/edac_module.h

File Facts

System
Linux kernel
Corpus path
drivers/edac/edac_module.h
Extension
.h
Size
4599 bytes
Lines
126
Domain
Driver Families
Bucket
drivers/edac
Inferred role
Driver Families: operation-table or driver-model contract
Status
pattern implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

void *data, const struct file_operations *fops);
void edac_debugfs_create_x8(const char *name, umode_t mode,
			    struct dentry *parent, u8 *value);
void edac_debugfs_create_x16(const char *name, umode_t mode,
			     struct dentry *parent, u16 *value);
void edac_debugfs_create_x32(const char *name, umode_t mode,
			     struct dentry *parent, u32 *value);
#else
static inline void edac_debugfs_init(void)					{ }
static inline void edac_debugfs_exit(void)					{ }
static inline void edac_create_debugfs_nodes(struct mem_ctl_info *mci)		{ }
static inline struct dentry *edac_debugfs_create_dir(const char *dirname)	{ return NULL; }
static inline struct dentry *
edac_debugfs_create_dir_at(const char *dirname, struct dentry *parent)		{ return NULL; }
static inline struct dentry *
edac_debugfs_create_file(const char *name, umode_t mode, struct dentry *parent,
			 void *data, const struct file_operations *fops)	{ return NULL; }
static inline void edac_debugfs_create_x8(const char *name, umode_t mode,
					  struct dentry *parent, u8 *value)	{ }
static inline void edac_debugfs_create_x16(const char *name, umode_t mode,
					   struct dentry *parent, u16 *value)	{ }
static inline void edac_debugfs_create_x32(const char *name, umode_t mode,
		       struct dentry *parent, u32 *value)			{ }
#endif

/*
 * EDAC PCI functions
 */
#ifdef	CONFIG_PCI
extern void edac_pci_do_parity_check(void);
extern void edac_pci_clear_parity_errors(void);
extern int edac_sysfs_pci_setup(void);
extern void edac_sysfs_pci_teardown(void);
extern int edac_pci_get_check_errors(void);
extern int edac_pci_get_poll_msec(void);
extern void edac_pci_remove_sysfs(struct edac_pci_ctl_info *pci);
extern void edac_pci_handle_pe(struct edac_pci_ctl_info *pci, const char *msg);
extern void edac_pci_handle_npe(struct edac_pci_ctl_info *pci,
				const char *msg);
#else				/* CONFIG_PCI */
/* pre-process these away */
#define edac_pci_do_parity_check()
#define edac_pci_clear_parity_errors()
#define edac_sysfs_pci_setup()  (0)
#define edac_sysfs_pci_teardown()
#define edac_pci_get_check_errors()
#define edac_pci_get_poll_msec()
#define edac_pci_handle_pe()
#define edac_pci_handle_npe()
#endif				/* CONFIG_PCI */

#endif				/* __EDAC_MODULE_H__ */

Annotation

Implementation Notes