From b086cc70b5b65e632b3cde83fd85a9beeda5e34e Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Fri, 17 Aug 2012 10:55:51 -0400 Subject: [PATCH] xen/oprofile: Expose the oprofile_arch_exit_fnc pointer. Otherwise during rmmod of oprofile it would oops b/c the generic oprofile_arch_exit had never been called. Signed-off-by: Konrad Rzeszutek Wilk Conflicts: drivers/oprofile/oprof.c --- drivers/oprofile/oprof.c | 9 +++++---- include/xen/xenoprof.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c index b97bf9577c47..b48012579433 100644 --- a/drivers/oprofile/oprof.c +++ b/drivers/oprofile/oprof.c @@ -24,8 +24,8 @@ #ifdef CONFIG_XEN #include -#include #endif +#include struct oprofile_operations oprofile_ops; @@ -273,11 +273,12 @@ int oprofile_set_ulong(unsigned long *addr, unsigned long val) return err; } +int (*oprofile_arch_init_func)(struct oprofile_operations * ops); +void (*oprofile_arch_exit_func)(void); + static int __init oprofile_init(void) { int err; - int (*oprofile_arch_init_func)(struct oprofile_operations * ops); - void (*oprofile_arch_exit_func)(void); if (xen_pv_domain()) { oprofile_arch_init_func = xenoprofile_init; @@ -303,7 +304,7 @@ static void __exit oprofile_exit(void) { oprofile_timer_exit(); oprofilefs_unregister(); - oprofile_arch_exit(); + oprofile_arch_exit_func(); } diff --git a/include/xen/xenoprof.h b/include/xen/xenoprof.h index 3bc0d40f2b34..89fb8d3b3a88 100644 --- a/include/xen/xenoprof.h +++ b/include/xen/xenoprof.h @@ -22,8 +22,8 @@ #ifndef __XEN_XENOPROF_H__ #define __XEN_XENOPROF_H__ -#ifdef CONFIG_XEN +#ifdef CONFIG_XEN #if defined(CONFIG_X86) || defined(CONFIG_X86_64) /* xenoprof x86 specific */ struct super_block; -- 2.50.1