From: Ingo Molnar Date: Tue, 30 Sep 2008 10:16:26 +0000 (+0200) Subject: Merge commit 'v2.6.27-rc8' into oprofile X-Git-Tag: v2.6.28-rc1~35^2~16 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=59293c8ad54726150cf6178164311b004d615ce4;p=linux-2.6-omap-h63xx.git Merge commit 'v2.6.27-rc8' into oprofile Conflicts: arch/x86/oprofile/nmi_int.c Signed-off-by: Ingo Molnar --- 59293c8ad54726150cf6178164311b004d615ce4 diff --cc arch/x86/oprofile/nmi_int.c index 4108d02c529,8a5f1614a3d..114df508b40 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c @@@ -31,10 -29,8 +32,10 @@@ static DEFINE_PER_CPU(unsigned long, sa static int nmi_start(void); static void nmi_stop(void); + static void nmi_cpu_start(void *dummy); + static void nmi_cpu_stop(void *dummy); +static void nmi_cpu_save_mpx_registers(struct op_msrs *msrs); +static void nmi_cpu_restore_mpx_registers(struct op_msrs *msrs); - static void nmi_cpu_stop(void *dummy); - static void nmi_cpu_start(void *dummy); /* 0 == registered but off, 1 == registered and on */ static int nmi_enabled = 0; @@@ -550,8 -490,11 +576,11 @@@ int __init op_nmi_init(struct oprofile_ return -ENODEV; } - init_sysfs(); + #ifdef CONFIG_SMP + register_cpu_notifier(&oprofile_cpu_nb); + #endif - using_nmi = 1; + /* default values, can be overwritten by model */ + __raw_get_cpu_var(switch_index) = 0; ops->create_files = nmi_create_files; ops->setup = nmi_setup; ops->shutdown = nmi_shutdown; @@@ -573,8 -507,10 +602,12 @@@ void op_nmi_exit(void) { - if (using_nmi) + if (using_nmi) { exit_sysfs(); + #ifdef CONFIG_SMP + unregister_cpu_notifier(&oprofile_cpu_nb); + #endif + if (model->exit) + model->exit(); + } }