--- linux-2.6.16-rc5-perfop/arch/ia64/oprofile/perfmon.c.ia64chg 2006-03-13 10:56:30.000000000 -0500 +++ linux-2.6.16-rc5-perfop/arch/ia64/oprofile/perfmon.c 2006-03-13 12:31:48.000000000 -0500 @@ -8,22 +8,27 @@ */ #include +#include #include #include #include -#include +#include #include #include static int allow_ints; static int -perfmon_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, - struct pt_regs *regs, unsigned long stamp) +perfmon_handler(void *buf, struct pfm_ovfl_arg *arg, + unsigned long ip, u64 stamp, void *data) { int event = arg->pmd_eventid; - arg->ovfl_ctrl.bits.reset_ovfl_pmds = 1; + /* FIXME: oprofile_add_sample expect to have + struct pt_regs * const regs */ + struct pt_regs * const regs = (struct pt_regs *) data; + + arg->ovfl_ctrl = PFM_OVFL_CTRL_RESET; /* the owner of the oprofile event buffer may have exited * without perfmon being shutdown (e.g. SIGSEGV) @@ -54,6 +59,7 @@ .fmt_name = "oprofile_format", .fmt_uuid = OPROFILE_FMT_UUID, .fmt_handler = perfmon_handler, + .owner = THIS_MODULE, }; @@ -76,9 +82,9 @@ static int using_perfmon; -int perfmon_init(struct oprofile_operations * ops) +int __init op_perfmon_init(struct oprofile_operations * ops) { - int ret = pfm_register_buffer_fmt(&oprofile_fmt); + int ret = pfm_register_smpl_fmt(&oprofile_fmt); if (ret) return -ENODEV; @@ -91,10 +97,10 @@ } -void perfmon_exit(void) +void __exit op_perfmon_exit(void) { if (!using_perfmon) return; - pfm_unregister_buffer_fmt(oprofile_fmt.fmt_uuid); + pfm_unregister_smpl_fmt(oprofile_fmt.fmt_uuid); } --- linux-2.6.16-rc5-perfop/arch/ia64/oprofile/init.c.ia64chg 2006-03-13 11:02:19.000000000 -0500 +++ linux-2.6.16-rc5-perfop/arch/ia64/oprofile/init.c 2006-03-13 11:03:09.000000000 -0500 @@ -12,8 +12,8 @@ #include #include -extern int perfmon_init(struct oprofile_operations * ops); -extern void perfmon_exit(void); +extern int op_perfmon_init(struct oprofile_operations * ops); +extern void op_perfmon_exit(void); extern void ia64_backtrace(struct pt_regs * const regs, unsigned int depth); int __init oprofile_arch_init(struct oprofile_operations * ops) @@ -22,7 +22,7 @@ #ifdef CONFIG_PERFMON /* perfmon_init() can fail, but we have no way to report it */ - ret = perfmon_init(ops); + ret = op_perfmon_init(ops); #endif ops->backtrace = ia64_backtrace; @@ -33,6 +33,6 @@ void oprofile_arch_exit(void) { #ifdef CONFIG_PERFMON - perfmon_exit(); + op_perfmon_exit(); #endif }