Nicholas Flintham | 1e3d311 | 2013-04-10 10:48:38 +0100 | [diff] [blame^] | 1 | /* Copyright (c) 2010, Code Aurora Forum. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | |
| 14 | #include <linux/module.h> |
| 15 | #include <linux/module.h> |
| 16 | #include <linux/init.h> |
| 17 | #include <linux/sched.h> |
| 18 | #include <linux/sysrq.h> |
| 19 | #include <linux/time.h> |
| 20 | #include "linux/proc_fs.h" |
| 21 | #include "linux/kernel_stat.h" |
| 22 | #include "asm/uaccess.h" |
| 23 | #include <linux/proc_fs.h> |
| 24 | #include "cp15_registers.h" |
| 25 | #include <asm/perftypes.h> |
| 26 | #include "perf.h" |
| 27 | |
| 28 | VPVF pp_interrupt_out_ptr; |
| 29 | VPVF pp_interrupt_in_ptr; |
| 30 | VPULF pp_process_remove_ptr; |
| 31 | unsigned int pp_loaded; |
| 32 | EXPORT_SYMBOL(pp_loaded); |
| 33 | atomic_t pm_op_lock; |
| 34 | EXPORT_SYMBOL(pm_op_lock); |
| 35 | |
| 36 | void perf_mon_interrupt_out(void) |
| 37 | { |
| 38 | if (pp_loaded) |
| 39 | (*pp_interrupt_out_ptr)(); |
| 40 | } |
| 41 | EXPORT_SYMBOL(pp_interrupt_out_ptr); |
| 42 | |
| 43 | void perf_mon_interrupt_in(void) |
| 44 | { |
| 45 | if (pp_loaded) |
| 46 | (*pp_interrupt_in_ptr)(); |
| 47 | } |
| 48 | EXPORT_SYMBOL(pp_interrupt_in_ptr); |
| 49 | |
| 50 | void per_process_remove(unsigned long pid) |
| 51 | { |
| 52 | if (pp_loaded) |
| 53 | (*pp_process_remove_ptr)(pid); |
| 54 | } |
| 55 | EXPORT_SYMBOL(pp_process_remove_ptr); |