| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /** | 
 | 2 |  * @file init.c | 
 | 3 |  * | 
 | 4 |  * @remark Copyright 2004 Oprofile Authors | 
 | 5 |  * @remark Read the file COPYING | 
 | 6 |  * | 
 | 7 |  * @author Zwane Mwaikambo | 
 | 8 |  */ | 
 | 9 |  | 
 | 10 | #include <linux/oprofile.h> | 
 | 11 | #include <linux/init.h> | 
 | 12 | #include <linux/errno.h> | 
 | 13 | #include "op_arm_model.h" | 
 | 14 |  | 
 | 15 | int __init oprofile_arch_init(struct oprofile_operations *ops) | 
 | 16 | { | 
 | 17 | 	int ret = -ENODEV; | 
 | 18 |  | 
 | 19 | #ifdef CONFIG_CPU_XSCALE | 
 | 20 | 	ret = pmu_init(ops, &op_xscale_spec); | 
 | 21 | #endif | 
 | 22 |  | 
| Richard Purdie | fa0ebff | 2005-06-28 21:01:03 +0100 | [diff] [blame] | 23 | 	ops->backtrace = arm_backtrace; | 
 | 24 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | 	return ret; | 
 | 26 | } | 
 | 27 |  | 
 | 28 | void oprofile_arch_exit(void) | 
 | 29 | { | 
 | 30 | #ifdef CONFIG_CPU_XSCALE | 
 | 31 | 	pmu_exit(); | 
 | 32 | #endif | 
 | 33 | } |