#include #include "perf_regs.h" #include "event.h" const struct sample_reg __weak sample_reg_masks[] = { SMPL_REG_END }; #ifdef HAVE_PERF_REGS_SUPPORT int perf_reg_value(u64 *valp, struct regs_dump *regs, int id) { int i, idx = 0; u64 mask = regs->mask; if (regs->cache_mask & (1ULL << id)) goto out; if (!(mask & (1ULL << id))) return -EINVAL; for (i = 0; i < id; i++) { if (mask & (1ULL << i)) idx++; } regs->cache_mask |= (1ULL << id); regs->cache_regs[id] = regs->regs[idx]; out: *valp = regs->cache_regs[id]; return 0; } #endif linux/net-next.git' title='net-next.git Git repository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>2016-12-22 15:00:12 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2017-02-02 21:54:52 +0800
commit3484ecbe0e9deb94afb0b9b6172d77e98eb72b94 (patch)
tree4d4be0d20d4946c51ef47a882d78c9934a219c0e /tools/perf/arch/x86/util/intel-pt.c
parent11e3b725cfc282efe9d4a354153e99d86a16af08 (diff)
crypto: qat - fix bar discovery for c62x
Some accelerators of the c62x series have only two bars. This patch skips BAR0 if the accelerator does not have it. Cc: <stable@vger.kernel.org> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'tools/perf/arch/x86/util/intel-pt.c')