mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
[PATCH] x86: Add performance counter reservation framework for UP kernels
Adds basic infrastructure to allow subsystems to reserve performance counters on the x86 chips. Only UP kernels are supported in this patch to make reviewing easier. The SMP portion makes a lot more changes. Think of this as a locking mechanism where each bit represents a different counter. In addition, each subsystem should also reserve an appropriate event selection register that will correspond to the performance counter it will be using (this is mainly neccessary for the Pentium 4 chips as they break the 1:1 relationship to performance counters). This will help prevent subsystems like oprofile from interfering with the nmi watchdog. Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Andi Kleen <ak@suse.de>
This commit is contained in:
parent
b07f8915cd
commit
828f0afda1
4 changed files with 308 additions and 73 deletions
|
|
@ -25,6 +25,13 @@ void set_nmi_callback(nmi_callback_t callback);
|
|||
*/
|
||||
void unset_nmi_callback(void);
|
||||
|
||||
extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
|
||||
extern int avail_to_resrv_perfctr_nmi(unsigned int);
|
||||
extern int reserve_perfctr_nmi(unsigned int);
|
||||
extern void release_perfctr_nmi(unsigned int);
|
||||
extern int reserve_evntsel_nmi(unsigned int);
|
||||
extern void release_evntsel_nmi(unsigned int);
|
||||
|
||||
extern void setup_apic_nmi_watchdog (void);
|
||||
extern int reserve_lapic_nmi(void);
|
||||
extern void release_lapic_nmi(void);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,13 @@ extern int panic_on_timeout;
|
|||
extern int unknown_nmi_panic;
|
||||
|
||||
extern int check_nmi_watchdog(void);
|
||||
|
||||
extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
|
||||
extern int avail_to_resrv_perfctr_nmi(unsigned int);
|
||||
extern int reserve_perfctr_nmi(unsigned int);
|
||||
extern void release_perfctr_nmi(unsigned int);
|
||||
extern int reserve_evntsel_nmi(unsigned int);
|
||||
extern void release_evntsel_nmi(unsigned int);
|
||||
|
||||
extern void setup_apic_nmi_watchdog (void);
|
||||
extern int reserve_lapic_nmi(void);
|
||||
extern void release_lapic_nmi(void);
|
||||
|
|
|
|||
Loading…
Reference in a new issue