Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Variables
op_model_loongson2.c File Reference
#include <linux/init.h>
#include <linux/oprofile.h>
#include <linux/interrupt.h>
#include <loongson.h>
#include "op_impl.h"

Go to the source code of this file.

Data Structures

struct  loongson2_register_config
 

Macros

#define LOONGSON2_CPU_TYPE   "mips/loongson2"
 
#define LOONGSON2_PERFCNT_OVERFLOW   (1ULL << 31)
 
#define LOONGSON2_PERFCTRL_EXL   (1UL << 0)
 
#define LOONGSON2_PERFCTRL_KERNEL   (1UL << 1)
 
#define LOONGSON2_PERFCTRL_SUPERVISOR   (1UL << 2)
 
#define LOONGSON2_PERFCTRL_USER   (1UL << 3)
 
#define LOONGSON2_PERFCTRL_ENABLE   (1UL << 4)
 
#define LOONGSON2_PERFCTRL_EVENT(idx, event)   (((event) & 0x0f) << ((idx) ? 9 : 5))
 
#define read_c0_perfctrl()   __read_64bit_c0_register($24, 0)
 
#define write_c0_perfctrl(val)   __write_64bit_c0_register($24, 0, val)
 
#define read_c0_perfcnt()   __read_64bit_c0_register($25, 0)
 
#define write_c0_perfcnt(val)   __write_64bit_c0_register($25, 0, val)
 

Variables

struct op_mips_model op_model_loongson2_ops
 

Macro Definition Documentation

#define LOONGSON2_CPU_TYPE   "mips/loongson2"

Definition at line 19 of file op_model_loongson2.c.

#define LOONGSON2_PERFCNT_OVERFLOW   (1ULL << 31)

Definition at line 21 of file op_model_loongson2.c.

#define LOONGSON2_PERFCTRL_ENABLE   (1UL << 4)

Definition at line 27 of file op_model_loongson2.c.

#define LOONGSON2_PERFCTRL_EVENT (   idx,
  event 
)    (((event) & 0x0f) << ((idx) ? 9 : 5))

Definition at line 28 of file op_model_loongson2.c.

#define LOONGSON2_PERFCTRL_EXL   (1UL << 0)

Definition at line 23 of file op_model_loongson2.c.

#define LOONGSON2_PERFCTRL_KERNEL   (1UL << 1)

Definition at line 24 of file op_model_loongson2.c.

#define LOONGSON2_PERFCTRL_SUPERVISOR   (1UL << 2)

Definition at line 25 of file op_model_loongson2.c.

#define LOONGSON2_PERFCTRL_USER   (1UL << 3)

Definition at line 26 of file op_model_loongson2.c.

#define read_c0_perfcnt ( )    __read_64bit_c0_register($25, 0)

Definition at line 33 of file op_model_loongson2.c.

#define read_c0_perfctrl ( )    __read_64bit_c0_register($24, 0)

Definition at line 31 of file op_model_loongson2.c.

#define write_c0_perfcnt (   val)    __write_64bit_c0_register($25, 0, val)

Definition at line 34 of file op_model_loongson2.c.

#define write_c0_perfctrl (   val)    __write_64bit_c0_register($24, 0, val)

Definition at line 32 of file op_model_loongson2.c.

Variable Documentation

struct op_mips_model op_model_loongson2_ops
Initial value:
= {
.reg_setup = loongson2_reg_setup,
.cpu_setup = loongson2_cpu_setup,
.init = loongson2_init,
.exit = loongson2_exit,
.cpu_start = loongson2_cpu_start,
.cpu_stop = loongson2_cpu_stop,
.cpu_type = LOONGSON2_CPU_TYPE,
.num_counters = 2
}

Definition at line 152 of file op_model_loongson2.c.