Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

op_model_arm11.c File Reference


Detailed Description

Based on the op_model_xscale.c driver by author Zwane Mwaikambo

Definition in file op_model_arm11.c.

#include <linux/types.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/oprofile.h>
#include <linux/interrupt.h>
#include <mach/hardware.h>
#include <asm/irq.h>
#include <asm/system.h>
#include "op_counter.h"
#include "op_arm_model.h"
#include "evtmon_regs.h"

Go to the source code of this file.

Classes

struct  pmu_counter
struct  pmu_type

Defines

#define ACK_TRIG_OUT_2   0x4
#define CCNT_RESET   0x004
#define COUNTER_MSB   0x80000000
#define ECT_CTI_CHAN_2   0x4
#define ECT_CTI_CHAN_3   0x8
#define ECT_CTI_TRIGIN_1   1
#define ECT_CTI_TRIGIN_7   7
#define ECT_CTI_TRIGOUT_2   2
#define ECT_CTI_TRIGOUT_6   6
#define ECT_WORKAROUND
#define EM_SET_INT   L2EM_ENABLE_CNTINCRINT
#define ENABLE_CTI_CLOCK   0x00000020
#define ENABLE_ECT   0x1
#define ENABLE_EVTBUS   0x100000
#define ENABLE_L2CACHE   0x1
#define EVENT_OVERFLOW_INT   INT_ECT
#define EVT_BCU_DRAIN   0x12
#define EVT_BCU_FULL   0x11
#define EVT_BCU_REQUEST   0x10
#define EVT_BRANCH   0x05
#define EVT_BRANCH_MISS   0x06
#define EVT_CCNT   0xFE
#define EVT_DATA_STALL   0x02
#define EVT_DCACE_WRITE_BACK   0x0C
#define EVT_DCACHE_ACCESS   0x0A
#define EVT_DCACHE_FULL_STALL_CONTIG   0x09
#define EVT_DCACHE_MISS   0x0B
#define EVT_DTLB_MISS   0x04
#define EVT_ETMEXTOT0   0x20
#define EVT_ETMEXTOT1   0x21
#define EVT_ICACHE_MISS   0x00
#define EVT_INCREMENT   0xFF
#define EVT_INSTRUCTION   0x07
#define EVT_ITLB_MISS   0x03
#define EVT_PC_CHANGED   0x0D
#define EVT_STALL_INSTR   0x01
#define EVT_TLB_MISS   0x0F
#define EVT_UNUSED   0x100
#define EVTMON_ENABLE   0x001
#define PMN_RESET   0x002
#define PMU_CNT64   0x008
#define PMU_ENABLE   0x001
#define PMU_FLAG_CC   0x200
#define PMU_FLAG_CR0   0x080
#define PMU_FLAG_CR1   0x100
#define PMU_OVERFLOWBIT_MASK   0x700
#define PMU_RESET   (CCNT_RESET | PMN_RESET)
#define REV_NUM   0x2
#define UNLOCK_ECT_CODE   0x0ACCE550
#define VAR_NUM   0x0

Enumerations

enum  { CCNT, PMN0, PMN1, MAX_PMUCOUNTERS }
enum  {
  EMC0 = MAX_PMUCOUNTERS, EMC1, EMC2, EMC3,
  MAX_L2COUNTERS
}

Functions

static int arm11_detect_pmu (void)
static irqreturn_t arm11_pmu_interrupt (int irq, void *arg, struct pt_regs *regs)
static int arm11_pmu_start (void)
static void arm11_pmu_stop (void)
static int arm11_setup_ctrs (void)
void l2_evtbus_disable (void)
void l2_evtbus_enable (void)
static int l2em_configure_counter (int nr, int type)
static u32 read_counter (int counter)
static u32 read_pmnc (void)
static void write_counter (int counter, u32 val)
static void write_l2counter (int nr, u32 val)
static void write_pmnc (u32 val)

Variables

struct op_arm_model_spec op_arm_spec
static struct pmu_type * pmu
static struct pmu_type pmu_parms []
static unsigned int r0p2_or_older_core
static struct pmu_counter results [MAX_L2COUNTERS]


Generated by  Doxygen 1.6.0   Back to index