Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147457
b: refs/heads/master
c: 9029a5e
h: refs/heads/master
i:
  147455: cada1d8
v: v3
  • Loading branch information
Ingo Molnar committed May 15, 2009
1 parent b817492 commit e4fe9c6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 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: 1c80f4b598d9b075a2a0be694e28be93a6702bcc
refs/heads/master: 9029a5e3801f1cc7cdaab80169d82427acf928d8
25 changes: 18 additions & 7 deletions trunk/arch/x86/kernel/cpu/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,13 @@ static void intel_pmu_save_and_restart(struct perf_counter *counter)
*/
static int intel_pmu_handle_irq(struct pt_regs *regs, int nmi)
{
int bit, cpu = smp_processor_id();
struct cpu_hw_counters *cpuc;
struct cpu_hw_counters;
int bit, cpu, loops;
u64 ack, status;
struct cpu_hw_counters *cpuc = &per_cpu(cpu_hw_counters, cpu);

cpu = smp_processor_id();
cpuc = &per_cpu(cpu_hw_counters, cpu);

perf_disable();
status = intel_pmu_get_status();
Expand All @@ -733,7 +737,13 @@ static int intel_pmu_handle_irq(struct pt_regs *regs, int nmi)
return 0;
}

loops = 0;
again:
if (++loops > 100) {
WARN_ONCE(1, "perfcounters: irq loop stuck!\n");
return 1;
}

inc_irq_stat(apic_perf_irqs);
ack = status;
for_each_bit(bit, (unsigned long *)&status, X86_PMC_IDX_MAX) {
Expand Down Expand Up @@ -765,13 +775,14 @@ static int intel_pmu_handle_irq(struct pt_regs *regs, int nmi)

static int amd_pmu_handle_irq(struct pt_regs *regs, int nmi)
{
int cpu = smp_processor_id();
struct cpu_hw_counters *cpuc = &per_cpu(cpu_hw_counters, cpu);
u64 val;
int handled = 0;
int cpu, idx, throttle = 0, handled = 0;
struct cpu_hw_counters *cpuc;
struct perf_counter *counter;
struct hw_perf_counter *hwc;
int idx, throttle = 0;
u64 val;

cpu = smp_processor_id();
cpuc = &per_cpu(cpu_hw_counters, cpu);

if (++cpuc->interrupts == PERFMON_MAX_INTERRUPTS) {
throttle = 1;
Expand Down

0 comments on commit e4fe9c6

Please sign in to comment.