#define LSTAT_icmiss   0x00
#define LSTAT_itmiss   0x01
#define LSTAT_ichold   0x02
#define LSTAT_ithold   0x03
#define LSTAT_dcmiss   0x08
#define LSTAT_dtmiss   0x09
#define LSTAT_dchold   0x0A
#define LSTAT_dthold   0x0B
#define LSTAT_wbhold   0x10
#define LSTAT_ainst    0x11
#define LSTAT_iinst    0x12
#define LSTAT_finst    0x13
#define LSTAT_bpmiss   0x14
#define LSTAT_time     0x15
#define LSTAT_ahbutil  0x17
#define LSTAT_ahbtutil 0x18
#define LSTAT_branch   0x22
#define LSTAT_type2    0x30
#define LSTAT_ldst     0x38
#define LSTAT_load     0x39
#define LSTAT_store    0x3A
#define LSTAT_ahbidle  0x40
#define LSTAT_ahbbusy  0x41
#define LSTAT_ahbnseq  0x42
#define LSTAT_ahbseq   0x43
#define LSTAT_ahbread  0x44
#define LSTAT_ahbwrite 0x45
#define LSTAT_ahbbyte  0x46
#define LSTAT_ahbhword 0x47
#define LSTAT_ahbword  0x48
#define LSTAT_ahbdword 0x49
#define LSTAT_ahbqword 0x4A
#define LSTAT_ahb8word 0x4B
#define LSTAT_ahbwaits 0x4C
#define LSTAT_ahbretry 0x4D
#define LSTAT_ahbspr   0x4E
#define LSTAT_ahbspd   0x4F
#define LSTAT_ahblock  0x50
#define LSTAT_extev00  0x60
#define LSTAT_extev01  0x61
#define LSTAT_extev02  0x62
#define LSTAT_extev03  0x63
#define LSTAT_extev04  0x64
#define LSTAT_extev05  0x65
#define LSTAT_extev06  0x66
#define LSTAT_extev07  0x67
#define LSTAT_extev08  0x68
#define LSTAT_extev09  0x69
#define LSTAT_extev10  0x6A
#define LSTAT_extev11  0x6B
#define LSTAT_extev12  0x6C
#define LSTAT_extev13  0x6D
#define LSTAT_extev14  0x6E
#define LSTAT_extev15  0x6F

void lstat_set(unsigned int addr, int cnt, int cpuahbm, int event);
