# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1164087487 -32400 # Node ID 7e4eac672ace7bdd7fd0b6dc4da97d3e329bd3b2 # Parent 7043f58fc99326a9c0a9f737681c0226239844cc update xenoprof linux side patch following Renato's comment. - __exit clean up - remove perfmon comments - compilation fix when CONFIG_OPROFILE=m with minor clean up - don't export xenoprof_is_primary. PATCHNAME: xenoprof_linux_side_update Signed-off-by: Isaku Yamahata diff -r 7043f58fc993 -r 7e4eac672ace linux-2.6-xen-sparse/arch/i386/oprofile/xenoprof.c --- a/linux-2.6-xen-sparse/arch/i386/oprofile/xenoprof.c Tue Nov 14 15:34:22 2006 +0900 +++ b/linux-2.6-xen-sparse/arch/i386/oprofile/xenoprof.c Tue Nov 21 14:38:07 2006 +0900 @@ -173,7 +173,7 @@ int __init oprofile_arch_init(struct opr return xenoprofile_init(ops); } -void __exit oprofile_arch_exit(void) +void oprofile_arch_exit(void) { xenoprofile_exit(); } diff -r 7043f58fc993 -r 7e4eac672ace linux-2.6-xen-sparse/drivers/xen/xenoprof/xenoprofile.c --- a/linux-2.6-xen-sparse/drivers/xen/xenoprof/xenoprofile.c Tue Nov 14 15:34:22 2006 +0900 +++ b/linux-2.6-xen-sparse/drivers/xen/xenoprof/xenoprofile.c Tue Nov 21 14:38:07 2006 +0900 @@ -48,7 +48,7 @@ static void xenoprof_stop(void); static void xenoprof_stop(void); static int xenoprof_enabled = 0; -int xenoprof_is_primary = 0; +static int xenoprof_is_primary = 0; static int active_defined; /* Number of buffers in shared area (one per VCPU) */ @@ -98,7 +98,7 @@ static int __init init_driverfs(void) } -static void /* __exit */ exit_driverfs(void) +static void exit_driverfs(void) { sysdev_unregister(&device_oprofile); sysdev_class_unregister(&oprofile_sysclass); diff -r 7043f58fc993 -r 7e4eac672ace linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/xenoprof.h --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/xenoprof.h Tue Nov 14 15:34:22 2006 +0900 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/xenoprof.h Tue Nov 21 14:38:07 2006 +0900 @@ -21,7 +21,7 @@ */ #ifndef __ASM_XENOPROF_H__ #define __ASM_XENOPROF_H__ -#ifdef CONFIG_OPROFILE +#ifdef CONFIG_XEN struct super_block; struct dentry; @@ -44,5 +44,5 @@ struct xenoprof_passive; struct xenoprof_passive; int xenoprof_arch_set_passive(struct xenoprof_passive* pdomain, struct xenoprof_shared_buffer* sbuf); -#endif /* CONFIG_OPROFILE */ +#endif /* CONFIG_XEN */ #endif /* __ASM_XENOPROF_H__ */ diff -r 7043f58fc993 -r 7e4eac672ace linux-2.6-xen-sparse/include/xen/xenoprof.h --- a/linux-2.6-xen-sparse/include/xen/xenoprof.h Tue Nov 14 15:34:22 2006 +0900 +++ b/linux-2.6-xen-sparse/include/xen/xenoprof.h Tue Nov 21 14:38:07 2006 +0900 @@ -22,25 +22,21 @@ #ifndef __XEN_XENOPROF_H__ #define __XEN_XENOPROF_H__ +#ifdef CONFIG_XEN -#ifdef CONFIG_OPROFILE #include struct oprofile_operations; int xenoprofile_init(struct oprofile_operations * ops); void xenoprofile_exit(void); -// for perfmon/xen -extern int xenoprof_is_primary; -#define is_xenoprof_primary() (xenoprof_is_primary) struct xenoprof_shared_buffer { char *buffer; struct xenoprof_arch_shared_buffer arch; }; #else -#define xenoprofile_init(ops) do { } while (0) +#define xenoprofile_init(ops) (-ENOSYS) #define xenoprofile_exit() do { } while (0) -#define is_xenoprof_primary() (0) -#endif /* CONFIG_OPROFILE */ +#endif /* CONFIG_XEN */ #endif /* __XEN_XENOPROF_H__ */