Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
mca.c File Reference
#include <linux/jiffies.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/bootmem.h>
#include <linux/acpi.h>
#include <linux/timer.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/smp.h>
#include <linux/workqueue.h>
#include <linux/cpumask.h>
#include <linux/kdebug.h>
#include <linux/cpu.h>
#include <linux/gfp.h>
#include <asm/delay.h>
#include <asm/machvec.h>
#include <asm/meminit.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include <asm/sal.h>
#include <asm/mca.h>
#include <asm/kexec.h>
#include <asm/irq.h>
#include <asm/hw_irq.h>
#include <asm/tlb.h>
#include "mca_drv.h"
#include "entry.h"

Go to the source code of this file.

Data Structures

struct  ia64_state_log_s
 

Macros

#define IA64_MCA_DEBUG(fmt...)
 
#define NOTIFY_INIT(event, regs, arg, spin)
 
#define NOTIFY_MCA(event, regs, arg, spin)
 
#define MAX_CPE_POLL_INTERVAL   (15*60*HZ) /* 15 minutes */
 
#define MIN_CPE_POLL_INTERVAL   (2*60*HZ) /* 2 minutes */
 
#define CMC_POLL_INTERVAL   (1*60*HZ) /* 1 minute */
 
#define CPE_HISTORY_LENGTH   5
 
#define CMC_HISTORY_LENGTH   5
 
#define mprintk(fmt...)   ia64_mca_printk(fmt)
 
#define MLOGBUF_SIZE   (512+256*NR_CPUS)
 
#define MLOGBUF_MSGMAX   256
 
#define BREAK_LOGLEVEL(__console_loglevel)
 
#define RESTORE_LOGLEVEL(__console_loglevel)
 
#define IA64_MAX_LOGS   2 /* Double-buffering for nested MCAs */
 
#define IA64_MAX_LOG_TYPES   4 /* MCA, INIT, CMC, CPE */
 
#define IA64_LOG_ALLOCATE(it, size)
 
#define IA64_LOG_LOCK_INIT(it)   spin_lock_init(&ia64_state_log[it].isl_lock)
 
#define IA64_LOG_LOCK(it)   spin_lock_irqsave(&ia64_state_log[it].isl_lock, s)
 
#define IA64_LOG_UNLOCK(it)   spin_unlock_irqrestore(&ia64_state_log[it].isl_lock,s)
 
#define IA64_LOG_NEXT_INDEX(it)   ia64_state_log[it].isl_index
 
#define IA64_LOG_CURR_INDEX(it)   1 - ia64_state_log[it].isl_index
 
#define IA64_LOG_INDEX_INC(it)
 
#define IA64_LOG_INDEX_DEC(it)   ia64_state_log[it].isl_index = 1 - ia64_state_log[it].isl_index
 
#define IA64_LOG_NEXT_BUFFER(it)   (void *)((ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)]))
 
#define IA64_LOG_CURR_BUFFER(it)   (void *)((ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)]))
 
#define IA64_LOG_COUNT(it)   ia64_state_log[it].isl_count
 

Typedefs

typedef struct ia64_state_log_s ia64_state_log_t
 

Functions

 DEFINE_PER_CPU (u64, ia64_mca_data)
 
 DEFINE_PER_CPU (u64, ia64_mca_per_cpu_pte)
 
 DEFINE_PER_CPU (u64, ia64_mca_pal_pte)
 
 DEFINE_PER_CPU (u64, ia64_mca_pal_base)
 
 DEFINE_PER_CPU (u64, ia64_mca_tr_reload)
 
void ia64_os_init_dispatch_monarch (void)
 
void ia64_os_init_dispatch_slave (void)
 
void salinfo_log_wakeup (int type, u8 *buffer, u64 size, int irqsafe)
 
void ia64_mca_printk (const char *fmt,...)
 
 EXPORT_SYMBOL (ia64_mca_printk)
 
void ia64_mlogbuf_dump (void)
 
 EXPORT_SYMBOL (ia64_mlogbuf_dump)
 
int search_mca_table (const struct mca_table_entry *first, const struct mca_table_entry *last, unsigned long ip)
 
int mca_recover_range (unsigned long addr)
 
 EXPORT_SYMBOL_GPL (mca_recover_range)
 
void __cpuinit ia64_mca_cmc_vector_setup (void)
 
int ia64_reg_MCA_extension (int(*fn)(void *, struct ia64_sal_os_state *))
 
void ia64_unreg_MCA_extension (void)
 
 EXPORT_SYMBOL (ia64_reg_MCA_extension)
 
 EXPORT_SYMBOL (ia64_unreg_MCA_extension)
 
void ia64_mca_handler (struct pt_regs *regs, struct switch_stack *sw, struct ia64_sal_os_state *sos)
 
void ia64_init_handler (struct pt_regs *regs, struct switch_stack *sw, struct ia64_sal_os_state *sos)
 
 __setup ("disable_cpe_poll", ia64_mca_disable_cpe_polling)
 
void __cpuinit ia64_mca_cpu_init (void *cpu_data)
 
void __init ia64_mca_init (void)
 
 device_initcall (ia64_mca_late_init)
 

Variables

unsigned long __per_cpu_mca [NR_CPUS]
 
int(* ia64_mca_ucmc_extension )(void *, struct ia64_sal_os_state *) = NULL
 

Macro Definition Documentation

#define BREAK_LOGLEVEL (   __console_loglevel)
Value:
if (loglevel_save < 0) \
loglevel_save = __console_loglevel; \
__console_loglevel = 15;

Definition at line 189 of file mca.c.

#define CMC_HISTORY_LENGTH   5

Definition at line 147 of file mca.c.

#define CMC_POLL_INTERVAL   (1*60*HZ) /* 1 minute */

Definition at line 145 of file mca.c.

#define CPE_HISTORY_LENGTH   5

Definition at line 146 of file mca.c.

#define IA64_LOG_ALLOCATE (   it,
  size 
)
Value:
{ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)] = \
ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)] = \

Definition at line 360 of file mca.c.

#define IA64_LOG_COUNT (   it)    ia64_state_log[it].isl_count

Definition at line 377 of file mca.c.

#define IA64_LOG_CURR_BUFFER (   it)    (void *)((ia64_state_log[it].isl_log[IA64_LOG_CURR_INDEX(it)]))

Definition at line 376 of file mca.c.

#define IA64_LOG_CURR_INDEX (   it)    1 - ia64_state_log[it].isl_index

Definition at line 369 of file mca.c.

#define IA64_LOG_INDEX_DEC (   it)    ia64_state_log[it].isl_index = 1 - ia64_state_log[it].isl_index

Definition at line 373 of file mca.c.

#define IA64_LOG_INDEX_INC (   it)
Value:
{ia64_state_log[it].isl_index = 1 - ia64_state_log[it].isl_index; \
ia64_state_log[it].isl_count++;}

Definition at line 370 of file mca.c.

#define IA64_LOG_LOCK (   it)    spin_lock_irqsave(&ia64_state_log[it].isl_lock, s)

Definition at line 366 of file mca.c.

#define IA64_LOG_LOCK_INIT (   it)    spin_lock_init(&ia64_state_log[it].isl_lock)

Definition at line 365 of file mca.c.

#define IA64_LOG_NEXT_BUFFER (   it)    (void *)((ia64_state_log[it].isl_log[IA64_LOG_NEXT_INDEX(it)]))

Definition at line 375 of file mca.c.

#define IA64_LOG_NEXT_INDEX (   it)    ia64_state_log[it].isl_index

Definition at line 368 of file mca.c.

#define IA64_LOG_UNLOCK (   it)    spin_unlock_irqrestore(&ia64_state_log[it].isl_lock,s)

Definition at line 367 of file mca.c.

#define IA64_MAX_LOG_TYPES   4 /* MCA, INIT, CMC, CPE */

Definition at line 348 of file mca.c.

#define IA64_MAX_LOGS   2 /* Double-buffering for nested MCAs */

Definition at line 347 of file mca.c.

#define IA64_MCA_DEBUG (   fmt...)

Definition at line 109 of file mca.c.

#define MAX_CPE_POLL_INTERVAL   (15*60*HZ) /* 15 minutes */

Definition at line 143 of file mca.c.

#define MIN_CPE_POLL_INTERVAL   (2*60*HZ) /* 2 minutes */

Definition at line 144 of file mca.c.

#define MLOGBUF_MSGMAX   256

Definition at line 179 of file mca.c.

#define MLOGBUF_SIZE   (512+256*NR_CPUS)

Definition at line 178 of file mca.c.

#define mprintk (   fmt...)    ia64_mca_printk(fmt)

Definition at line 176 of file mca.c.

#define NOTIFY_INIT (   event,
  regs,
  arg,
  spin 
)
Value:
do { \
if ((notify_die((event), "INIT", (regs), (arg), 0, 0) \
== NOTIFY_STOP) && ((spin) == 1)) \
ia64_mca_spin(__func__); \
} while (0)

Definition at line 112 of file mca.c.

#define NOTIFY_MCA (   event,
  regs,
  arg,
  spin 
)
Value:
do { \
if ((notify_die((event), "MCA", (regs), (arg), 0, 0) \
== NOTIFY_STOP) && ((spin) == 1)) \
ia64_mca_spin(__func__); \
} while (0)

Definition at line 119 of file mca.c.

#define RESTORE_LOGLEVEL (   __console_loglevel)
Value:
if (loglevel_save >= 0) { \
__console_loglevel = loglevel_save; \
loglevel_save = -1; \
} \
mlogbuf_finished = 0; \
oops_in_progress = 0;

Definition at line 195 of file mca.c.

Typedef Documentation

Function Documentation

__setup ( "disable_cpe_poll"  ,
ia64_mca_disable_cpe_polling   
)
DEFINE_PER_CPU ( u64  ,
ia64_mca_data   
)
DEFINE_PER_CPU ( u64  ,
ia64_mca_per_cpu_pte   
)
DEFINE_PER_CPU ( u64  ,
ia64_mca_pal_pte   
)
DEFINE_PER_CPU ( u64  ,
ia64_mca_pal_base   
)
DEFINE_PER_CPU ( u64  ,
ia64_mca_tr_reload   
)
device_initcall ( ia64_mca_late_init  )
EXPORT_SYMBOL ( ia64_mca_printk  )
EXPORT_SYMBOL ( ia64_mlogbuf_dump  )
EXPORT_SYMBOL ( ia64_reg_MCA_extension  )
EXPORT_SYMBOL ( ia64_unreg_MCA_extension  )
EXPORT_SYMBOL_GPL ( mca_recover_range  )
void ia64_init_handler ( struct pt_regs regs,
struct switch_stack sw,
struct ia64_sal_os_state sos 
)

Definition at line 1664 of file mca.c.

void __cpuinit ia64_mca_cmc_vector_setup ( void  )

Definition at line 635 of file mca.c.

void __cpuinit ia64_mca_cpu_init ( void cpu_data)

Definition at line 1848 of file mca.c.

void ia64_mca_handler ( struct pt_regs regs,
struct switch_stack sw,
struct ia64_sal_os_state sos 
)

Definition at line 1282 of file mca.c.

void __init ia64_mca_init ( void  )

Definition at line 1950 of file mca.c.

void ia64_mca_printk ( const char fmt,
  ... 
)

Definition at line 206 of file mca.c.

void ia64_mlogbuf_dump ( void  )

Definition at line 243 of file mca.c.

void ia64_os_init_dispatch_monarch ( void  )
void ia64_os_init_dispatch_slave ( void  )
int ia64_reg_MCA_extension ( int(*)(void *, struct ia64_sal_os_state *)  fn)

Definition at line 834 of file mca.c.

void ia64_unreg_MCA_extension ( void  )

Definition at line 844 of file mca.c.

int mca_recover_range ( unsigned long  addr)

Definition at line 517 of file mca.c.

void salinfo_log_wakeup ( int  type,
u8 buffer,
u64  size,
int  irqsafe 
)

Definition at line 227 of file salinfo.c.

int search_mca_table ( const struct mca_table_entry first,
const struct mca_table_entry last,
unsigned long  ip 
)

Definition at line 496 of file mca.c.

Variable Documentation

unsigned long __per_cpu_mca[NR_CPUS]

Definition at line 133 of file mca.c.

int(* ia64_mca_ucmc_extension)(void *, struct ia64_sal_os_state *) = NULL

Definition at line 830 of file mca.c.