Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
mce.c File Reference
#include <linux/thread_info.h>
#include <linux/capability.h>
#include <linux/miscdevice.h>
#include <linux/ratelimit.h>
#include <linux/kallsyms.h>
#include <linux/rcupdate.h>
#include <linux/kobject.h>
#include <linux/uaccess.h>
#include <linux/kdebug.h>
#include <linux/kernel.h>
#include <linux/percpu.h>
#include <linux/string.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/delay.h>
#include <linux/ctype.h>
#include <linux/sched.h>
#include <linux/sysfs.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/kmod.h>
#include <linux/poll.h>
#include <linux/nmi.h>
#include <linux/cpu.h>
#include <linux/smp.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/debugfs.h>
#include <linux/irq_work.h>
#include <linux/export.h>
#include <asm/processor.h>
#include <asm/mce.h>
#include <asm/msr.h>
#include "mce-internal.h"
#include <trace/events/mce.h>

Go to the source code of this file.

Data Structures

struct  mce_ring
 
struct  mce_info
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define rcu_dereference_check_mce(p)
 
#define CREATE_TRACE_POINTS
 
#define SPINUNIT   100 /* 100ns */
 
#define PANIC_TIMEOUT   5 /* 5 seconds */
 
#define MCE_RING_SIZE   16 /* we use one entry less */
 
#define MCE_INFO_MAX   16
 

Functions

 DEFINE_PER_CPU (unsigned, mce_exception_count)
 
 DEFINE_PER_CPU (mce_banks_t, mce_poll_banks)
 
 ATOMIC_NOTIFIER_HEAD (x86_mce_decoder_chain)
 
void mce_setup (struct mce *m)
 
 DEFINE_PER_CPU (struct mce, injectm)
 
 EXPORT_PER_CPU_SYMBOL_GPL (injectm)
 
void mce_log (struct mce *mce)
 
void mce_register_decode_chain (struct notifier_block *nb)
 
 EXPORT_SYMBOL_GPL (mce_register_decode_chain)
 
void mce_unregister_decode_chain (struct notifier_block *nb)
 
 EXPORT_SYMBOL_GPL (mce_unregister_decode_chain)
 
int mce_available (struct cpuinfo_x86 *c)
 
 DEFINE_PER_CPU (struct irq_work, mce_irq_work)
 
 DEFINE_PER_CPU (unsigned, mce_poll_count)
 
void machine_check_poll (enum mcp_flags flags, mce_banks_t *b)
 
 EXPORT_SYMBOL_GPL (machine_check_poll)
 
void do_machine_check (struct pt_regs *regs, long error_code)
 
 EXPORT_SYMBOL_GPL (do_machine_check)
 
int memory_failure (unsigned long pfn, int vector, int flags)
 
void mce_notify_process (void)
 
void mce_timer_kick (unsigned long interval)
 
int mce_notify_irq (void)
 
 EXPORT_SYMBOL_GPL (mce_notify_irq)
 
void __cpuinit mcheck_cpu_init (struct cpuinfo_x86 *c)
 
void register_mce_write_callback (ssize_t(*fn)(struct file *filp, const char __user *ubuf, size_t usize, loff_t *off))
 
 EXPORT_SYMBOL_GPL (register_mce_write_callback)
 
ssize_t mce_chrdev_write (struct file *filp, const char __user *ubuf, size_t usize, loff_t *off)
 
 __setup ("mce", mcheck_enable)
 
int __init mcheck_init (void)
 
 DEFINE_PER_CPU (struct device *, mce_device)
 
 device_initcall_sync (mcheck_init_device)
 
 __setup ("nomce", mcheck_disable)
 

Variables

int mce_disabled __read_mostly = 1
 
atomic_t mce_entry
 
struct mce_info mce_info [MCE_INFO_MAX]
 
void(* machine_check_vector )(struct pt_regs *, long error_code)
 
__cpuinitdata void(* threshold_cpu_callback )(unsigned long action, unsigned int cpu)
 

Macro Definition Documentation

#define CREATE_TRACE_POINTS

Definition at line 58 of file mce.c.

#define MCE_INFO_MAX   16

Definition at line 960 of file mce.c.

#define MCE_RING_SIZE   16 /* we use one entry less */

Definition at line 464 of file mce.c.

#define PANIC_TIMEOUT   5 /* 5 seconds */

Definition at line 288 of file mce.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 11 of file mce.c.

#define rcu_dereference_check_mce (   p)
Value:
rcu_read_lock_sched_held() || \
lockdep_is_held(&mce_chrdev_read_mutex))

Definition at line 53 of file mce.c.

#define SPINUNIT   100 /* 100ns */

Definition at line 63 of file mce.c.

Function Documentation

__setup ( "mce"  ,
mcheck_enable   
)
__setup ( "nomce"  ,
mcheck_disable   
)
ATOMIC_NOTIFIER_HEAD ( x86_mce_decoder_chain  )
DEFINE_PER_CPU ( unsigned  ,
mce_exception_count   
)
DEFINE_PER_CPU ( mce_banks_t  ,
mce_poll_banks   
)
DEFINE_PER_CPU ( struct mce  ,
injectm   
)
DEFINE_PER_CPU ( struct irq_work  ,
mce_irq_work   
)
DEFINE_PER_CPU ( unsigned  ,
mce_poll_count   
)
DEFINE_PER_CPU ( struct device ,
mce_device   
)
device_initcall_sync ( mcheck_init_device  )
void do_machine_check ( struct pt_regs regs,
long  error_code 
)

Definition at line 1012 of file mce.c.

EXPORT_PER_CPU_SYMBOL_GPL ( injectm  )
EXPORT_SYMBOL_GPL ( mce_register_decode_chain  )
EXPORT_SYMBOL_GPL ( mce_unregister_decode_chain  )
EXPORT_SYMBOL_GPL ( machine_check_poll  )
EXPORT_SYMBOL_GPL ( do_machine_check  )
EXPORT_SYMBOL_GPL ( mce_notify_irq  )
EXPORT_SYMBOL_GPL ( register_mce_write_callback  )
void machine_check_poll ( enum mcp_flags  flags,
mce_banks_t *  b 
)

Definition at line 593 of file mce.c.

int mce_available ( struct cpuinfo_x86 c)

Definition at line 514 of file mce.c.

ssize_t mce_chrdev_write ( struct file filp,
const char __user ubuf,
size_t  usize,
loff_t *  off 
)

Definition at line 1915 of file mce.c.

void mce_log ( struct mce mce)

Definition at line 145 of file mce.c.

int mce_notify_irq ( void  )

Definition at line 1351 of file mce.c.

void mce_notify_process ( void  )

Definition at line 1194 of file mce.c.

void mce_register_decode_chain ( struct notifier_block nb)

Definition at line 232 of file mce.c.

void mce_setup ( struct mce m)

Definition at line 116 of file mce.c.

void mce_timer_kick ( unsigned long  interval)

Definition at line 1313 of file mce.c.

void mce_unregister_decode_chain ( struct notifier_block nb)

Definition at line 239 of file mce.c.

void __cpuinit mcheck_cpu_init ( struct cpuinfo_x86 c)

Definition at line 1669 of file mce.c.

int __init mcheck_init ( void  )

Definition at line 1986 of file mce.c.

int memory_failure ( unsigned long  pfn,
int  vector,
int  flags 
)

Definition at line 1174 of file mce.c.

void register_mce_write_callback ( ssize_t(*)(struct file *filp, const char __user *ubuf, size_t usize, loff_t *off)  fn)

Definition at line 1907 of file mce.c.

Variable Documentation

struct mce_bank* mce_banks __read_mostly = 1

Definition at line 61 of file mce.c.

void(* machine_check_vector)(struct pt_regs *, long error_code)
Initial value:
=
unexpected_machine_check

Definition at line 1662 of file mce.c.

atomic_t mce_entry

Definition at line 65 of file mce.c.

__cpuinitdata void(* threshold_cpu_callback)(unsigned long action, unsigned int cpu)

Definition at line 2086 of file mce.c.