diff options
author | Don Zickus <dzickus@redhat.com> | 2006-09-26 04:52:26 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:26 -0400 |
commit | 828f0afda123a96ff4e8078f057a302f4b4232ae (patch) | |
tree | a6f7398e0037f5c8f4cbd95ff11c5e4bf78a4c4d /include | |
parent | b07f8915cda3fcd73b8b68075ba1e6cd0673365d (diff) |
[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>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-i386/nmi.h | 7 | ||||
-rw-r--r-- | include/asm-x86_64/nmi.h | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/asm-i386/nmi.h b/include/asm-i386/nmi.h index 67d994799999..27fc9e6f630e 100644 --- a/include/asm-i386/nmi.h +++ b/include/asm-i386/nmi.h | |||
@@ -25,6 +25,13 @@ void set_nmi_callback(nmi_callback_t callback); | |||
25 | */ | 25 | */ |
26 | void unset_nmi_callback(void); | 26 | void unset_nmi_callback(void); |
27 | 27 | ||
28 | extern int avail_to_resrv_perfctr_nmi_bit(unsigned int); | ||
29 | extern int avail_to_resrv_perfctr_nmi(unsigned int); | ||
30 | extern int reserve_perfctr_nmi(unsigned int); | ||
31 | extern void release_perfctr_nmi(unsigned int); | ||
32 | extern int reserve_evntsel_nmi(unsigned int); | ||
33 | extern void release_evntsel_nmi(unsigned int); | ||
34 | |||
28 | extern void setup_apic_nmi_watchdog (void); | 35 | extern void setup_apic_nmi_watchdog (void); |
29 | extern int reserve_lapic_nmi(void); | 36 | extern int reserve_lapic_nmi(void); |
30 | extern void release_lapic_nmi(void); | 37 | extern void release_lapic_nmi(void); |
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index efb45c894d76..62a784cb8f0c 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -56,7 +56,13 @@ extern int panic_on_timeout; | |||
56 | extern int unknown_nmi_panic; | 56 | extern int unknown_nmi_panic; |
57 | 57 | ||
58 | extern int check_nmi_watchdog(void); | 58 | extern int check_nmi_watchdog(void); |
59 | 59 | extern int avail_to_resrv_perfctr_nmi_bit(unsigned int); | |
60 | extern int avail_to_resrv_perfctr_nmi(unsigned int); | ||
61 | extern int reserve_perfctr_nmi(unsigned int); | ||
62 | extern void release_perfctr_nmi(unsigned int); | ||
63 | extern int reserve_evntsel_nmi(unsigned int); | ||
64 | extern void release_evntsel_nmi(unsigned int); | ||
65 | |||
60 | extern void setup_apic_nmi_watchdog (void); | 66 | extern void setup_apic_nmi_watchdog (void); |
61 | extern int reserve_lapic_nmi(void); | 67 | extern int reserve_lapic_nmi(void); |
62 | extern void release_lapic_nmi(void); | 68 | extern void release_lapic_nmi(void); |