Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334325
b: refs/heads/master
c: da4b62c
h: refs/heads/master
i:
  334323: 9a29703
v: v3
  • Loading branch information
Al Cooper authored and Ralf Baechle committed Oct 11, 2012
1 parent 8cd6853 commit 0e0f3ed
Show file tree
Hide file tree
Showing 6 changed files with 14 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: c5600b2dd9fc7318feddf69f127ca793437c714d
refs/heads/master: da4b62cd6762ce327f660c6e45c8d5a739197159
4 changes: 4 additions & 0 deletions trunk/arch/mips/include/asm/cpu-features.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,8 @@
#define cpu_hwrena_impl_bits 0
#endif

#ifndef cpu_has_perf_cntr_intr_bit
#define cpu_has_perf_cntr_intr_bit (cpu_data[0].options & MIPS_CPU_PCI)
#endif

#endif /* __ASM_CPU_FEATURES_H */
3 changes: 2 additions & 1 deletion trunk/arch/mips/include/asm/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ enum cpu_type_enum {
#define MIPS_CPU_VINT 0x00080000 /* CPU supports MIPSR2 vectored interrupts */
#define MIPS_CPU_VEIC 0x00100000 /* CPU supports MIPSR2 external interrupt controller mode */
#define MIPS_CPU_ULRI 0x00200000 /* CPU has ULRI feature */
#define MIPS_CPU_RIXI 0x00400000 /* CPU has TLB Read/eXec Inhibit */
#define MIPS_CPU_PCI 0x00400000 /* CPU has Perf Ctr Int indicator */
#define MIPS_CPU_RIXI 0x00800000 /* CPU has TLB Read/eXec Inhibit */

/*
* CPU ASE encodings
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/mips/include/asm/mipsregs.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@
#define CAUSEF_IP7 (_ULCAST_(1) << 15)
#define CAUSEB_IV 23
#define CAUSEF_IV (_ULCAST_(1) << 23)
#define CAUSEB_PCI 26
#define CAUSEF_PCI (_ULCAST_(1) << 26)
#define CAUSEB_CE 28
#define CAUSEF_CE (_ULCAST_(3) << 28)
#define CAUSEB_TI 30
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/mips/kernel/cpu-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1194,8 +1194,11 @@ __cpuinit void cpu_probe(void)
}
}

if (cpu_has_mips_r2)
if (cpu_has_mips_r2) {
c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1;
/* R2 has Performance Counter Interrupt indicator */
c->options |= MIPS_CPU_PCI;
}
else
c->srsets = 1;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/perf_event_mipsxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ static int mipsxx_pmu_handle_shared_irq(void)
int handled = IRQ_NONE;
struct pt_regs *regs;

if (cpu_has_mips_r2 && !(read_c0_cause() & (1 << 26)))
if (cpu_has_perf_cntr_intr_bit && !(read_c0_cause() & CAUSEF_PCI))
return handled;
/*
* First we pause the local counters, so that when we are locked
Expand Down

0 comments on commit 0e0f3ed

Please sign in to comment.