mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
Merge patch series "Support Andes PMU extension"
Yu Chien Peter Lin <peterlin@andestech.com> says: This patch series introduces the Andes PMU extension, which serves the same purpose as Sscofpmf and Smcntrpmf. Its non-standard local interrupt is assigned to bit 18 in the custom S-mode local interrupt enable and pending registers (slie/slip), while the interrupt cause is (256 + 18). * b4-shazam-merge: riscv: andes: Support specifying symbolic firmware and hardware raw events riscv: dts: renesas: Add Andes PMU extension for r9a07g043f dt-bindings: riscv: Add Andes PMU extension description perf: RISC-V: Introduce Andes PMU to support perf event sampling perf: RISC-V: Eliminate redundant interrupt enable/disable operations riscv: dts: renesas: r9a07g043f: Update compatible string to use Andes INTC dt-bindings: riscv: Add Andes interrupt controller compatible string riscv: errata: Rename defines for Andes Link: https://lore.kernel.org/r/20240222083946.3977135-1-peterlin@andestech.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
commit
0fd283cb64
16 changed files with 401 additions and 26 deletions
|
@ -106,7 +106,11 @@ properties:
|
|||
const: 1
|
||||
|
||||
compatible:
|
||||
const: riscv,cpu-intc
|
||||
oneOf:
|
||||
- items:
|
||||
- const: andestech,cpu-intc
|
||||
- const: riscv,cpu-intc
|
||||
- const: riscv,cpu-intc
|
||||
|
||||
interrupt-controller: true
|
||||
|
||||
|
|
|
@ -477,5 +477,12 @@ properties:
|
|||
latency, as ratified in commit 56ed795 ("Update
|
||||
riscv-crypto-spec-vector.adoc") of riscv-crypto.
|
||||
|
||||
- const: xandespmu
|
||||
description:
|
||||
The Andes Technology performance monitor extension for counter overflow
|
||||
and privilege mode filtering. For more details, see Counter Related
|
||||
Registers in the AX45MP datasheet.
|
||||
https://www.andestech.com/wp-content/uploads/AX45MP-1C-Rev.-5.0.0-Datasheet.pdf
|
||||
|
||||
additionalProperties: true
|
||||
...
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
riscv,isa-base = "rv64i";
|
||||
riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
|
||||
"zicntr", "zicsr", "zifencei",
|
||||
"zihpm";
|
||||
"zihpm", "xandespmu";
|
||||
mmu-type = "riscv,sv39";
|
||||
i-cache-size = <0x8000>;
|
||||
i-cache-line-size = <0x40>;
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
cpu0_intc: interrupt-controller {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "riscv,cpu-intc";
|
||||
compatible = "andestech,cpu-intc", "riscv,cpu-intc";
|
||||
interrupt-controller;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
#include <asm/sbi.h>
|
||||
#include <asm/vendorid_list.h>
|
||||
|
||||
#define ANDESTECH_AX45MP_MARCHID 0x8000000000008a45UL
|
||||
#define ANDESTECH_AX45MP_MIMPID 0x500UL
|
||||
#define ANDESTECH_SBI_EXT_ANDES 0x0900031E
|
||||
#define ANDES_AX45MP_MARCHID 0x8000000000008a45UL
|
||||
#define ANDES_AX45MP_MIMPID 0x500UL
|
||||
#define ANDES_SBI_EXT_ANDES 0x0900031E
|
||||
|
||||
#define ANDES_SBI_EXT_IOCP_SW_WORKAROUND 1
|
||||
|
||||
|
@ -32,7 +32,7 @@ static long ax45mp_iocp_sw_workaround(void)
|
|||
* ANDES_SBI_EXT_IOCP_SW_WORKAROUND SBI EXT checks if the IOCP is missing and
|
||||
* cache is controllable only then CMO will be applied to the platform.
|
||||
*/
|
||||
ret = sbi_ecall(ANDESTECH_SBI_EXT_ANDES, ANDES_SBI_EXT_IOCP_SW_WORKAROUND,
|
||||
ret = sbi_ecall(ANDES_SBI_EXT_ANDES, ANDES_SBI_EXT_IOCP_SW_WORKAROUND,
|
||||
0, 0, 0, 0, 0, 0);
|
||||
|
||||
return ret.error ? 0 : ret.value;
|
||||
|
@ -50,7 +50,7 @@ static void errata_probe_iocp(unsigned int stage, unsigned long arch_id, unsigne
|
|||
|
||||
done = true;
|
||||
|
||||
if (arch_id != ANDESTECH_AX45MP_MARCHID || impid != ANDESTECH_AX45MP_MIMPID)
|
||||
if (arch_id != ANDES_AX45MP_MARCHID || impid != ANDES_AX45MP_MIMPID)
|
||||
return;
|
||||
|
||||
if (!ax45mp_iocp_sw_workaround())
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include <asm/vendorid_list.h>
|
||||
|
||||
#ifdef CONFIG_ERRATA_ANDES
|
||||
#define ERRATA_ANDESTECH_NO_IOCP 0
|
||||
#define ERRATA_ANDESTECH_NUMBER 1
|
||||
#define ERRATA_ANDES_NO_IOCP 0
|
||||
#define ERRATA_ANDES_NUMBER 1
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ERRATA_SIFIVE
|
||||
|
@ -112,15 +112,6 @@ asm volatile(ALTERNATIVE( \
|
|||
#define THEAD_C9XX_RV_IRQ_PMU 17
|
||||
#define THEAD_C9XX_CSR_SCOUNTEROF 0x5c5
|
||||
|
||||
#define ALT_SBI_PMU_OVERFLOW(__ovl) \
|
||||
asm volatile(ALTERNATIVE( \
|
||||
"csrr %0, " __stringify(CSR_SSCOUNTOVF), \
|
||||
"csrr %0, " __stringify(THEAD_C9XX_CSR_SCOUNTEROF), \
|
||||
THEAD_VENDOR_ID, ERRATA_THEAD_PMU, \
|
||||
CONFIG_ERRATA_THEAD_PMU) \
|
||||
: "=r" (__ovl) : \
|
||||
: "memory")
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -80,6 +80,7 @@
|
|||
#define RISCV_ISA_EXT_ZFA 71
|
||||
#define RISCV_ISA_EXT_ZTSO 72
|
||||
#define RISCV_ISA_EXT_ZACAS 73
|
||||
#define RISCV_ISA_EXT_XANDESPMU 74
|
||||
|
||||
#define RISCV_ISA_EXT_MAX 128
|
||||
#define RISCV_ISA_EXT_INVALID U32_MAX
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef ASM_VENDOR_LIST_H
|
||||
#define ASM_VENDOR_LIST_H
|
||||
|
||||
#define ANDESTECH_VENDOR_ID 0x31e
|
||||
#define ANDES_VENDOR_ID 0x31e
|
||||
#define SIFIVE_VENDOR_ID 0x489
|
||||
#define THEAD_VENDOR_ID 0x5b7
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ static void riscv_fill_cpu_mfr_info(struct cpu_manufacturer_info_t *cpu_mfr_info
|
|||
|
||||
switch (cpu_mfr_info->vendor_id) {
|
||||
#ifdef CONFIG_ERRATA_ANDES
|
||||
case ANDESTECH_VENDOR_ID:
|
||||
case ANDES_VENDOR_ID:
|
||||
cpu_mfr_info->patch_func = andes_errata_patch_func;
|
||||
break;
|
||||
#endif
|
||||
|
|
|
@ -307,6 +307,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = {
|
|||
__RISCV_ISA_EXT_DATA(svinval, RISCV_ISA_EXT_SVINVAL),
|
||||
__RISCV_ISA_EXT_DATA(svnapot, RISCV_ISA_EXT_SVNAPOT),
|
||||
__RISCV_ISA_EXT_DATA(svpbmt, RISCV_ISA_EXT_SVPBMT),
|
||||
__RISCV_ISA_EXT_DATA(xandespmu, RISCV_ISA_EXT_XANDESPMU),
|
||||
};
|
||||
|
||||
const size_t riscv_isa_ext_count = ARRAY_SIZE(riscv_isa_ext);
|
||||
|
|
|
@ -86,6 +86,20 @@ config RISCV_PMU_SBI
|
|||
full perf feature support i.e. counter overflow, privilege mode
|
||||
filtering, counter configuration.
|
||||
|
||||
config ANDES_CUSTOM_PMU
|
||||
bool "Andes custom PMU support"
|
||||
depends on ARCH_RENESAS && RISCV_ALTERNATIVE && RISCV_PMU_SBI
|
||||
default y
|
||||
help
|
||||
The Andes cores implement the PMU overflow extension very
|
||||
similar to the standard Sscofpmf and Smcntrpmf extension.
|
||||
|
||||
This will patch the overflow and pending CSRs and handle the
|
||||
non-standard behaviour via the regular SBI PMU driver and
|
||||
interface.
|
||||
|
||||
If you don't know what to do here, say "Y".
|
||||
|
||||
config ARM_PMU_ACPI
|
||||
depends on ARM_PMU && ACPI
|
||||
def_bool y
|
||||
|
|
|
@ -19,11 +19,33 @@
|
|||
#include <linux/of.h>
|
||||
#include <linux/cpu_pm.h>
|
||||
#include <linux/sched/clock.h>
|
||||
#include <linux/soc/andes/irq.h>
|
||||
|
||||
#include <asm/errata_list.h>
|
||||
#include <asm/sbi.h>
|
||||
#include <asm/cpufeature.h>
|
||||
|
||||
#define ALT_SBI_PMU_OVERFLOW(__ovl) \
|
||||
asm volatile(ALTERNATIVE_2( \
|
||||
"csrr %0, " __stringify(CSR_SSCOUNTOVF), \
|
||||
"csrr %0, " __stringify(THEAD_C9XX_CSR_SCOUNTEROF), \
|
||||
THEAD_VENDOR_ID, ERRATA_THEAD_PMU, \
|
||||
CONFIG_ERRATA_THEAD_PMU, \
|
||||
"csrr %0, " __stringify(ANDES_CSR_SCOUNTEROF), \
|
||||
0, RISCV_ISA_EXT_XANDESPMU, \
|
||||
CONFIG_ANDES_CUSTOM_PMU) \
|
||||
: "=r" (__ovl) : \
|
||||
: "memory")
|
||||
|
||||
#define ALT_SBI_PMU_OVF_CLEAR_PENDING(__irq_mask) \
|
||||
asm volatile(ALTERNATIVE( \
|
||||
"csrc " __stringify(CSR_IP) ", %0\n\t", \
|
||||
"csrc " __stringify(ANDES_CSR_SLIP) ", %0\n\t", \
|
||||
0, RISCV_ISA_EXT_XANDESPMU, \
|
||||
CONFIG_ANDES_CUSTOM_PMU) \
|
||||
: : "r"(__irq_mask) \
|
||||
: "memory")
|
||||
|
||||
#define SYSCTL_NO_USER_ACCESS 0
|
||||
#define SYSCTL_USER_ACCESS 1
|
||||
#define SYSCTL_LEGACY 2
|
||||
|
@ -61,6 +83,7 @@ static int sysctl_perf_user_access __read_mostly = SYSCTL_USER_ACCESS;
|
|||
static union sbi_pmu_ctr_info *pmu_ctr_list;
|
||||
static bool riscv_pmu_use_irq;
|
||||
static unsigned int riscv_pmu_irq_num;
|
||||
static unsigned int riscv_pmu_irq_mask;
|
||||
static unsigned int riscv_pmu_irq;
|
||||
|
||||
/* Cache the available counters in a bitmask */
|
||||
|
@ -694,7 +717,7 @@ static irqreturn_t pmu_sbi_ovf_handler(int irq, void *dev)
|
|||
|
||||
event = cpu_hw_evt->events[fidx];
|
||||
if (!event) {
|
||||
csr_clear(CSR_SIP, BIT(riscv_pmu_irq_num));
|
||||
ALT_SBI_PMU_OVF_CLEAR_PENDING(riscv_pmu_irq_mask);
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
|
@ -708,7 +731,7 @@ static irqreturn_t pmu_sbi_ovf_handler(int irq, void *dev)
|
|||
* Overflow interrupt pending bit should only be cleared after stopping
|
||||
* all the counters to avoid any race condition.
|
||||
*/
|
||||
csr_clear(CSR_SIP, BIT(riscv_pmu_irq_num));
|
||||
ALT_SBI_PMU_OVF_CLEAR_PENDING(riscv_pmu_irq_mask);
|
||||
|
||||
/* No overflow bit is set */
|
||||
if (!overflow)
|
||||
|
@ -780,8 +803,7 @@ static int pmu_sbi_starting_cpu(unsigned int cpu, struct hlist_node *node)
|
|||
|
||||
if (riscv_pmu_use_irq) {
|
||||
cpu_hw_evt->irq = riscv_pmu_irq;
|
||||
csr_clear(CSR_IP, BIT(riscv_pmu_irq_num));
|
||||
csr_set(CSR_IE, BIT(riscv_pmu_irq_num));
|
||||
ALT_SBI_PMU_OVF_CLEAR_PENDING(riscv_pmu_irq_mask);
|
||||
enable_percpu_irq(riscv_pmu_irq, IRQ_TYPE_NONE);
|
||||
}
|
||||
|
||||
|
@ -792,7 +814,6 @@ static int pmu_sbi_dying_cpu(unsigned int cpu, struct hlist_node *node)
|
|||
{
|
||||
if (riscv_pmu_use_irq) {
|
||||
disable_percpu_irq(riscv_pmu_irq);
|
||||
csr_clear(CSR_IE, BIT(riscv_pmu_irq_num));
|
||||
}
|
||||
|
||||
/* Disable all counters access for user mode now */
|
||||
|
@ -816,8 +837,14 @@ static int pmu_sbi_setup_irqs(struct riscv_pmu *pmu, struct platform_device *pde
|
|||
riscv_cached_mimpid(0) == 0) {
|
||||
riscv_pmu_irq_num = THEAD_C9XX_RV_IRQ_PMU;
|
||||
riscv_pmu_use_irq = true;
|
||||
} else if (riscv_isa_extension_available(NULL, XANDESPMU) &&
|
||||
IS_ENABLED(CONFIG_ANDES_CUSTOM_PMU)) {
|
||||
riscv_pmu_irq_num = ANDES_SLI_CAUSE_BASE + ANDES_RV_IRQ_PMOVI;
|
||||
riscv_pmu_use_irq = true;
|
||||
}
|
||||
|
||||
riscv_pmu_irq_mask = BIT(riscv_pmu_irq_num % BITS_PER_LONG);
|
||||
|
||||
if (!riscv_pmu_use_irq)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
|
|
68
tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json
Normal file
68
tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json
Normal file
|
@ -0,0 +1,68 @@
|
|||
[
|
||||
{
|
||||
"ArchStdEvent": "FW_MISALIGNED_LOAD"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_MISALIGNED_STORE"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_ACCESS_LOAD"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_ACCESS_STORE"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_ILLEGAL_INSN"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_SET_TIMER"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_IPI_SENT"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_IPI_RECEIVED"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_FENCE_I_SENT"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_FENCE_I_RECEIVED"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_SFENCE_VMA_SENT"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_HFENCE_GVMA_SENT"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_HFENCE_GVMA_RECEIVED"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_HFENCE_GVMA_VMID_SENT"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_HFENCE_GVMA_VMID_RECEIVED"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_HFENCE_VVMA_SENT"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_HFENCE_VVMA_RECEIVED"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_HFENCE_VVMA_ASID_SENT"
|
||||
},
|
||||
{
|
||||
"ArchStdEvent": "FW_HFENCE_VVMA_ASID_RECEIVED"
|
||||
}
|
||||
]
|
127
tools/perf/pmu-events/arch/riscv/andes/ax45/instructions.json
Normal file
127
tools/perf/pmu-events/arch/riscv/andes/ax45/instructions.json
Normal file
|
@ -0,0 +1,127 @@
|
|||
[
|
||||
{
|
||||
"EventCode": "0x10",
|
||||
"EventName": "cycle_count",
|
||||
"BriefDescription": "Cycle count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x20",
|
||||
"EventName": "inst_count",
|
||||
"BriefDescription": "Retired instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x30",
|
||||
"EventName": "int_load_inst",
|
||||
"BriefDescription": "Integer load instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x40",
|
||||
"EventName": "int_store_inst",
|
||||
"BriefDescription": "Integer store instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x50",
|
||||
"EventName": "atomic_inst",
|
||||
"BriefDescription": "Atomic instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x60",
|
||||
"EventName": "sys_inst",
|
||||
"BriefDescription": "System instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x70",
|
||||
"EventName": "int_compute_inst",
|
||||
"BriefDescription": "Integer computational instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x80",
|
||||
"EventName": "condition_br",
|
||||
"BriefDescription": "Conditional branch instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x90",
|
||||
"EventName": "taken_condition_br",
|
||||
"BriefDescription": "Taken conditional branch instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA0",
|
||||
"EventName": "jal_inst",
|
||||
"BriefDescription": "JAL instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB0",
|
||||
"EventName": "jalr_inst",
|
||||
"BriefDescription": "JALR instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC0",
|
||||
"EventName": "ret_inst",
|
||||
"BriefDescription": "Return instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xD0",
|
||||
"EventName": "control_trans_inst",
|
||||
"BriefDescription": "Control transfer instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xE0",
|
||||
"EventName": "ex9_inst",
|
||||
"BriefDescription": "EXEC.IT instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xF0",
|
||||
"EventName": "int_mul_inst",
|
||||
"BriefDescription": "Integer multiplication instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x100",
|
||||
"EventName": "int_div_rem_inst",
|
||||
"BriefDescription": "Integer division/remainder instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x110",
|
||||
"EventName": "float_load_inst",
|
||||
"BriefDescription": "Floating-point load instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x120",
|
||||
"EventName": "float_store_inst",
|
||||
"BriefDescription": "Floating-point store instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x130",
|
||||
"EventName": "float_add_sub_inst",
|
||||
"BriefDescription": "Floating-point addition/subtraction instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x140",
|
||||
"EventName": "float_mul_inst",
|
||||
"BriefDescription": "Floating-point multiplication instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x150",
|
||||
"EventName": "float_fused_muladd_inst",
|
||||
"BriefDescription": "Floating-point fused multiply-add instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x160",
|
||||
"EventName": "float_div_sqrt_inst",
|
||||
"BriefDescription": "Floating-point division or square-root instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x170",
|
||||
"EventName": "other_float_inst",
|
||||
"BriefDescription": "Other floating-point instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x180",
|
||||
"EventName": "int_mul_add_sub_inst",
|
||||
"BriefDescription": "Integer multiplication and add/sub instruction count"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x190",
|
||||
"EventName": "retired_ops",
|
||||
"BriefDescription": "Retired operation count"
|
||||
}
|
||||
]
|
57
tools/perf/pmu-events/arch/riscv/andes/ax45/memory.json
Normal file
57
tools/perf/pmu-events/arch/riscv/andes/ax45/memory.json
Normal file
|
@ -0,0 +1,57 @@
|
|||
[
|
||||
{
|
||||
"EventCode": "0x01",
|
||||
"EventName": "ilm_access",
|
||||
"BriefDescription": "ILM access"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x11",
|
||||
"EventName": "dlm_access",
|
||||
"BriefDescription": "DLM access"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x21",
|
||||
"EventName": "icache_access",
|
||||
"BriefDescription": "ICACHE access"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x31",
|
||||
"EventName": "icache_miss",
|
||||
"BriefDescription": "ICACHE miss"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x41",
|
||||
"EventName": "dcache_access",
|
||||
"BriefDescription": "DCACHE access"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x51",
|
||||
"EventName": "dcache_miss",
|
||||
"BriefDescription": "DCACHE miss"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x61",
|
||||
"EventName": "dcache_load_access",
|
||||
"BriefDescription": "DCACHE load access"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x71",
|
||||
"EventName": "dcache_load_miss",
|
||||
"BriefDescription": "DCACHE load miss"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x81",
|
||||
"EventName": "dcache_store_access",
|
||||
"BriefDescription": "DCACHE store access"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x91",
|
||||
"EventName": "dcache_store_miss",
|
||||
"BriefDescription": "DCACHE store miss"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA1",
|
||||
"EventName": "dcache_wb",
|
||||
"BriefDescription": "DCACHE writeback"
|
||||
}
|
||||
]
|
77
tools/perf/pmu-events/arch/riscv/andes/ax45/microarch.json
Normal file
77
tools/perf/pmu-events/arch/riscv/andes/ax45/microarch.json
Normal file
|
@ -0,0 +1,77 @@
|
|||
[
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"EventName": "cycle_wait_icache_fill",
|
||||
"BriefDescription": "Cycles waiting for ICACHE fill data"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC1",
|
||||
"EventName": "cycle_wait_dcache_fill",
|
||||
"BriefDescription": "Cycles waiting for DCACHE fill data"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xD1",
|
||||
"EventName": "uncached_ifetch_from_bus",
|
||||
"BriefDescription": "Uncached ifetch data access from bus"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xE1",
|
||||
"EventName": "uncached_load_from_bus",
|
||||
"BriefDescription": "Uncached load data access from bus"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xF1",
|
||||
"EventName": "cycle_wait_uncached_ifetch",
|
||||
"BriefDescription": "Cycles waiting for uncached ifetch data from bus"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x101",
|
||||
"EventName": "cycle_wait_uncached_load",
|
||||
"BriefDescription": "Cycles waiting for uncached load data from bus"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x111",
|
||||
"EventName": "main_itlb_access",
|
||||
"BriefDescription": "Main ITLB access"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x121",
|
||||
"EventName": "main_itlb_miss",
|
||||
"BriefDescription": "Main ITLB miss"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x131",
|
||||
"EventName": "main_dtlb_access",
|
||||
"BriefDescription": "Main DTLB access"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x141",
|
||||
"EventName": "main_dtlb_miss",
|
||||
"BriefDescription": "Main DTLB miss"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x151",
|
||||
"EventName": "cycle_wait_itlb_fill",
|
||||
"BriefDescription": "Cycles waiting for Main ITLB fill data"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x161",
|
||||
"EventName": "pipe_stall_cycle_dtlb_miss",
|
||||
"BriefDescription": "Pipeline stall cycles caused by Main DTLB miss"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x02",
|
||||
"EventName": "mispredict_condition_br",
|
||||
"BriefDescription": "Misprediction of conditional branches"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x12",
|
||||
"EventName": "mispredict_take_condition_br",
|
||||
"BriefDescription": "Misprediction of taken conditional branches"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x22",
|
||||
"EventName": "mispredict_target_ret_inst",
|
||||
"BriefDescription": "Misprediction of targets of Return instructions"
|
||||
}
|
||||
]
|
|
@ -17,3 +17,4 @@
|
|||
0x489-0x8000000000000007-0x[[:xdigit:]]+,v1,sifive/u74,core
|
||||
0x5b7-0x0-0x0,v1,thead/c900-legacy,core
|
||||
0x67e-0x80000000db0000[89]0-0x[[:xdigit:]]+,v1,starfive/dubhe-80,core
|
||||
0x31e-0x8000000000008a45-0x[[:xdigit:]]+,v1,andes/ax45,core
|
||||
|
|
|
Loading…
Add table
Reference in a new issue