From: John L. <mov...@us...> - 2001-09-02 00:38:07
|
Update of /cvsroot/oprofile/oprofile In directory usw-pr-cvs1:/tmp/cvs-serv15911 Modified Files: ChangeLog oprofile.c Log Message: remove bogus code Index: ChangeLog =================================================================== RCS file: /cvsroot/oprofile/oprofile/ChangeLog,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- ChangeLog 2001/09/02 00:32:28 1.93 +++ ChangeLog 2001/09/02 00:38:04 1.94 @@ -1,3 +1,8 @@ +2001-09-02 John Levon <mo...@co...> + + * oprofile.c: remove bogus setting for NMI oopser. + smp_apic_restore() -> lvtpc_apic_restore() + 2001-09-01 Philippe Elie <ph...@cl...> * oprofile.c: fix pmc_setup() Index: oprofile.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/oprofile.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- oprofile.c 2001/09/02 00:32:28 1.77 +++ oprofile.c 2001/09/02 00:38:04 1.78 @@ -251,7 +251,7 @@ apic_write(APIC_LVTPC, val); } -static void __exit smp_apic_restore(void *dummy) +static void __exit lvtpc_apic_restore(void *dummy) { apic_write(APIC_LVTPC, old_lvtpc[smp_processor_id()]); } @@ -495,18 +495,6 @@ wrmsr(eventsel_msr[1], low, high); } #endif - - /* disable ctr1 if the UP oopser might be on, but we can't do anything - * interesting with the NMIs - */ - /* PHE FIXME ATHLON bugged if running 3/4 counters ?, I really don't - * understand when and why this is executed */ - /* this is pretty bogus really. especially as we don't re-enable it. - * Instead, save state set up, and restore with pmc_unsetup or similar */ -#if !defined(CONFIG_X86_UP_APIC) || !defined(OP_EXPORTED_DO_NMI) - /* PHE FIXME: on my config this start counter 1 with the new code */ -// wrmsr(eventsel_msr[1], low, high); -#endif } static void pmc_start(void *info) @@ -1235,6 +1223,9 @@ printk(KERN_INFO "%s\n", op_version); + /* FIXME: we should save out the old values for the pmcs, then put them back + * upon exit. This way the NMI oopser can work after unloading oprofile */ + smp_hardware = find_intel_smp(); if ((err = apic_setup())) @@ -1262,6 +1253,7 @@ /* do this now so we don't have to track save/restores later */ op_save_syscalls(); + printk("oprofile: oprofile loaded, major %u\n", op_major); return 0; @@ -1275,8 +1267,8 @@ { oprof_free_hashmap(); unregister_chrdev(op_major, "oprof"); - smp_call_function(smp_apic_restore, NULL, 0, 1); - smp_apic_restore(NULL); + smp_call_function(lvtpc_apic_restore, NULL, 0, 1); + lvtpc_apic_restore(NULL); cleanup_sysctl(); // currently no need to reset APIC state } |