1*cf84ac9aSAndroid Build Coastguard Worker /* Generated by ./xlat/gen.sh from ./xlat/perf_hw_cache_id.in; do not edit. */ 2*cf84ac9aSAndroid Build Coastguard Worker 3*cf84ac9aSAndroid Build Coastguard Worker #include "gcc_compat.h" 4*cf84ac9aSAndroid Build Coastguard Worker #include "static_assert.h" 5*cf84ac9aSAndroid Build Coastguard Worker 6*cf84ac9aSAndroid Build Coastguard Worker #if defined(PERF_COUNT_HW_CACHE_L1D) || (defined(HAVE_DECL_PERF_COUNT_HW_CACHE_L1D) && HAVE_DECL_PERF_COUNT_HW_CACHE_L1D) 7*cf84ac9aSAndroid Build Coastguard Worker DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 8*cf84ac9aSAndroid Build Coastguard Worker static_assert((PERF_COUNT_HW_CACHE_L1D) == (0), "PERF_COUNT_HW_CACHE_L1D != 0"); 9*cf84ac9aSAndroid Build Coastguard Worker DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 10*cf84ac9aSAndroid Build Coastguard Worker #else 11*cf84ac9aSAndroid Build Coastguard Worker # define PERF_COUNT_HW_CACHE_L1D 0 12*cf84ac9aSAndroid Build Coastguard Worker #endif 13*cf84ac9aSAndroid Build Coastguard Worker #if defined(PERF_COUNT_HW_CACHE_L1I) || (defined(HAVE_DECL_PERF_COUNT_HW_CACHE_L1I) && HAVE_DECL_PERF_COUNT_HW_CACHE_L1I) 14*cf84ac9aSAndroid Build Coastguard Worker DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 15*cf84ac9aSAndroid Build Coastguard Worker static_assert((PERF_COUNT_HW_CACHE_L1I) == (1), "PERF_COUNT_HW_CACHE_L1I != 1"); 16*cf84ac9aSAndroid Build Coastguard Worker DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 17*cf84ac9aSAndroid Build Coastguard Worker #else 18*cf84ac9aSAndroid Build Coastguard Worker # define PERF_COUNT_HW_CACHE_L1I 1 19*cf84ac9aSAndroid Build Coastguard Worker #endif 20*cf84ac9aSAndroid Build Coastguard Worker #if defined(PERF_COUNT_HW_CACHE_LL) || (defined(HAVE_DECL_PERF_COUNT_HW_CACHE_LL) && HAVE_DECL_PERF_COUNT_HW_CACHE_LL) 21*cf84ac9aSAndroid Build Coastguard Worker DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 22*cf84ac9aSAndroid Build Coastguard Worker static_assert((PERF_COUNT_HW_CACHE_LL) == (2), "PERF_COUNT_HW_CACHE_LL != 2"); 23*cf84ac9aSAndroid Build Coastguard Worker DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 24*cf84ac9aSAndroid Build Coastguard Worker #else 25*cf84ac9aSAndroid Build Coastguard Worker # define PERF_COUNT_HW_CACHE_LL 2 26*cf84ac9aSAndroid Build Coastguard Worker #endif 27*cf84ac9aSAndroid Build Coastguard Worker #if defined(PERF_COUNT_HW_CACHE_DTLB) || (defined(HAVE_DECL_PERF_COUNT_HW_CACHE_DTLB) && HAVE_DECL_PERF_COUNT_HW_CACHE_DTLB) 28*cf84ac9aSAndroid Build Coastguard Worker DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 29*cf84ac9aSAndroid Build Coastguard Worker static_assert((PERF_COUNT_HW_CACHE_DTLB) == (3), "PERF_COUNT_HW_CACHE_DTLB != 3"); 30*cf84ac9aSAndroid Build Coastguard Worker DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 31*cf84ac9aSAndroid Build Coastguard Worker #else 32*cf84ac9aSAndroid Build Coastguard Worker # define PERF_COUNT_HW_CACHE_DTLB 3 33*cf84ac9aSAndroid Build Coastguard Worker #endif 34*cf84ac9aSAndroid Build Coastguard Worker #if defined(PERF_COUNT_HW_CACHE_ITLB) || (defined(HAVE_DECL_PERF_COUNT_HW_CACHE_ITLB) && HAVE_DECL_PERF_COUNT_HW_CACHE_ITLB) 35*cf84ac9aSAndroid Build Coastguard Worker DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 36*cf84ac9aSAndroid Build Coastguard Worker static_assert((PERF_COUNT_HW_CACHE_ITLB) == (4), "PERF_COUNT_HW_CACHE_ITLB != 4"); 37*cf84ac9aSAndroid Build Coastguard Worker DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 38*cf84ac9aSAndroid Build Coastguard Worker #else 39*cf84ac9aSAndroid Build Coastguard Worker # define PERF_COUNT_HW_CACHE_ITLB 4 40*cf84ac9aSAndroid Build Coastguard Worker #endif 41*cf84ac9aSAndroid Build Coastguard Worker #if defined(PERF_COUNT_HW_CACHE_BPU) || (defined(HAVE_DECL_PERF_COUNT_HW_CACHE_BPU) && HAVE_DECL_PERF_COUNT_HW_CACHE_BPU) 42*cf84ac9aSAndroid Build Coastguard Worker DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 43*cf84ac9aSAndroid Build Coastguard Worker static_assert((PERF_COUNT_HW_CACHE_BPU) == (5), "PERF_COUNT_HW_CACHE_BPU != 5"); 44*cf84ac9aSAndroid Build Coastguard Worker DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 45*cf84ac9aSAndroid Build Coastguard Worker #else 46*cf84ac9aSAndroid Build Coastguard Worker # define PERF_COUNT_HW_CACHE_BPU 5 47*cf84ac9aSAndroid Build Coastguard Worker #endif 48*cf84ac9aSAndroid Build Coastguard Worker #if defined(PERF_COUNT_HW_CACHE_NODE) || (defined(HAVE_DECL_PERF_COUNT_HW_CACHE_NODE) && HAVE_DECL_PERF_COUNT_HW_CACHE_NODE) 49*cf84ac9aSAndroid Build Coastguard Worker DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE 50*cf84ac9aSAndroid Build Coastguard Worker static_assert((PERF_COUNT_HW_CACHE_NODE) == (6), "PERF_COUNT_HW_CACHE_NODE != 6"); 51*cf84ac9aSAndroid Build Coastguard Worker DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE 52*cf84ac9aSAndroid Build Coastguard Worker #else 53*cf84ac9aSAndroid Build Coastguard Worker # define PERF_COUNT_HW_CACHE_NODE 6 54*cf84ac9aSAndroid Build Coastguard Worker #endif 55*cf84ac9aSAndroid Build Coastguard Worker 56*cf84ac9aSAndroid Build Coastguard Worker #ifndef XLAT_MACROS_ONLY 57*cf84ac9aSAndroid Build Coastguard Worker 58*cf84ac9aSAndroid Build Coastguard Worker # ifdef IN_MPERS 59*cf84ac9aSAndroid Build Coastguard Worker 60*cf84ac9aSAndroid Build Coastguard Worker # error static const struct xlat perf_hw_cache_id in mpers mode 61*cf84ac9aSAndroid Build Coastguard Worker 62*cf84ac9aSAndroid Build Coastguard Worker # else 63*cf84ac9aSAndroid Build Coastguard Worker 64*cf84ac9aSAndroid Build Coastguard Worker static 65*cf84ac9aSAndroid Build Coastguard Worker const struct xlat perf_hw_cache_id[] = { 66*cf84ac9aSAndroid Build Coastguard Worker 67*cf84ac9aSAndroid Build Coastguard Worker XLAT(PERF_COUNT_HW_CACHE_L1D), 68*cf84ac9aSAndroid Build Coastguard Worker XLAT(PERF_COUNT_HW_CACHE_L1I), 69*cf84ac9aSAndroid Build Coastguard Worker XLAT(PERF_COUNT_HW_CACHE_LL), 70*cf84ac9aSAndroid Build Coastguard Worker XLAT(PERF_COUNT_HW_CACHE_DTLB), 71*cf84ac9aSAndroid Build Coastguard Worker XLAT(PERF_COUNT_HW_CACHE_ITLB), 72*cf84ac9aSAndroid Build Coastguard Worker XLAT(PERF_COUNT_HW_CACHE_BPU), 73*cf84ac9aSAndroid Build Coastguard Worker XLAT(PERF_COUNT_HW_CACHE_NODE), 74*cf84ac9aSAndroid Build Coastguard Worker XLAT_END 75*cf84ac9aSAndroid Build Coastguard Worker }; 76*cf84ac9aSAndroid Build Coastguard Worker 77*cf84ac9aSAndroid Build Coastguard Worker # endif /* !IN_MPERS */ 78*cf84ac9aSAndroid Build Coastguard Worker 79*cf84ac9aSAndroid Build Coastguard Worker #endif /* !XLAT_MACROS_ONLY */ 80