Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
mce_amd.c File Reference
#include <linux/interrupt.h>
#include <linux/notifier.h>
#include <linux/kobject.h>
#include <linux/percpu.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/sysfs.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/cpu.h>
#include <linux/smp.h>
#include <asm/amd_nb.h>
#include <asm/apic.h>
#include <asm/idle.h>
#include <asm/mce.h>
#include <asm/msr.h>

Go to the source code of this file.

Data Structures

struct  thresh_restart
 
struct  threshold_attr
 

Macros

#define NR_BANKS   6
 
#define NR_BLOCKS   9
 
#define THRESHOLD_MAX   0xFFF
 
#define INT_TYPE_APIC   0x00020000
 
#define MASK_VALID_HI   0x80000000
 
#define MASK_CNTP_HI   0x40000000
 
#define MASK_LOCKED_HI   0x20000000
 
#define MASK_LVTOFF_HI   0x00F00000
 
#define MASK_COUNT_EN_HI   0x00080000
 
#define MASK_INT_TYPE_HI   0x00060000
 
#define MASK_OVERFLOW_HI   0x00010000
 
#define MASK_ERR_COUNT_HI   0x00000FFF
 
#define MASK_BLKPTR_LO   0xFF000000
 
#define MCG_XBLK_ADDR   0xC0000400
 
#define SHOW_FIELDS(name)
 
#define RW_ATTR(val)
 
#define to_block(k)   container_of(k, struct threshold_block, kobj)
 
#define to_attr(a)   container_of(a, struct threshold_attr, attr)
 

Functions

void mce_amd_feature_init (struct cpuinfo_x86 *c)
 
 RW_ATTR (interrupt_enable)
 
 RW_ATTR (threshold_limit)
 
 late_initcall (threshold_init_device)
 

Macro Definition Documentation

#define INT_TYPE_APIC   0x00020000

Definition at line 39 of file mce_amd.c.

#define MASK_BLKPTR_LO   0xFF000000

Definition at line 48 of file mce_amd.c.

#define MASK_CNTP_HI   0x40000000

Definition at line 41 of file mce_amd.c.

#define MASK_COUNT_EN_HI   0x00080000

Definition at line 44 of file mce_amd.c.

#define MASK_ERR_COUNT_HI   0x00000FFF

Definition at line 47 of file mce_amd.c.

#define MASK_INT_TYPE_HI   0x00060000

Definition at line 45 of file mce_amd.c.

#define MASK_LOCKED_HI   0x20000000

Definition at line 42 of file mce_amd.c.

#define MASK_LVTOFF_HI   0x00F00000

Definition at line 43 of file mce_amd.c.

#define MASK_OVERFLOW_HI   0x00010000

Definition at line 46 of file mce_amd.c.

#define MASK_VALID_HI   0x80000000

Definition at line 40 of file mce_amd.c.

#define MCG_XBLK_ADDR   0xC0000400

Definition at line 49 of file mce_amd.c.

#define NR_BANKS   6

Definition at line 36 of file mce_amd.c.

#define NR_BLOCKS   9

Definition at line 37 of file mce_amd.c.

#define RW_ATTR (   val)
Value:
static struct threshold_attr val = { \
.attr = {.name = __stringify(val), .mode = 0644 }, \
.show = show_## val, \
.store = store_## val, \
};

Definition at line 408 of file mce_amd.c.

#define SHOW_FIELDS (   name)
Value:
static ssize_t show_ ## name(struct threshold_block *b, char *buf) \
{ \
return sprintf(buf, "%lu\n", (unsigned long) b->name); \
}

Definition at line 339 of file mce_amd.c.

#define THRESHOLD_MAX   0xFFF

Definition at line 38 of file mce_amd.c.

#define to_attr (   a)    container_of(a, struct threshold_attr, attr)

Definition at line 426 of file mce_amd.c.

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

Definition at line 425 of file mce_amd.c.

Function Documentation

late_initcall ( threshold_init_device  )
void mce_amd_feature_init ( struct cpuinfo_x86 c)

Definition at line 209 of file mce_amd.c.

RW_ATTR ( interrupt_enable  )
RW_ATTR ( threshold_limit  )