linux_dsm_epyc7002/arch/powerpc
Paul Mackerras 105988c015 perf_counter: powerpc: Enable use of software counters on 32-bit powerpc
This enables the perf_counter subsystem on 32-bit powerpc.  Since we
don't have any support for hardware counters on 32-bit powerpc yet,
only software counters can be used.

Besides selecting HAVE_PERF_COUNTERS for 32-bit powerpc as well as
64-bit, the main thing this does is add an implementation of
set_perf_counter_pending().  This needs to arrange for
perf_counter_do_pending() to be called when interrupts are enabled.
Rather than add code to local_irq_restore as 64-bit does, the 32-bit
set_perf_counter_pending() generates an interrupt by setting the
decrementer to 1 so that a decrementer interrupt will become pending
in 1 or 2 timebase ticks (if a decrementer interrupt isn't already
pending).  When interrupts are enabled, timer_interrupt() will be
called, and some new code in there calls perf_counter_do_pending().
We use a per-cpu array of flags to indicate whether we need to call
perf_counter_do_pending() or not.

This introduces a couple of new Kconfig symbols: PPC_HAVE_PMU_SUPPORT,
which is selected by processor families for which we have hardware PMU
support (currently only PPC64), and PPC_PERF_CTRS, which enables the
powerpc-specific perf_counter back-end.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linuxppc-dev@ozlabs.org
Cc: benh@kernel.crashing.org
LKML-Reference: <19000.55404.103840.393470@cargo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-06-18 11:11:44 +02:00
..
boot powerpc/install: Bail with error code on error in install script 2009-06-15 13:26:16 +10:00
configs Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2009-06-16 11:29:17 -07:00
include/asm perf_counter: powerpc: Enable use of software counters on 32-bit powerpc 2009-06-18 11:11:44 +02:00
kernel perf_counter: powerpc: Enable use of software counters on 32-bit powerpc 2009-06-18 11:11:44 +02:00
kvm KVM: Fix interrupt unhalting a vcpu when it shouldn't 2009-06-10 11:48:33 +03:00
lib powerpc: Move dma-noncoherent.c from arch/powerpc/lib to arch/powerpc/mm 2009-05-27 16:32:05 +10:00
math-emu powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00
mm Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-06-15 09:32:52 -07:00
oprofile powerpc/oprofile: Remove unused dump_pmcs() in FSL oprofile 2009-05-19 00:46:13 -05:00
platforms perf_counter: powerpc: Enable use of software counters on 32-bit powerpc 2009-06-18 11:11:44 +02:00
sysdev Merge commit 'origin/master' into next 2009-06-12 16:53:38 +10:00
xmon powerpc/xmon: Remove unused variable in xmon.c 2009-06-09 16:47:40 +10:00
Kconfig perf_counter: powerpc: Enable use of software counters on 32-bit powerpc 2009-06-18 11:11:44 +02:00
Kconfig.debug powerpc: Keep track of emulated instructions 2009-05-21 15:44:26 +10:00
Makefile powerpc: Move VMX and VSX asm code to vector.S 2009-06-09 16:46:25 +10:00