diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 13:48:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 13:48:59 -0400 |
commit | 99bc47067910f7070e65ee318a6dd79a2371f1e5 (patch) | |
tree | d24941285af868b0392a327360ae260a8f50caf1 /arch/sparc/kernel/pcr.c | |
parent | d7e9660ad9d5e0845f52848bce31bcf5cdcdea6b (diff) | |
parent | cabc5c0f7fa1342049042d6e147db5a73773955b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6: (21 commits)
sparc64: Initial niagara2 perf counter support.
sparc64: Perf counter 'nop' event is not constant.
sparc64: Provide a way to specify a perf counter overflow IRQ enable bit.
sparc64: Provide hypervisor tracing bit support for perf counters.
sparc64: Initial hw perf counter support.
sparc64: Implement a real set_perf_counter_pending().
sparc64: Use nmi_enter() and nmi_exit(), as needed.
sparc64: Provide extern decls for sparc_??u_type strings.
sparc64: Make touch_nmi_watchdog() actually work.
sparc64: Kill unnecessary cast in profile_timer_exceptions_notify().
sparc64: Manage NMI watchdog enabling like x86.
sparc: add basic support for 'perf'
sparc: convert /proc/io_map, /proc/dvma_map to seq_file
sparc, leon: sparc-leon specific SRMMU initialization and bootup fixes.
sparc,leon: Added support for AMBAPP bus.
sparc,leon: Introduce the sparc-leon CPU type.
sparc,leon: Redefine MMU register access asi if CONFIG_LEON
sparc,leon: CONFIG_SPARC_LEON option and leon specific files.
sparc64: cheaper asm/uaccess.h inclusion
SPARC: fix duplicate declaration
...
Diffstat (limited to 'arch/sparc/kernel/pcr.c')
-rw-r--r-- | arch/sparc/kernel/pcr.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/sparc/kernel/pcr.c b/arch/sparc/kernel/pcr.c index 1ae8cdd7e703..68ff00107073 100644 --- a/arch/sparc/kernel/pcr.c +++ b/arch/sparc/kernel/pcr.c | |||
@@ -7,6 +7,8 @@ | |||
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/irq.h> | 8 | #include <linux/irq.h> |
9 | 9 | ||
10 | #include <linux/perf_counter.h> | ||
11 | |||
10 | #include <asm/pil.h> | 12 | #include <asm/pil.h> |
11 | #include <asm/pcr.h> | 13 | #include <asm/pcr.h> |
12 | #include <asm/nmi.h> | 14 | #include <asm/nmi.h> |
@@ -34,10 +36,20 @@ unsigned int picl_shift; | |||
34 | */ | 36 | */ |
35 | void deferred_pcr_work_irq(int irq, struct pt_regs *regs) | 37 | void deferred_pcr_work_irq(int irq, struct pt_regs *regs) |
36 | { | 38 | { |
39 | struct pt_regs *old_regs; | ||
40 | |||
37 | clear_softint(1 << PIL_DEFERRED_PCR_WORK); | 41 | clear_softint(1 << PIL_DEFERRED_PCR_WORK); |
42 | |||
43 | old_regs = set_irq_regs(regs); | ||
44 | irq_enter(); | ||
45 | #ifdef CONFIG_PERF_COUNTERS | ||
46 | perf_counter_do_pending(); | ||
47 | #endif | ||
48 | irq_exit(); | ||
49 | set_irq_regs(old_regs); | ||
38 | } | 50 | } |
39 | 51 | ||
40 | void schedule_deferred_pcr_work(void) | 52 | void set_perf_counter_pending(void) |
41 | { | 53 | { |
42 | set_softint(1 << PIL_DEFERRED_PCR_WORK); | 54 | set_softint(1 << PIL_DEFERRED_PCR_WORK); |
43 | } | 55 | } |