Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
sb_tbprof.c File Reference
#include <linux/device.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/vmalloc.h>
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/wait.h>
#include <asm/io.h>
#include <asm/sibyte/sb1250.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Data Structures

struct  sbprof_tb
 

Macros

#define SBPROF_TB_MAJOR   240
 
#define MAX_SAMPLE_BYTES   (24*1024*1024)
 
#define MAX_TBSAMPLE_BYTES   (12*1024*1024)
 
#define MAX_SAMPLES   (MAX_SAMPLE_BYTES/sizeof(u_int32_t))
 
#define TB_SAMPLE_SIZE   (sizeof(tb_sample_t))
 
#define MAX_TB_SAMPLES   (MAX_TBSAMPLE_BYTES/TB_SAMPLE_SIZE)
 
#define SBPROF_ZBSTART   _IOW('s', 0, int)
 
#define SBPROF_ZBSTOP   _IOW('s', 1, int)
 
#define SBPROF_ZBWAITFULL   _IOW('s', 2, int)
 
#define zclk_timer_init(val)
 
#define zclk_get(val)
 
#define DEVNAME   "sb_tbprof"
 
#define TB_FULL   (sbp.next_tb_sample == MAX_TB_SAMPLES)
 

Typedefs

typedef u64 tb_sample_t [6 *256]
 

Enumerations

enum  open_status { SB_CLOSED, SB_OPENING, SB_OPEN }
 

Functions

 module_init (sbprof_tb_init)
 
 module_exit (sbprof_tb_cleanup)
 
 MODULE_ALIAS_CHARDEV_MAJOR (SBPROF_TB_MAJOR)
 
 MODULE_AUTHOR ("Ralf Baechle <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DEVNAME   "sb_tbprof"

Definition at line 134 of file sb_tbprof.c.

#define MAX_SAMPLE_BYTES   (24*1024*1024)

Definition at line 83 of file sb_tbprof.c.

#define MAX_SAMPLES   (MAX_SAMPLE_BYTES/sizeof(u_int32_t))

Definition at line 86 of file sb_tbprof.c.

#define MAX_TB_SAMPLES   (MAX_TBSAMPLE_BYTES/TB_SAMPLE_SIZE)

Definition at line 88 of file sb_tbprof.c.

#define MAX_TBSAMPLE_BYTES   (12*1024*1024)

Definition at line 84 of file sb_tbprof.c.

#define SBPROF_TB_MAJOR   240

Definition at line 58 of file sb_tbprof.c.

#define SBPROF_ZBSTART   _IOW('s', 0, int)

Definition at line 91 of file sb_tbprof.c.

#define SBPROF_ZBSTOP   _IOW('s', 1, int)

Definition at line 92 of file sb_tbprof.c.

#define SBPROF_ZBWAITFULL   _IOW('s', 2, int)

Definition at line 93 of file sb_tbprof.c.

#define TB_FULL   (sbp.next_tb_sample == MAX_TB_SAMPLES)

Definition at line 136 of file sb_tbprof.c.

#define TB_SAMPLE_SIZE   (sizeof(tb_sample_t))

Definition at line 87 of file sb_tbprof.c.

#define zclk_get (   val)
Value:
__asm__ __volatile__ (".set push;" \
".set mips64;" \
"la $8, 0xb00204c0;" /* SCD perf_cnt_cfg */ \
"ld %0, 0x10($8);" /* write val to counter0 */ \
".set pop" \
: /* outputs */ "=r"(val) \
: /* inputs */ \
: /* modifies */ "$8" )

Definition at line 124 of file sb_tbprof.c.

#define zclk_timer_init (   val)
Value:
__asm__ __volatile__ (".set push;" \
".set mips64;" \
"la $8, 0xb00204c0;" /* SCD perf_cnt_cfg */ \
"sd %0, 0x10($8);" /* write val to counter0 */ \
"sd %1, 0($8);" /* config counter0 for zclks*/ \
".set pop" \
: /* no outputs */ \
/* enable, counter0 */ \
: /* inputs */ "r"(val), "r" ((1ULL << 33) | 1ULL) \
: /* modifies */ "$8" )

Definition at line 109 of file sb_tbprof.c.

Typedef Documentation

typedef u64 tb_sample_t[6 *256]

Definition at line 60 of file sb_tbprof.c.

Enumeration Type Documentation

Enumerator:
SB_CLOSED 
SB_OPENING 
SB_OPEN 

Definition at line 62 of file sb_tbprof.c.

Function Documentation

MODULE_ALIAS_CHARDEV_MAJOR ( SBPROF_TB_MAJOR  )
MODULE_AUTHOR ( "Ralf Baechle <[email protected]>"  )
module_exit ( sbprof_tb_cleanup  )
module_init ( sbprof_tb_init  )
MODULE_LICENSE ( "GPL"  )