summaryrefslogtreecommitdiffstats
path: root/arch/x86/oprofile
Commit message (Collapse)AuthorAgeFilesLines
* x86/oprofile: reordering IBS code in op_model_amd.cRobert Richter2008-12-101-13/+13
| | | | | | This is part of the cpu buffer rework. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: whitspace changes onlyRobert Richter2008-12-101-2/+2
| | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: comment cleanupRobert Richter2008-12-101-15/+16
| | | | | | This fixes the coding style of some comments. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: fix an overflow in ppro codeEric Dumazet2008-11-171-1/+1
| | | | | | | | | | | | | reset_value was changed from long to u64 in commit b99170288421c79f0c2efa8b33e26e65f4bb7fb8 (oprofile: Implement Intel architectural perfmon support) But dynamic allocation of this array use a wrong type (long instead of u64) Cc: Andi Kleen <ak@linux.intel.com> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: Fix p6 counter overflow checkAndi Kleen2008-11-071-5/+4Star
| | | | | | | | | | | Fix the counter overflow check for CPUs with counter width > 32 I had a similar change in a different patch that I didn't submit and I didn't notice the problem earlier because it was always tested together. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: fixing whitespaces in arch/x86/oprofile/*Robert Richter2008-10-162-11/+10Star
| | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* Merge branch 'oprofile/x86-oprofile-for-tip' into oprofile/oprofile-for-tipRobert Richter2008-10-153-35/+108
|\ | | | | | | | | Conflicts: arch/x86/oprofile/op_model_ppro.c
| * oprofile: discover counters for op ppro tooAndi Kleen2008-10-132-4/+6
| | | | | | | | | | | | | | | | Discover number of counters for all family 6 models even when not in arch perfmon mode. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
| * oprofile: Implement Intel architectural perfmon supportAndi Kleen2008-10-133-28/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer Intel CPUs (Core1+) have support for architectural events described in CPUID 0xA. See the IA32 SDM Vol3b.18 for details. The advantage of this is that it can be done without knowing about the specific CPU, because the CPU describes by itself what performance events are supported. This is only a fallback because only a limited set of 6 events are supported. This allows to do profiling on Nehalem and on Atom systems (later not tested) This patch implements support for that in oprofile's Intel Family 6 profiling module. It also has the advantage of supporting an arbitary number of events now as reported by the CPU. Also allow arbitary counter widths >32bit while we're at it. Requires a patched oprofile userland to support the new architecture. v2: update for latest oprofile tree remove force_arch_perfmon Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
| * oprofile: Don't report Nehalem as core_2Andi Kleen2008-10-131-3/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | This essentially reverts Linus' earlier 4b9f12a3779c548b68bc9af7d94030868ad3aa1b commit. Nehalem is not core_2, so it shouldn't be reported as such. However with the earlier arch perfmon patch it will fall back to arch perfmon mode now, so there is no need to fake it as core_2. The only drawback is that Linus will need to patch the arch perfmon support into his oprofile binary now, but I think he can do that. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
| * oprofile: drop const in num counters fieldAndi Kleen2008-10-131-2/+2
| | | | | | | | | | | | | | allow to modify it at runtime Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
* | x86/oprofile: add the logic for enabling additional IBS bitsSuravee Suthikulpanit2008-10-151-2/+5
| | | | | | | | | | | | | | | | | | This patch adds the logic for enabling additional IBS control bits : * IBS-Fetch IbsRandEn bit (bit 57) * IBS-Op IbsOpCntCtl bit (bit 19) Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
* | x86/oprofile: reordering functions in nmi_int.cRobert Richter2008-10-151-76/+71Star
| | | | | | | | | | | | | | No functional changes. The intension is to remove static function declarations. Signed-off-by: Robert Richter <robert.richter@amd.com>
* | oprofile: more whitespace fixesRobert Richter2008-10-153-6/+6
| | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* | oprofile: whitespace fixesRobert Richter2008-10-153-34/+34
| | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* | OProfile: Rename IBS sysfs dir into "ibs_op"Robert Richter2008-10-151-1/+1
| | | | | | | | | | | | The new name is now more close to those used in the spec. Signed-off-by: Robert Richter <robert.richter@amd.com>
* | OProfile: Rework string handling in setup_ibs_files()Robert Richter2008-10-151-12/+11Star
| | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* | OProfile: Rework oprofile_add_ibs_sample() functionRobert Richter2008-10-151-2/+3
|/ | | | | | Code looks much more cleaner now. Signed-off-by: Robert Richter <robert.richter@amd.com>
* Merge branch 'oprofile-for-tip' of ↵Ingo Molnar2008-09-306-148/+40Star
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into oprofile Conflicts: arch/x86/oprofile/nmi_int.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * Merge commit 'v2.6.27-rc5' into tip/oprofileRobert Richter2008-09-241-3/+36
| |\ | | | | | | | | | | | | Conflicts: arch/x86/oprofile/nmi_int.c
| * | Revert "Oprofile Multiplexing Patch"Robert Richter2008-09-246-149/+39Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reverting commit 1a960b402a51d80abf54e3f8e4972374ffe5f22d for the main branch. Multiplexing will be tracked on a separate feature branch. Conflicts: arch/x86/oprofile/nmi_int.c
* | | Merge commit 'v2.6.27-rc8' into oprofileIngo Molnar2008-09-301-6/+39
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Conflicts: arch/x86/oprofile/nmi_int.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * | x86, oprofile: BUG scheduling while atomicAndrea Righi2008-09-221-1/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nmi_shutdown() calls unregister_die_notifier() from an atomic context after setting preempt_disable() via get_cpu_var(): [ 1049.404154] BUG: scheduling while atomic: oprofiled/7796/0x00000002 [ 1049.404171] INFO: lockdep is turned off. [ 1049.404176] Modules linked in: oprofile af_packet rfcomm l2cap kvm_intel kvm i915 drm acpi_cpufreq cpufreq_userspace cpufreq_conservative cpufreq_ondemand cpufreq_powersave freq_table container sbs sbshc dm_mod arc4 ecb cryptomgr aead snd_hda_intel crypto_blkcipher snd_pcm_oss crypto_algapi snd_pcm iwlagn iwlcore snd_timer iTCO_wdt led_class btusb iTCO_vendor_support snd psmouse bluetooth mac80211 soundcore cfg80211 snd_page_alloc intel_agp video output button battery ac dcdbas evdev ext3 jbd mbcache sg sd_mod piix ata_piix libata scsi_mod dock tg3 libphy ehci_hcd uhci_hcd usbcore thermal processor fan fuse [ 1049.404362] Pid: 7796, comm: oprofiled Not tainted 2.6.27-rc5-mm1 #30 [ 1049.404368] Call Trace: [ 1049.404384] [<ffffffff804769fd>] thread_return+0x4a0/0x7d3 [ 1049.404396] [<ffffffff8026ad92>] generic_exec_single+0x52/0xe0 [ 1049.404405] [<ffffffff8026ae1a>] generic_exec_single+0xda/0xe0 [ 1049.404414] [<ffffffff8026aee3>] smp_call_function_single+0x73/0x150 [ 1049.404423] [<ffffffff804770c5>] schedule_timeout+0x95/0xd0 [ 1049.404430] [<ffffffff80476083>] wait_for_common+0x43/0x180 [ 1049.404438] [<ffffffff80476154>] wait_for_common+0x114/0x180 [ 1049.404448] [<ffffffff80236980>] default_wake_function+0x0/0x10 [ 1049.404457] [<ffffffff8024f810>] synchronize_rcu+0x30/0x40 [ 1049.404463] [<ffffffff8024f890>] wakeme_after_rcu+0x0/0x10 [ 1049.404472] [<ffffffff80479ca0>] _spin_unlock_irqrestore+0x40/0x80 [ 1049.404482] [<ffffffff80256def>] atomic_notifier_chain_unregister+0x3f/0x60 [ 1049.404501] [<ffffffffa03d8801>] nmi_shutdown+0x51/0x90 [oprofile] [ 1049.404517] [<ffffffffa03d6134>] oprofile_shutdown+0x34/0x70 [oprofile] [ 1049.404532] [<ffffffffa03d721e>] event_buffer_release+0xe/0x40 [oprofile] [ 1049.404543] [<ffffffff802bdcdd>] __fput+0xcd/0x240 [ 1049.404551] [<ffffffff802baa74>] filp_close+0x54/0x90 [ 1049.404560] [<ffffffff8023e1d1>] put_files_struct+0xb1/0xd0 [ 1049.404568] [<ffffffff8023f82f>] do_exit+0x18f/0x930 [ 1049.404576] [<ffffffff8020be03>] restore_args+0x0/0x30 [ 1049.404584] [<ffffffff80240006>] do_group_exit+0x36/0xa0 [ 1049.404592] [<ffffffff8020b7cb>] system_call_fastpath+0x16/0x1b This can be easily triggered with 'opcontrol --shutdown'. Simply move get_cpu_var() above unregister_die_notifier(). Signed-off-by: Andrea Righi <righi.andrea@gmail.com> Acked-by: Robert Richter <robert.richter@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * x86: fix oprofile + hibernation badnessAndi Kleen2008-08-201-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vegard Nossum reported oprofile + hibernation problems: > Now some warnings: > > ------------[ cut here ]------------ > WARNING: at /uio/arkimedes/s29/vegardno/git-working/linux-2.6/kernel/smp.c:328 s > mp_call_function_mask+0x194/0x1a0() The usual problem: the suspend function when interrupts are already disabled calls smp_call_function which is not allowed with interrupt off. But at this point all the other CPUs should be already down anyways, so it should be enough to just drop that. This patch should fix that problem at least by fixing cpu hotplug& suspend support. [ mingo@elte.hu: fixed 5 coding style errors. ] Signed-off-by: Andi Kleen <ak@linux.intel.com> Tested-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86, oprofile: BUG: using smp_processor_id() in preemptible codeAndrea Righi2008-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add __raw access before setting per cpu variable switch_index, to avoid the following BUG: [ 449.166827] BUG: using smp_processor_id() in preemptible [00000000] code: modprobe/6998 [ 449.166848] caller is op_nmi_init+0xf0/0x2b0 [oprofile] [ 449.166855] Pid: 6998, comm: modprobe Not tainted 2.6.27-rc5-mm1 #29 [ 449.166860] Call Trace: [ 449.166872] [<ffffffff80362d67>] debug_smp_processor_id+0xd7/0xe0 [ 449.166887] [<ffffffffa00181c0>] op_nmi_init+0xf0/0x2b0 [oprofile] [ 449.166902] [<ffffffffa0018000>] oprofile_init+0x0/0x60 [oprofile] [ 449.166915] [<ffffffffa00180a9>] oprofile_arch_init+0x9/0x30 [oprofile] [ 449.166928] [<ffffffffa001801e>] oprofile_init+0x1e/0x60 [oprofile] [ 449.166937] [<ffffffff8020903b>] _stext+0x3b/0x160 [ 449.166946] [<ffffffff80477985>] __mutex_unlock_slowpath+0xe5/0x190 [ 449.166955] [<ffffffff80262c1a>] trace_hardirqs_on_caller+0xca/0x140 [ 449.166965] [<ffffffff8026f7fc>] sys_init_module+0xdc/0x210 [ 449.166972] [<ffffffff8020b7cb>] system_call_fastpath+0x16/0x1b Signed-off-by: Andrea Righi <righi.andrea@gmail.com> Acked-by: Robert Richter <robert.richter@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | Merge branch 'x86/oprofile' into oprofileIngo Molnar2008-08-191-88/+87Star
|\ \
| * | x86: Coding style fixes to arch/x86/oprofile/op_model_p4.cPaolo Ciarrocchi2008-08-191-88/+87Star
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A coding style patch to arch/x86/oprofile/op_model_p4.c that removes 87 errors and 4 warnings. Before: total: 89 errors, 13 warnings, 722 lines checked After: total: 2 errors, 9 warnings, 721 lines checked Compile tested, binary verified as follow: paolo@paolo-desktop:~/linux.trees.git$ size /tmp/op_model_p4.o.* text data bss dec hex filename 2691 968 32 3691 e6b /tmp/op_model_p4.o.after 2691 968 32 3691 e6b /tmp/op_model_p4.o.before paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/op_model_p4.o.* 8c1c9823bab33333e1f7f76574e62561 /tmp/op_model_p4.o.after 8c1c9823bab33333e1f7f76574e62561 /tmp/op_model_p4.o.before Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Cc: robert.richter@amd.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86/oprofile: fix on_each_cpu build errorRobert Richter2008-07-261-1/+1
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Jason Yeh <jason.yeh@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | Oprofile Multiplexing PatchJason Yeh2008-07-266-39/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces multiplexing support for the Oprofile kernel module. It basically adds a new function pointer in oprofile_operator allowing each architecture to supply its callback to switch between different sets of event when the timer expires. Userspace tools can modify the time slice through /dev/oprofile/time_slice. It also modifies the number of counters exposed to the userspace through /dev/oprofile. For example, the number of counters for AMD CPUs are changed to 32 and multiplexed in the sets of 4. Signed-off-by: Jason Yeh <jason.yeh@amd.com> Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86/oprofile: reanaming op_model_athlon.c to op_model_amd.cRobert Richter2008-07-262-2/+2
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86/oprofile: add CONFIG_OPROFILE_IBS optionRobert Richter2008-07-261-10/+23
| | | | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Robert Richter <robert.richter@amd.com> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86/oprofile: op_model_athlon.c: fix counter reset when reenabling IBS OPRobert Richter2008-07-261-0/+1
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86/oprofile: macro definition cleanup in op_model_athlon.cRobert Richter2008-07-261-29/+17Star
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | OProfile: fix IBS build error for UPRobert Richter2008-07-261-0/+22
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | OProfile: enable IBS for AMD CPUsRobert Richter2008-07-262-7/+25
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | OProfile: fix setup_ibs_files() function interfaceRobert Richter2008-07-261-2/+4
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | OProfile: on_each_cpu(): kill unused retry parameterRobert Richter2008-07-261-2/+2
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | OProfile: Fix build error in op_model_athlon.cRobert Richter2008-07-261-0/+5
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | OProfile: change IBS interrupt initializationRobert Richter2008-07-261-30/+54
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86/oprofile: separating the IBS handlerRobert Richter2008-07-261-17/+28
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86/oprofile: add IBS support for AMD CPUs, model specific codeBarry Kasindorf2008-07-261-0/+257
| | | | | | | | | | | | | | | | | | | | This patchset supports the new profiling hardware available in the latest AMD CPUs in the oProfile driver. Signed-off-by: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86/oprofile: renaming athlon_*() into op_amd_*()Robert Richter2008-07-263-19/+19
| | | | | | | | | | | | | | | | | | | | These functions contain code for all AMD CPUs. The new names fit better. Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86/oprofile: Minor changes in op_model_athlon.cRobert Richter2008-07-261-0/+2
| | | | | | | | | | | | | | Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Cc: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86/oprofile: introduce model specific init/exit functionsRobert Richter2008-07-263-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements model specific OProfile init/exit functions for x86 CPUs. Though there is more rework needed at the initialization code, this new introduced functions allow it to keep model specific code in the corresponding op_model_*.c files. The function interface is the same as for oprofile_arch_init/exit(). Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | oprofile: Add support for AMD Family 11hBarry Kasindorf2008-07-261-0/+4
|/ | | | | | | | | This patch add support for AMD Family 11h CPUs. Signed-off-by: Barry Kasindorf <barry.kasindorf@amd.com> Signed-off-by: Robert Richter <robert.richter@amd.com> Cc: oprofile-list <oprofile-list@lists.sourceforge.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86/oprofile/nmi_int: add Nehalem to list of ppro coresLinus Torvalds2008-07-251-11/+25
| | | | | | | | | ..otherwise oprofile will fall back on that poor timer interrupt. Also replace the unreadable chain of if-statements with a "switch()" statement instead. It generates better code, and is a lot clearer. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'generic-ipi' into generic-ipi-for-linusIngo Molnar2008-07-151-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/powerpc/Kconfig arch/s390/kernel/time.c arch/x86/kernel/apic_32.c arch/x86/kernel/cpu/perfctr-watchdog.c arch/x86/kernel/i8259_64.c arch/x86/kernel/ldt.c arch/x86/kernel/nmi_64.c arch/x86/kernel/smpboot.c arch/x86/xen/smp.c include/asm-x86/hw_irq_32.h include/asm-x86/hw_irq_64.h include/asm-x86/mach-default/irq_vectors.h include/asm-x86/mach-voyager/irq_vectors.h include/asm-x86/smp.h kernel/Makefile Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * on_each_cpu(): kill unused 'retry' parameterJens Axboe2008-06-261-5/+5
| | | | | | | | | | | | | | | | | | It's not even passed on to smp_call_function() anymore, since that was removed. So kill it. Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* | x86/oprofile: disable preemption in nmi_shutdownVegard Nossum2008-06-241-1/+2
|/ | | | | | | | | | | | | | | | | | | | fix: BUG: using smp_processor_id() in preemptible [00000000] code: oprofiled/27301 caller is nmi_shutdown+0x11/0x60 Pid: 27301, comm: oprofiled Not tainted 2.6.26-rc7 #25 [<c028a90d>] debug_smp_processor_id+0xbd/0xc0 [<c045fba1>] nmi_shutdown+0x11/0x60 [<c045dd4a>] oprofile_shutdown+0x2a/0x60 Note that we don't need this for the other functions, since they are all called with on_each_cpu() (which disables preemption for us anyway). Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Cc: Philippe Elie <phil.el@wanadoo.fr> Cc: oprofile-list@lists.sf.net Cc: Johannes Weiner <hannes@saeurebad.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* x86: oprofile: remove NR_CPUS arrays in arch/x86/oprofile/nmi_int.cMike Travis2008-04-191-22/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the following arrays sized by NR_CPUS to be PERCPU variables: static struct op_msrs cpu_msrs[NR_CPUS]; static unsigned long saved_lvtpc[NR_CPUS]; Also some minor complaints from checkpatch.pl fixed. Based on: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git All changes were transparent except for: static void nmi_shutdown(void) { + struct op_msrs *msrs = &__get_cpu_var(cpu_msrs); nmi_enabled = 0; on_each_cpu(nmi_cpu_shutdown, NULL, 0, 1); unregister_die_notifier(&profile_exceptions_nb); - model->shutdown(cpu_msrs); + model->shutdown(msrs); free_msrs(); } The existing code passed a reference to cpu 0's instance of struct op_msrs to model->shutdown, whilst the other functions are passed a reference to <this cpu's> instance of a struct op_msrs. This seemed to be a bug to me even though as long as cpu 0 and <this cpu> are of the same type it would have the same effect...? Cc: Philippe Elie <phil.el@wanadoo.fr> Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>