Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218651
b: refs/heads/master
c: 2c78ffe
h: refs/heads/master
i:
  218649: 62c7401
  218647: 01ea0a5
v: v3
  • Loading branch information
Ingo Molnar committed Oct 25, 2010
1 parent 4f952cb commit f9a509d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 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: aa7b250c252cc8e6b1daf0e1eada5eba42a1a68d
refs/heads/master: 2c78ffeca98fcd5a1dfd4a322438944506ed5e64
26 changes: 11 additions & 15 deletions trunk/arch/x86/oprofile/op_model_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,29 +281,25 @@ static inline int eilvt_is_available(int offset)

static inline int ibs_eilvt_valid(void)
{
u64 val;
int offset;
u64 val;

rdmsrl(MSR_AMD64_IBSCTL, val);
offset = val & IBSCTL_LVT_OFFSET_MASK;

if (!(val & IBSCTL_LVT_OFFSET_VALID)) {
pr_err(FW_BUG "cpu %d, invalid IBS "
"interrupt offset %d (MSR%08X=0x%016llx)",
smp_processor_id(), offset,
MSR_AMD64_IBSCTL, val);
pr_err(FW_BUG "cpu %d, invalid IBS interrupt offset %d (MSR%08X=0x%016llx)\n",
smp_processor_id(), offset, MSR_AMD64_IBSCTL, val);
return 0;
}

offset = val & IBSCTL_LVT_OFFSET_MASK;

if (eilvt_is_available(offset))
return !0;

pr_err(FW_BUG "cpu %d, IBS interrupt offset %d "
"not available (MSR%08X=0x%016llx)",
smp_processor_id(), offset,
MSR_AMD64_IBSCTL, val);
if (!eilvt_is_available(offset)) {
pr_err(FW_BUG "cpu %d, IBS interrupt offset %d not available (MSR%08X=0x%016llx)\n",
smp_processor_id(), offset, MSR_AMD64_IBSCTL, val);
return 0;
}

return 0;
return 1;
}

static inline int get_ibs_offset(void)
Expand Down

0 comments on commit f9a509d

Please sign in to comment.