Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199103
b: refs/heads/master
c: 623aab8
h: refs/heads/master
i:
  199101: 9416ec1
  199099: 03398ec
  199095: 7ff3109
  199087: aae1603
  199071: 0a0898b
  199039: 7634633
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed May 19, 2010
1 parent 583b721 commit c9df853
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 151f85a471d29fc81f70348143d009a729901bc0
refs/heads/master: 623aab896ee1a532cb540bcf0d5ae8a88275afd5
7 changes: 4 additions & 3 deletions trunk/arch/x86/kernel/cpu/perf_event_p4.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ static void p4_pmu_swap_config_ts(struct hw_perf_event *hwc, int cpu)

/*
* ESCR address hashing is tricky, ESCRs are not sequential
* in memory but all starts from MSR_P4_BSU_ESCR0 (0x03e0) and
* in memory but all starts from MSR_P4_BSU_ESCR0 (0x03a0) and
* the metric between any ESCRs is laid in range [0xa0,0xe1]
*
* so we make ~70% filled hashtable
Expand Down Expand Up @@ -735,8 +735,9 @@ static int p4_get_escr_idx(unsigned int addr)
{
unsigned int idx = P4_ESCR_MSR_IDX(addr);

if (unlikely(idx >= P4_ESCR_MSR_TABLE_SIZE ||
!p4_escr_table[idx])) {
if (unlikely(idx >= P4_ESCR_MSR_TABLE_SIZE ||
!p4_escr_table[idx] ||
p4_escr_table[idx] != addr)) {
WARN_ONCE(1, "P4 PMU: Wrong address passed: %x\n", addr);
return -1;
}
Expand Down

0 comments on commit c9df853

Please sign in to comment.