diff options
author | Stephane Eranian <eranian@hpl.hp.com> | 2005-04-25 16:08:30 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-04-25 16:08:30 -0400 |
commit | 4944930ab748942e41ea4dc313fcb0946aee3f17 (patch) | |
tree | 5d23e420c0d7f4387237028ca2dca1ec97f59861 /arch/ia64/kernel/perfmon_default_smpl.c | |
parent | 658b32cad9ae087bd34f35a925fd75b76d663d4e (diff) |
[IA64] perfmon: make pfm_sysctl a global, and other cleanup
- make pfm_sysctl a global such that it is possible
to enable/disable debug printk in sampling formats
using PFM_DEBUG.
- remove unused pfm_debug_var variable
- fix a bug in pfm_handle_work where an BUG_ON() could
be triggered. There is a path where pfm_handle_work()
can be called with interrupts enabled, i.e., when
TIF_NEED_RESCHED is set. The fix correct the masking
and unmasking of interrupts in pfm_handle_work() such
that we restore the interrupt mask as it was upon entry.
signed-off-by: stephane eranian <eranian@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/perfmon_default_smpl.c')
-rw-r--r-- | arch/ia64/kernel/perfmon_default_smpl.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/arch/ia64/kernel/perfmon_default_smpl.c b/arch/ia64/kernel/perfmon_default_smpl.c index 965d29004555..344941db0a9e 100644 --- a/arch/ia64/kernel/perfmon_default_smpl.c +++ b/arch/ia64/kernel/perfmon_default_smpl.c | |||
@@ -20,24 +20,17 @@ MODULE_AUTHOR("Stephane Eranian <eranian@hpl.hp.com>"); | |||
20 | MODULE_DESCRIPTION("perfmon default sampling format"); | 20 | MODULE_DESCRIPTION("perfmon default sampling format"); |
21 | MODULE_LICENSE("GPL"); | 21 | MODULE_LICENSE("GPL"); |
22 | 22 | ||
23 | MODULE_PARM(debug, "i"); | ||
24 | MODULE_PARM_DESC(debug, "debug"); | ||
25 | |||
26 | MODULE_PARM(debug_ovfl, "i"); | ||
27 | MODULE_PARM_DESC(debug_ovfl, "debug ovfl"); | ||
28 | |||
29 | |||
30 | #define DEFAULT_DEBUG 1 | 23 | #define DEFAULT_DEBUG 1 |
31 | 24 | ||
32 | #ifdef DEFAULT_DEBUG | 25 | #ifdef DEFAULT_DEBUG |
33 | #define DPRINT(a) \ | 26 | #define DPRINT(a) \ |
34 | do { \ | 27 | do { \ |
35 | if (unlikely(debug >0)) { printk("%s.%d: CPU%d ", __FUNCTION__, __LINE__, smp_processor_id()); printk a; } \ | 28 | if (unlikely(pfm_sysctl.debug >0)) { printk("%s.%d: CPU%d ", __FUNCTION__, __LINE__, smp_processor_id()); printk a; } \ |
36 | } while (0) | 29 | } while (0) |
37 | 30 | ||
38 | #define DPRINT_ovfl(a) \ | 31 | #define DPRINT_ovfl(a) \ |
39 | do { \ | 32 | do { \ |
40 | if (unlikely(debug_ovfl >0)) { printk("%s.%d: CPU%d ", __FUNCTION__, __LINE__, smp_processor_id()); printk a; } \ | 33 | if (unlikely(pfm_sysctl.debug > 0 && pfm_sysctl.debug_ovfl >0)) { printk("%s.%d: CPU%d ", __FUNCTION__, __LINE__, smp_processor_id()); printk a; } \ |
41 | } while (0) | 34 | } while (0) |
42 | 35 | ||
43 | #else | 36 | #else |
@@ -45,8 +38,6 @@ MODULE_PARM_DESC(debug_ovfl, "debug ovfl"); | |||
45 | #define DPRINT_ovfl(a) | 38 | #define DPRINT_ovfl(a) |
46 | #endif | 39 | #endif |
47 | 40 | ||
48 | static int debug, debug_ovfl; | ||
49 | |||
50 | static int | 41 | static int |
51 | default_validate(struct task_struct *task, unsigned int flags, int cpu, void *data) | 42 | default_validate(struct task_struct *task, unsigned int flags, int cpu, void *data) |
52 | { | 43 | { |