summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2008-12-27x86: perf_counter remove unwanted hw_perf_enable_allJaswinder Singh Rajput
Impact: clean, reduce kernel size a bit, avoid sparse warnings Fixes sparse warnings: arch/x86/kernel/cpu/perf_counter.c:153:6: warning: symbol 'hw_perf_enable_all' was not declared. Should it be static? arch/x86/kernel/cpu/perf_counter.c:279:3: warning: returning void-valued expression arch/x86/kernel/cpu/perf_counter.c:206:3: warning: returning void-valued expression arch/x86/kernel/cpu/perf_counter.c:206:3: warning: returning void-valued expression Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-27perf_counter: more barrier in blank weak functionYinghai Lu
Impact: fix panic possible panic Some versions of GCC inline the weak global function if it's empty. Add a barrier() to work it around. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-25perfcounters: include asm/perf_counter.h only if CONFIG_PERF_COUNTERS=yIngo Molnar
Impact: build fix on ia64 KOSAKI Motohiro reported that -tip doesnt build on ia64 because asm/perf_counter.h only exists on x86 for now. Fix it. Reported-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23x86, perfcounters: add support for fixed-function pmcsIngo Molnar
Impact: extend performance counter support on x86 Intel CPUs Modern Intel CPUs have 3 "fixed-function" performance counters, which count these hardware events: Instr_Retired.Any CPU_CLK_Unhalted.Core CPU_CLK_Unhalted.Ref Add support for them to the performance counters subsystem. Their use is transparent to user-space: the counter scheduler is extended to automatically recognize the cases where a fixed-function PMC can be utilized instead of a generic PMC. In such cases the generic PMC is kept available for more counters. The above fixed-function events map to these generic counter hw events: PERF_COUNT_INSTRUCTIONS PERF_COUNT_CPU_CYCLES PERF_COUNT_BUS_CYCLES (The 'bus' cycles are in reality often CPU-ish cycles, just with a fixed frequency.) Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23perfcounters: add PERF_COUNT_BUS_CYCLESIngo Molnar
Generalize "bus cycles" hw events - and map them to CPU_CLK_Unhalted.Ref on x86. (which is a good enough approximation) Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23perfcounters: generalize the counter schedulerIngo Molnar
Impact: clean up and refactor code refactor the counter scheduler: separate out in/out functions and introduce a counter-rotation function as well. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23perfcounters: remove ->nr_inheritedIngo Molnar
Impact: remove dead code nr_inherited was not maintained correctly (not decremented) - and also not used - remove it. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23x86, perfcounters: print out the ->used bitmaskIngo Molnar
Impact: extend debug printouts Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23perfcounters: enable lowlevel pmc code to schedule countersIngo Molnar
Allow lowlevel ->enable() op to return an error if a counter can not be added. This can be used to handle counter constraints. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23perfcounters: fix init context lockIngo Molnar
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23perfcounters: pull inherited countersIngo Molnar
Change counter inheritance from a 'push' to a 'pull' model: instead of child tasks pushing their final counts to the parent, reuse the wait4 infrastructure to pull counters as child tasks are exit-processed, much like how cutime/cstime is collected. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23perfcounters: fix task clock counterIngo Molnar
Impact: fix per task clock counter precision Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23perfcounters: hw ops renameIngo Molnar
Impact: rename field names Shorten them. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23x86, perfcounters: refactor code for fixed-function PMCsIngo Molnar
Impact: clean up Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23perfcounters: add fixed-mode PMC enumerationIngo Molnar
Enumerate fixed-mode PMCs based on CPUID, and feed that into the perfcounter code. Does not use fixed-mode PMCs yet. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23x86, perfcounters: prepare for fixed-mode PMCsIngo Molnar
Impact: refactor the x86 code for fixed-mode PMCs Extend the data structures and rename the existing facilities to allow for a 'generic' versus 'fixed' counter distinction. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23x86, perfcounters: rename intel_arch_perfmon.h => perf_counter.hIngo Molnar
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>
2008-12-23perfcounters: tweak group schedulingIngo Molnar
Impact: schedule in groups atomically If there are multiple groups in a task, make sure they are scheduled in and out atomically. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-23perfcounters: remove warningsIngo Molnar
Impact: remove debug checks Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-19x86: perf_counter.c intel_perfmon_event_map and max_intel_perfmon_events ↵Jaswinder Singh
should be static Impact: cleanup, avoid sparse warnings, reduce kernel size a bit Fixes these sparse warnings: arch/x86/kernel/cpu/perf_counter.c:44:11: warning: symbol 'intel_perfmon_event_map' was not declared. Should it be static? arch/x86/kernel/cpu/perf_counter.c:54:11: warning: symbol 'max_intel_perfmon_events' was not declared. Should it be static? Signed-off-by: Jaswinder Singh <jaswinder@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-17perfcounters: use hw_event.disable flagIngo Molnar
Impact: implement default-off counters Make sure that counters that are created with counter.hw_event.disabled=1, get created in disabled state. They can be enabled via: prctl(PR_TASK_PERF_COUNTERS_ENABLE); Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-16perfcounters: flush on setuid execIngo Molnar
Pavel Machek pointed out that performance counters should be flushed when crossing protection domains on setuid execution. Reported-by: Pavel Machek <pavel@suse.cz> Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-14perfcounters: release CPU context when exiting task countersIngo Molnar
If counters are exiting via do_exit() not via filp close, then the CPU context needs to be released - otherwise future percpu counter creations might fail. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-14Merge branch 'linus' into perfcounters/coreIngo Molnar
2008-12-14perfcounters: fix lapic initializationIngo Molnar
Fix non-working NMI sampling in certain bootup scenarios. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-14perfcounters, x86: fix sw counters on non-PMC CPUsIngo Molnar
Make perf_max_counters default to at least 1 - this allows the sw counters to be used. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-14perfcounters: fix non-intel-perfmon CPUsIngo Molnar
Do not write MSR_CORE_PERF_GLOBAL_CTRL on CPUs where it does not exist. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-14perfcounters: add nr-of-faults counterIngo Molnar
Impact: add new feature, new sw counter Add a counter that counts the number of pagefaults a task is experiencing. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-14perfcounters: add task migrations counterIngo Molnar
Impact: add new feature, new sw counter Add a counter that counts the number of cross-CPU migrations a task is suffering. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-14perfcounters: add context switch counterIngo Molnar
Impact: add new feature, new sw counter Add a counter that counts the number of context-switches a task is doing. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-14perfcounters: fix task clock counterIngo Molnar
Impact: bugfix Update the task clock counter to the new math. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-14perfcounters: implement "counter inheritance"Ingo Molnar
Impact: implement new performance feature Counter inheritance can be used to run performance counters in a workload, transparently - and pipe back the counter results to the parent counter. Inheritance for performance counters works the following way: when creating a counter it can be marked with the .inherit=1 flag. Such counters are then 'inherited' by all child tasks (be they fork()-ed or clone()-ed). These counters get inherited through exec() boundaries as well (except through setuid boundaries). The counter values get added back to the parent counter(s) when the child task(s) exit - much like stime/utime statistics are gathered. So inherited counters are ideal to gather summary statistics about an application's behavior via shell commands, without having to modify that application. The timec.c command utilizes counter inheritance: http://redhat.com/~mingo/perfcounters/timec.c Sample output: $ ./timec -e 1 -e 3 -e 5 ls -lR /usr/include/ >/dev/null Performance counter stats for 'ls': 163516953 instructions 2295 cache-misses 2855182 branch-misses Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-14perfcounters: restructure x86 counter mathIngo Molnar
Impact: restructure code Change counter math from absolute values to clear delta logic. We try to extract elapsed deltas from the raw hw counter - and put that into the generic counter. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-14x86: implement atomic64_t on 32-bitIngo Molnar
Impact: new API Implement the atomic64_t APIs on 32-bit as well. Will be used by the performance counters code. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-13Merge branch 'merge' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx: powerpc/40x: Add proper BOOTCFLAGS for cuboot-acadia
2008-12-13Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6Linus Torvalds
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: i2c-highlander: Trivial endian casting fixes i2c-pmcmsp: Fix endianness misannotation
2008-12-13Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: Commands needing to be retried require a complete re-initialization.
2008-12-13Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: MIPS: IP32: Update defconfig MIPS: Add missing calls to plat_unmap_dma_mem. MIPS: Kconfig: Fix the arch-specific header path MIPS: Use EI/DI for MIPS R2.
2008-12-13console ASCII glyph 1:1 mappingIngo Brueckl
For the console, there is a 1:1 mapping of glyphs which cannot be found in the current font. This seems to be meant as a kind of 'emergency fallback' for fonts without unicode mapping which otherwise would display nothing readable on the screen. At the moment it affects all chars for which no substitution character is defined. In particular this means that for all chars (>= 128) where there is no iso88591-1/unicode character (e.g. control character area) you'll get the very strange 1:1 mapping of the (cp437) graphics card glyphs. I'm pretty sure that the 1:1 mapping should only affect strict ASCII code characters, i.e. chars < 128. The patch limits the mapping as it probably was meant anyway. Signed-off-by: Ingo Brueckl <ib@wupperonline.de> Acked-by: H. Peter Anvin <hpa@zytor.com> Cc: Egmont Koblinger <egmont@uhulinux.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-13unicode table for cp437Ingo Brueckl
There is a major bug in the cp437 to unicode translation table. Char 0x7c is mapped to U+00a5 which is the Yen sign and wrong. The right mapping is U+00a6 (broken bar). Furthermore, a mapping for U+00b4 (a widely used character) is missing even though easily possible. The patch fixes these, as well as it provides a few other useful mappings. The changes are as follows: 0x0f (enhancement) enables a sort of currency symbol 0x27 (bug) enables a sort of acute accent which is a widely used character 0x44 (enhancement) enables a sort of icelandic capital letter eth 0x7c (major bug) corrects mapping 0xeb (enhancement) enables a sort of icelandic small letter eth 0xee (enhancement) enables a sort of math 'element of' Signed-off-by: Ingo Brueckl <ib@wupperonline.de> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-12-12MIPS: IP32: Update defconfigDavid Daney
Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-12-12MIPS: Add missing calls to plat_unmap_dma_mem.David Daney
dma_free_noncoherent() and dma_free_coherent() are missing calls to plat_unmap_dma_mem(). This patch adds them. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-12-12MIPS: Kconfig: Fix the arch-specific header pathDmitri Vorobiev
The header path in the help text for the RUNTIME_DEBUG config option is obsolete and needs to be updated to match the new location of architecture-specific header files. While at it, fix the spelling mistake. Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-12-12MIPS: Use EI/DI for MIPS R2.David Daney
For MIPS R2, use the EI and DI instructions to enable and disable interrupts. Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com> Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-12-12Commands needing to be retried require a complete re-initialization.Alan D. Brunelle
The test-unit-ready portion of this patch was causing boots to fail on my test machine (as in http://lkml.org/lkml/2008/12/5/161). With this patch in place, the system is booting reliably. Mike Anderson found the same problem in the hp_hw_start_stop code, and I applied the same solution in cdrom_read_cdda_bpc. Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com> Cc: Mike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-12-12Merge branch 'x86/irq' into perfcounters/coreIngo Molnar
( with manual semantic merge of arch/x86/kernel/cpu/perf_counter.c )
2008-12-12x86: hardirq: introduce inc_irq_stat()Hiroshi Shimamoto
Impact: cleanup Introduce inc_irq_stat() macro and unify irq_stat accounting code. Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-12Merge commit 'v2.6.28-rc8' into x86/irqIngo Molnar
2008-12-11perf counters: update docsIngo Molnar
Impact: update docs Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-11perf counters: clean up state transitionsIngo Molnar
Impact: cleanup Introduce a proper enum for the 3 states of a counter: PERF_COUNTER_STATE_OFF = -1 PERF_COUNTER_STATE_INACTIVE = 0 PERF_COUNTER_STATE_ACTIVE = 1 and rename counter->active to counter->state and propagate the changes everywhere. Signed-off-by: Ingo Molnar <mingo@elte.hu>