Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
octeon-wdt-main.c File Reference
#include <linux/miscdevice.h>
#include <linux/interrupt.h>
#include <linux/watchdog.h>
#include <linux/cpumask.h>
#include <linux/bitops.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/cpu.h>
#include <linux/smp.h>
#include <linux/fs.h>
#include <linux/irq.h>
#include <asm/mipsregs.h>
#include <asm/uasm.h>
#include <asm/octeon/octeon.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define WD_TIMO   60 /* Default heartbeat = 60 seconds */
 
#define K0   26
 
#define C0_CVMMEMCTL   11, 7
 
#define C0_STATUS   12, 0
 
#define C0_EBASE   15, 1
 
#define C0_DESAVE   31, 0
 

Enumerations

enum  lable_id { label_enter_bootloader = 1 }
 

Functions

 module_param (heartbeat, int, S_IRUGO)
 
 MODULE_PARM_DESC (heartbeat,"Watchdog heartbeat in seconds. (0 < heartbeat, default="__MODULE_STRING(WD_TIMO)")")
 
 module_param (nowayout, bool, S_IRUGO)
 
 MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")")
 
void octeon_wdt_nmi_stage2 (void)
 
int prom_putchar (char c)
 
void octeon_wdt_nmi_stage3 (u64 reg[32])
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Cavium Networks <support@caviumnetworks.com>")
 
 MODULE_DESCRIPTION ("Cavium Networks Octeon Watchdog driver.")
 
 module_init (octeon_wdt_init)
 
 module_exit (octeon_wdt_cleanup)
 

Variables

const charreg_name []
 

Macro Definition Documentation

#define C0_CVMMEMCTL   11, 7

Definition at line 120 of file octeon-wdt-main.c.

#define C0_DESAVE   31, 0

Definition at line 123 of file octeon-wdt-main.c.

#define C0_EBASE   15, 1

Definition at line 122 of file octeon-wdt-main.c.

#define C0_STATUS   12, 0

Definition at line 121 of file octeon-wdt-main.c.

#define K0   26

Definition at line 119 of file octeon-wdt-main.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 55 of file octeon-wdt-main.c.

#define WD_TIMO   60 /* Default heartbeat = 60 seconds */

Definition at line 92 of file octeon-wdt-main.c.

Enumeration Type Documentation

enum lable_id
Enumerator:
label_enter_bootloader 

Definition at line 114 of file octeon-wdt-main.c.

Function Documentation

MODULE_AUTHOR ( "Cavium Networks <support@caviumnetworks.com>"  )
MODULE_DESCRIPTION ( "Cavium Networks Octeon Watchdog driver."  )
module_exit ( octeon_wdt_cleanup  )
module_init ( octeon_wdt_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( heartbeat  ,
int  ,
S_IRUGO   
)
module_param ( nowayout  ,
bool  ,
S_IRUGO   
)
MODULE_PARM_DESC ( heartbeat  ,
"Watchdog heartbeat in seconds. (0 < heartbeat, default="__MODULE_STRING(WD_TIMO)")"   
)
MODULE_PARM_DESC ( nowayout  ,
"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")"   
)
void octeon_wdt_nmi_stage2 ( void  )
void octeon_wdt_nmi_stage3 ( u64  reg[32])

NMI stage 3 handler. NMIs are handled in the following manner: 1) The first NMI handler enables CVMSEG and transfers from the bootbus region into normal memory. It is careful to not destroy any registers. 2) The second stage handler uses CVMSEG to save the registers and create a stack for C code. It then calls the third level handler with one argument, a pointer to the register values. 3) The third, and final, level handler is the following C function that prints out some useful infomration.

: Pointer to register state before the NMI

Definition at line 320 of file octeon-wdt-main.c.

int prom_putchar ( char  c)

Definition at line 56 of file console.c.

Variable Documentation

const char* reg_name[]
Initial value:
= {
"$0", "at", "v0", "v1", "a0", "a1", "a2", "a3",
"a4", "a5", "a6", "a7", "t0", "t1", "t2", "t3",
"s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
"t8", "t9", "k0", "k1", "gp", "sp", "s8", "ra"
}

Definition at line 300 of file octeon-wdt-main.c.