19 Oct, 2010
2 commits
-
Provide a mechanism that allows running code in IRQ context. It is
most useful for NMI code that needs to interact with the rest of the
system -- like wakeup a task to drain buffers.Perf currently has such a mechanism, so extract that and provide it as
a generic feature, independent of perf so that others may also
benefit.The IRQ context callback is generated through self-IPIs where
possible, or on architectures like powerpc the decrementer (the
built-in timer facility) is set to generate an interrupt immediately.Architectures that don't have anything like this get to do with a
callback from the timer tick. These architectures can call
irq_work_run() at the tail of any IRQ handlers that might enqueue such
work (like the perf IRQ handler) to avoid undue latencies in
processing the work.Signed-off-by: Peter Zijlstra
Acked-by: Kyle McMartin
Acked-by: Martin Schwidefsky
[ various fixes ]
Signed-off-by: Huang Ying
LKML-Reference:
Signed-off-by: Ingo Molnar -
PERF_COUNT_HW_CACHE_DTLB:READ:MISS had a bogus umask value of 0 which
counts nothing. Needed to be 0x7 (to count all possibilities).PERF_COUNT_HW_CACHE_ITLB:READ:MISS had a bogus umask value of 0 which
counts nothing. Needed to be 0x3 (to count all possibilities).Signed-off-by: Stephane Eranian
Signed-off-by: Peter Zijlstra
Cc: Robert Richter
Cc: # as far back as it applies
LKML-Reference:
Signed-off-by: Ingo Molnar
15 Oct, 2010
6 commits
-
Conflicts:
arch/arm/oprofile/common.c
kernel/perf_event.c -
…nel/git/rostedt/linux-2.6-trace into perf/core
-
The config option used by archs to let the build system know that
the C version of the recordmcount works for said arch is currently
called HAVE_C_MCOUNT_RECORD which enables BUILD_C_RECORDMCOUNT. To
be more consistent with the name that all archs may use, it has been
renamed to HAVE_C_RECORDMCOUNT. This will be less confusing since
we are building a C recordmcount and not a mcount_record.Suggested-by: Ingo Molnar
Cc:
Cc: Michal Marek
Cc: linux-kbuild@vger.kernel.org
Cc: John Reiser
Signed-off-by: Steven Rostedt -
…ic/random-tracing into perf/core
-
This patch adds the support for the C version of recordmcount and
compile times show ~ 12% improvement.After verifying this works, other archs can add:
HAVE_C_MCOUNT_RECORD
in its Kconfig and it will use the C version of recordmcount
instead of the perl version.Cc:
Cc: Michal Marek
Cc: linux-kbuild@vger.kernel.org
Cc: John Reiser
Signed-off-by: Steven Rostedt -
In x86, faults exit by executing the iret instruction, which then
reenables NMIs if we faulted in NMI context. Then if a fault
happens in NMI, another NMI can nest after the fault exits.But we don't yet support nested NMIs because we have only one NMI
stack. To prevent from that, check that vmalloc and kmemcheck
faults don't happen in this context. Most of the other kernel faults
in NMIs can be more easily spotted by finding explicit
copy_from,to_user() calls on review.Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: H. Peter Anvin
Cc: Mathieu Desnoyers
Cc: Peter Zijlstra
14 Oct, 2010
2 commits
-
Since the text_poke_smp() definately depends on actual
stop_machine() on smp, add that dependency to Kconfig.Signed-off-by: Masami Hiramatsu
Cc: Rusty Russell
Cc: Ananth N Mavinakayanahalli
Cc: 2nddept-manager@sdl.hitachi.co.jp
Cc: Mathieu Desnoyers
LKML-Reference:
Signed-off-by: Ingo Molnar -
Use __stop_machine() in text_poke_smp() because the caller
must get online_cpus before calling text_poke_smp(), but
stop_machine() do it again. We don't need it.Signed-off-by: Masami Hiramatsu
Cc: Rusty Russell
Cc: Ananth N Mavinakayanahalli
Cc: 2nddept-manager@sdl.hitachi.co.jp
Cc: Mathieu Desnoyers
LKML-Reference:
Signed-off-by: Ingo Molnar
08 Oct, 2010
1 commit
-
Conflicts:
arch/x86/kernel/module.cMerge reason: Resolve the conflict, pick up fixes.
Signed-off-by: Ingo Molnar
07 Oct, 2010
1 commit
-
* 'v2.6.36-rc6-urgent-fixes' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
xen: do not initialize PV timers on HVM if !xen_have_vector_callback
xen: do not set xenstored_ready before xenbus_probe on hvm
06 Oct, 2010
2 commits
-
…/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf trace scripting: Fix extern struct definitions
perf ui hist browser: Fix segfault on 'a' for annotate
perf tools: Fix build breakage
perf, x86: Handle in flight NMIs on P4 platform
oprofile, ARM: Release resources on failure
oprofile: Add Support for Intel CPU Family 6 / Model 29 -
With all the recent module loading cleanups, we've minimized the code
that sits under module_mutex, fixing various deadlocks and making it
possible to do most of the module loading in parallel.However, that whole conversion totally missed the rather obscure code
that adds a new module to the list for BUG() handling. That code was
doubly obscure because (a) the code itself lives in lib/bugs.c (for
dubious reasons) and (b) it gets called from the architecture-specific
"module_finalize()" rather than from generic code.Calling it from arch-specific code makes no sense what-so-ever to begin
with, and is now actively wrong since that code isn't protected by the
module loading lock any more.So this commit moves the "module_bug_{finalize,cleanup}()" calls away
from the arch-specific code, and into the generic code - and in the
process protects it with the module_mutex so that the list operations
are now safe.Future fixups:
- move the module list handling code into kernel/module.c where it
belongs.
- get rid of 'module_bug_list' and just use the regular list of modules
(called 'modules' - imagine that) that we already create and maintain
for other reasons.Reported-and-tested-by: Thomas Gleixner
Cc: Rusty Russell
Cc: Adrian Bunk
Cc: Andrew Morton
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds
05 Oct, 2010
4 commits
-
if !xen_have_vector_callback do not initialize PV timer unconditionally
because we still don't know how many cpus are available and if there is
more than one we won't be able to receive the timer interrupts on
cpu > 0.This patch fixes an hang at boot when Xen does not support vector
callbacks and the guest has multiple vcpus.Signed-off-by: Stefano Stabellini
Acked-by: Jeremy Fitzhardinge -
Just dead code I believe.
Signed-off-by: Andi Kleen
Signed-off-by: Andrew Morton
Cc: andi@firstfloor.org
Cc: Peter Zijlstra
Signed-off-by: Ingo Molnar -
Conflicts:
tools/perf/util/ui/browsers/hists.cMerge reason: fix the conflict and merge in changes for dependent patch.
Signed-off-by: Ingo Molnar
-
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
[CPUFREQ] Fix memory leaks in pcc_cpufreq_do_osc
[CPUFREQ] acpi-cpufreq: add missing __percpu markup
02 Oct, 2010
1 commit
-
…git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, hpet: Fix bogus error check in hpet_assign_irq()
x86, irq: Plug memory leak in sparse irq
x86, cpu: After uncapping CPUID, re-run CPU feature detection
01 Oct, 2010
7 commits
-
Now, that we only call the exit function if init succeeds with commit:
979048e oprofile: don't call arch exit code from init code on failure
we can simplify the x86 init/exit functions too. Variable using_nmi
becomes obsolete.Signed-off-by: Robert Richter
-
This patch implements the oprofile backtrace generation for 32 bit
applications running in the 64bit environment (compat mode).With this change it's possible to get backtrace for 32bits applications
under the 64bits environment using oprofile's callgraph options.opcontrol --setup -c ...
opreport -l -cg ...Signed-off-by: Jiri Olsa
Signed-off-by: Robert Richter -
Removing unnecessary struct frame_head and replacing it with
struct stack_frame.The struct stack_frame is already defined and used in other places
in kernel, so there's no reason to define new structure.Signed-off-by: Jiri Olsa
Signed-off-by: Robert Richter -
create_irq() returns -1 if the interrupt allocation failed, but the
code checks for irq == 0.Use create_irq_nr() instead.
Signed-off-by: Thomas Gleixner
Cc: Venkatesh Pallipadi
LKML-Reference:
Cc: stable@kernel.org
Signed-off-by: H. Peter Anvin -
free_irq_cfg() is not freeing the cpumask_vars in irq_cfg. Fixing this
triggers a use after free caused by the fact that copying struct
irq_cfg is done with memcpy, which copies the pointer not the cpumask.Fix both places.
Signed-off-by: Thomas Gleixner
Cc: Yinghai Lu
LKML-Reference:
Signed-off-by: Thomas Gleixner
Cc: stable@kernel.org
Signed-off-by: H. Peter Anvin -
If acpi_evaluate_object() function call doesn't fail, we must kfree()
output.buffer before returning from pcc_cpufreq_do_osc().Signed-off-by: Pekka Enberg
Acked-by: David Rientjes
Signed-off-by: Dave Jones -
acpi_perf_data is a percpu pointer but was missing __percpu markup.
Add it.Signed-off-by: Namhyung Kim
Acked-by: Tejun Heo
Signed-off-by: Dave Jones
30 Sep, 2010
1 commit
-
Stephane reported we've forgot to guard the P4 platform
against spurious in-flight performance IRQs. Fix it.This fixes potential spurious 'dazed and confused' NMI
messages.Reported-by: Stephane Eranian
Signed-off-by: Cyrill Gorcunov
Signed-off-by: Don Zickus
Cc: fweisbec@gmail.com
Cc: peterz@infradead.org
Cc: Robert Richter
Cc: Lin Ming
LKML-Reference:
Signed-off-by: Ingo Molnar
29 Sep, 2010
2 commits
-
cpu_cstate_entry is a percpu pointer
but was missing __percpu markup.Signed-off-by: Namhyung Kim
Acked-by: Tejun Heo
Signed-off-by: Len Brown -
After uncapping the CPUID level, we need to also re-run the CPU
feature detection code.This resolves kernel bugzilla 16322.
Reported-by: boris64
Cc: v2.6.29..2.6.35
LKML-Reference:
Signed-off-by: H. Peter Anvin
28 Sep, 2010
3 commits
-
* 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Avoid 'constant_test_bit()' misoptimization due to cast to non-volatile -
…git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86/amd-iommu: Fix rounding-bug in __unmap_single
x86/amd-iommu: Work around S3 BIOS bug
x86/amd-iommu: Set iommu configuration flags in enable-loop
x86, setup: Fix earlyprintk=serial,0x3f8,115200
x86, setup: Fix earlyprintk=serial,ttyS0,115200 -
…/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf, x86: Catch spurious interrupts after disabling counters
tracing/x86: Don't use mcount in kvmclock.c
tracing/x86: Don't use mcount in pvclock.c
27 Sep, 2010
2 commits
-
…file into perf/urgent
-
While debugging bit_spin_lock() hang, it was tracked down to gcc-4.4
misoptimization of non-inlined constant_test_bit() due to non-volatile
addr when 'const volatile unsigned long *addr' cast to 'unsigned long *'
with subsequent unconditional jump to pause (and not to the test) leading
to hang.Compiling with gcc-4.3 or disabling CONFIG_OPTIMIZE_INLINING yields inlined
constant_test_bit() and correct jump, thus working around the kernel bug.Other arches than asm-x86 may implement this slightly differently;
2.6.29 mitigates the misoptimization by changing the function prototype
(commit c4295fbb6048d85f0b41c5ced5cbf63f6811c46c) but probably fixing the issue
itself is better.Signed-off-by: Alexander Chumachenko
Signed-off-by: Michael Shigorin
Acked-by: Linus Torvalds
Signed-off-by: H. Peter Anvin
25 Sep, 2010
1 commit
-
Using cpuid_eax() to determine feature availability on other than
the current CPU is invalid. And feature availability should also be
checked in the hotplug code path.Signed-off-by: Jan Beulich
Cc: Rudolf Marek
Cc: Fenghua Yu
Signed-off-by: Guenter Roeck
24 Sep, 2010
3 commits
-
Some cpus still deliver spurious interrupts after disabling a
counter. This caused 'undelivered NMI' messages. This patch
fixes this. Introduced by:4177c42: perf, x86: Try to handle unknown nmis with an enabled PMU
Reported-by: Ingo Molnar
Signed-off-by: Robert Richter
Cc: Don Zickus
Cc: gorcunov@gmail.com
Cc: fweisbec@gmail.com
Cc: ying.huang@intel.com
Cc: ming.m.lin@intel.com
Cc: yinghai@kernel.org
Cc: andi@firstfloor.org
Cc: eranian@google.com
Cc: Peter Zijlstra
LKML-Reference:
Signed-off-by: Ingo Molnar -
…/joro/linux-2.6-iommu into x86/urgent
-
…stedt/linux-2.6-trace into perf/core
23 Sep, 2010
2 commits
-
In the __unmap_single function the dma_addr is rounded down
to a page boundary before the dma pages are unmapped. The
address is later also used to flush the TLB entries for that
mapping. But without the offset into the dma page the amount
of pages to flush might be miscalculated in the TLB flushing
path. This patch fixes this bug by using the original
address to flush the TLB.Cc: stable@kernel.org
Signed-off-by: Joerg Roedel -
This patch adds a workaround for an IOMMU BIOS problem to
the AMD IOMMU driver. The result of the bug is that the
IOMMU does not execute commands anymore when the system
comes out of the S3 state resulting in system failure. The
bug in the BIOS is that is does not restore certain hardware
specific registers correctly. This workaround reads out the
contents of these registers at boot time and restores them
on resume from S3. The workaround is limited to the specific
IOMMU chipset where this problem occurs.Cc: stable@kernel.org
Signed-off-by: Joerg Roedel