summaryrefslogtreecommitdiffstats
path: root/arch/x86/oprofile
Commit message (Collapse)AuthorAgeFilesLines
* x86/oprofile: rename kernel parameter for architectural perfmon to arch_perfmonRobert Richter2009-07-101-1/+1
| | | | | | | | | The short name of the achitecture is 'arch_perfmon'. This patch changes the kernel parameter to use this name. Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Robert Richter <robert.richter@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* Merge branch 'linus' into perfcounters/coreIngo Molnar2009-06-111-4/+23
|\ | | | | | | | | | | | | | | | | | | Conflicts: arch/x86/kernel/irqinit.c arch/x86/kernel/irqinit_64.c arch/x86/kernel/traps.c arch/x86/mm/fault.c include/linux/sched.h kernel/exit.c
| * Merge branch 'oprofile-for-linus' of ↵Linus Torvalds2009-06-101-4/+23
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'oprofile-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: oprofile: introduce module_param oprofile.cpu_type oprofile: add support for Core i7 and Atom oprofile: remove undocumented oprofile.p4force option oprofile: re-add force_arch_perfmon option
| | * oprofile: introduce module_param oprofile.cpu_typeRobert Richter2009-05-081-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes module_param oprofile.force_arch_perfmon and introduces oprofile.cpu_type=archperfmon instead. This new parameter can be reused for other models and architectures. Currently only archperfmon is supported. Cc: Andi Kleen <ak@linux.intel.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
| | * oprofile: add support for Core i7 and AtomAndi Kleen2009-05-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The registers are about the same as other Family 6 CPUs so we only need to add detection. I'm not completely happy with calling Nehalem Core i7 because there will be undoubtedly other Nehalem based CPUs in the future with different marketing names, but it's the best we got for now. Requires updated oprofile userland for the new event files. If you don't want to update right now you can also use oprofile.force_arch_perfmon=1 (added in the next patch) with 0.9.4 Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
| | * oprofile: remove undocumented oprofile.p4force optionAndi Kleen2009-05-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no new P4s and the oprofile code knows about all existing ones, so we don't really need the p4force option anymore. Remove it. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
| | * oprofile: re-add force_arch_perfmon optionAndi Kleen2009-05-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This re-adds the force_arch_perfmon option that was in the original arch perfmon patchkit. Originally this was rejected in favour of a generalized perfmon=name option, but it turned out implementing the later in a reliable way is hard (and it would have been easy to crash the kernel if a user gets it wrong) But now Atom and Core i7 support being readded a user would need to update their oprofile userland to beyond 0.9.4 to use oprofile again on Atom or Core i7. To avoid this problem readd the force_arch_perfmon option. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
* | | Merge branch 'linus' into perfcounters/coreIngo Molnar2009-06-011-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | Merge reason: merge almost-rc8 into perfcounters/core, which was -rc6 based - to pick up the latest upstream fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * | x86, 32-bit: fix kernel_trap_sp()Masami Hiramatsu2009-05-121-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use &regs->sp instead of regs for getting the top of stack in kernel mode. (on x86-64, regs->sp always points the top of stack) [ Impact: Oprofile decodes only stack for backtracing on i386 ] Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> [ v2: rename the API to kernel_stack_pointer(), move variable inside ] Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: systemtap@sources.redhat.com Cc: Harvey Harrison <harvey.harrison@gmail.com> Cc: Jan Blunck <jblunck@suse.de> Cc: Christoph Hellwig <hch@infradead.org> LKML-Reference: <20090511210300.17332.67549.stgit@localhost.localdomain> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | Merge branch 'linus' into perfcounters/core-v2Ingo Molnar2009-04-061-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge reason: we have gathered quite a few conflicts, need to merge upstream Conflicts: arch/powerpc/kernel/Makefile arch/x86/ia32/ia32entry.S arch/x86/include/asm/hardirq.h arch/x86/include/asm/unistd_32.h arch/x86/include/asm/unistd_64.h arch/x86/kernel/cpu/common.c arch/x86/kernel/irq.c arch/x86/kernel/syscall_table_32.S arch/x86/mm/iomap_32.c include/linux/sched.h kernel/Makefile Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * cpumask: x86: convert cpu_sibling_map/cpu_core_map to cpumask_var_tRusty Russell2009-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | Impact: reduce per-cpu size for CONFIG_CPUMASK_OFFSTACK=y In most places it's cleaner to use the accessors cpu_sibling_mask() and cpu_core_mask() wrappers which already exist. I couldn't avoid cleaning up the access in oprofile, either. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* | Merge commit 'v2.6.29-rc7' into perfcounters/coreIngo Molnar2009-03-041-2/+12
|\ \ | |/ | | | | | | Conflicts: arch/x86/mm/iomap_32.c
| * x86: oprofile: don't set counter width from cpuid on Core2Tim Blechmann2009-03-031-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Impact: fix stuck NMIs and non-working oprofile on certain CPUs Resetting the counter width of the performance counters on Intel's Core2 CPUs, breaks the delivery of NMIs, when running in x86_64 mode. This should fix bug #12395: http://bugzilla.kernel.org/show_bug.cgi?id=12395 Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Robert Richter <robert.richter@amd.com> LKML-Reference: <20090303100412.GC10085@erda.amd.com> Cc: <stable@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | perfcounters: fix "perf counters kills oprofile" bug, v2Ingo Molnar2009-02-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Impact: fix kernel crash Both oprofile and perfcounters register an NMI die handler, but only one can handle the NMI. Conveniently, oprofile unregisters it's notifier when not actively in use, so setting it's notifier priority higher than perfcounter's allows oprofile to borrow the NMI for the duration of it's run. Tested/works both as module and built-in. While testing, I found that if kerneltop was generating NMIs at very high frequency, the kernel may panic when oprofile registered it's handler. This turned out to be because oprofile registers it's handler before reset_value has been allocated, so if an NMI comes in while it's still setting up, kabOom. Rather than try more invasive changes, I followed the lead of other places in op_model_ppro.c, and simply returned in that highly unlikely event. (debug warnings attached) Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | perfcounters: fix "perf counters kill oprofile" bugMike Galbraith2009-02-041-3/+4
| | | | | | | | | | | | | | | | | | With oprofile as a module, and unloaded by profiling script, both oprofile and kerneltop work fine.. unless you leave kerneltop running when you start profiling, then you may see badness. Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | Merge commit 'v2.6.29-rc1' into perfcounters/coreIngo Molnar2009-01-111-133/+91
|\ \ | |/ | | | | | | Conflicts: include/linux/kernel_stat.h
| * Merge branch 'oprofile/ring_buffer' into oprofile/oprofile-for-tipRobert Richter2009-01-081-133/+91
| |\
| | * oprofile: make new cpu buffer functions part of the apiRobert Richter2009-01-071-33/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch creates the new functions oprofile_write_reserve() oprofile_add_data() oprofile_write_commit() and makes them part of the oprofile api. Signed-off-by: Robert Richter <robert.richter@amd.com>
| | * oprofile: use new data sample format for ibsRobert Richter2009-01-071-78/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new ring buffer implementation allows the storage of samples with different size. This patch implements the usage of the new sample format to store ibs samples in the cpu buffer. Until now, writing to the cpu buffer could lead to incomplete sampling sequences since IBS samples were transfered in multiple samples. Due to a full buffer, data could be lost at any time. This can't happen any more since the complete data is reserved in advance and then stored in a single sample. Signed-off-by: Robert Richter <robert.richter@amd.com>
| | * oprofile: rework implementation of cpu buffer eventsRobert Richter2009-01-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Special events such as task or context switches are marked with an escape code in the cpu buffer followed by an event code or a task identifier. There is one escape code per event. To make escape sequences also available for data samples the internal cpu buffer format must be changed. The current implementation does not allow the extension of event codes since this would lead to collisions with the task identifiers. To avoid this, this patch introduces an event mask that allows the storage of multiple events with one escape code. Now, task identifiers are stored in the data section of the sample. The implementation also allows the usage of custom data in a sample. As a side effect the new code is much more readable and easier to understand. Signed-off-by: Robert Richter <robert.richter@amd.com>
| | * oprofile: rename variable ibs_allowed to has_ibs in op_model_amd.cRobert Richter2009-01-071-12/+12
| | | | | | | | | | | | | | | | | | | | | This patch renames ibs_allowed to has_ibs. Varible name fits better now. Signed-off-by: Robert Richter <robert.richter@amd.com>
| | * x86/oprofile: fix pci_dev use count for AMD northbridge devicesRobert Richter2008-12-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the PCI device use count for AMD northbridge devices. In case of an IBS LVT initialization failure, the PCI device is released now by calling pci_dev_put(). If there are no initialization errors, the devices are released in pci_get_device() while iterating. Signed-off-by: Robert Richter <robert.richter@amd.com>
| | * x86/oprofile: cleanup IBS init/exit functions in op_model_amd.cRobert Richter2008-12-101-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | Implementation of pairwise init/exit funcions for IBS and IBS NMI setup. There are also some function renames and the removal of forward function declarations. Signed-off-by: Robert Richter <robert.richter@amd.com>
| | * 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>
* | | x86, perfcounters: rename intel_arch_perfmon.h => perf_counter.hIngo Molnar2008-12-231-1/+1
|/ / | | | | | | | | | | | | | | | | Impact: rename include file We'll be providing an asm/perf_counter.h to the generic perfcounter code, so use the already existing x86 file for this purpose and rename it. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | x86/oprofile: fix Intel cpu family 6 detectionWilliam Cohen2008-12-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alan Jenkins wrote: > This is on an EeePC 701, /proc/cpuinfo as attached. > > Is this expected? Will the next release work? > > Thanks, Alan > > # opcontrol --setup --no-vmlinux > cpu_type 'unset' is not valid > you should upgrade oprofile or force the use of timer mode > > # opcontrol -v > opcontrol: oprofile 0.9.4 compiled on Nov 29 2008 22:44:10 > > # cat /dev/oprofile/cpu_type > i386/p6 > # uname -r > 2.6.28-rc6eeepc Hi Alan, Looking at the kernel driver code for oprofile it can return the "i386/p6" for the cpu_type. However, looking at the user-space oprofile code there isn't the matching entry in libop/op_cpu_type.c or the events/unit_mask files in events/i386 directory. The Intel AP-485 says this is a "Intel Pentium M processor model D". Seems like the oprofile kernel driver should be identifying the processor as "i386/p6_mobile" The driver identification code doesn't look quite right in nmi_init.c http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git;a=blob;f=arch/x86/oprofile/nmi_int.c;h=022cd41ea9b4106e5884277096e80e9088a7c7a9;hb=HEAD has: 409 case 10 ... 13: 410 *cpu_type = "i386/p6"; 411 break; Referring to the Intel AP-485: case 10 and 11 should produce "i386/piii" case 13 should produce "i386/p6_mobile" I didn't see anything for case 12. Something like the attached patch. I don't have a celeron machine to verify that changes in this area of the kernel fix thing. -Will Signed-off-by: William Cohen <wcohen@redhat.com> Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Robert Richter <robert.richter@amd.com>
* | oprofile: fix CPU unplug panic in ppro_stop()Eric Dumazet2008-12-031-0/+4
|/ | | | | | | | If oprofile statically compiled in kernel, a cpu unplug triggers a panic in ppro_stop(), because a NULL pointer is dereferenced. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> 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/+4
| | | | | | | | | | | 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/+10
| | | | 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/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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/+71
| | | | | | | | | | | | | | 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/+11
| | | | | | | | 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/+40
|\ | | | | | | | | | | | | | | | | 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/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud