bcma: claim only 14e4:4365 PCI Dell card with SoftMAC BCM43142
[linux/fpc-iii.git] / tools / perf / util / perf_regs.c
blob6b8eb13e14e4d5897fca71c41634a07cc9ec5d16
1 #include <errno.h>
2 #include "perf_regs.h"
3 #include "event.h"
5 const struct sample_reg __weak sample_reg_masks[] = {
6 SMPL_REG_END
7 };
9 #ifdef HAVE_PERF_REGS_SUPPORT
10 int perf_reg_value(u64 *valp, struct regs_dump *regs, int id)
12 int i, idx = 0;
13 u64 mask = regs->mask;
15 if (regs->cache_mask & (1 << id))
16 goto out;
18 if (!(mask & (1 << id)))
19 return -EINVAL;
21 for (i = 0; i < id; i++) {
22 if (mask & (1 << i))
23 idx++;
26 regs->cache_mask |= (1 << id);
27 regs->cache_regs[id] = regs->regs[idx];
29 out:
30 *valp = regs->cache_regs[id];
31 return 0;
33 #endif