summaryrefslogtreecommitdiffstats
path: root/arch (follow)
Commit message (Collapse)AuthorAgeFilesLines
* perf: Drop the frame reliablity checkFrederic Weisbecker2010-04-041-2/+1
| | | | | | | | | | | | It is useless now that we have a pure stack frame walker, as given addr are always reliable. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@elte.hu>
* Merge branch 'perf/urgent' into perf/coreIngo Molnar2010-04-031-2/+0
|\ | | | | | | | | | | | | | | | | Conflicts: tools/perf/Makefile Merge reason: resolve the conflict. Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * perf: Always build the powerpc perf_arch_fetch_caller_regs versionFrederic Weisbecker2010-04-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that software events use perf_arch_fetch_caller_regs() too, we need the powerpc version to be always built. Fixes the following build error: (.text+0x3210): undefined reference to `perf_arch_fetch_caller_regs' (.text+0x3324): undefined reference to `perf_arch_fetch_caller_regs' (.text+0x33bc): undefined reference to `perf_arch_fetch_caller_regs' (.text+0x33ec): undefined reference to `perf_arch_fetch_caller_regs' (.text+0xd4a0): undefined reference to `perf_arch_fetch_caller_regs' arch/powerpc/kernel/built-in.o:(.text+0xd528): more undefined references to `perf_arch_fetch_caller_regs' follow make[1]: *** [.tmp_vmlinux1] Error 1 make: *** [sub-make] Error 2 Reported-by: Michael Ellerman <michael@ellerman.id.au> Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org>
* | perf, x86: Add Nehalem programming quirk to WestmerePeter Zijlstra2010-04-021-0/+2
| | | | | | | | | | | | | | | | | | According to the Xeon-5600 errata the Westmere suffers the same PMU programming bug as the original Nehalem did. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | perf, x86: Fix __initconst vs constPeter Zijlstra2010-04-024-11/+11
| | | | | | | | | | | | | | | | | | All variables that have __initconst should also be const. Suggested-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | perf, x86: Fix up the ANY flag stuffPeter Zijlstra2010-04-025-51/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stephane noticed that the ANY flag was in generic arch code, and Cyrill reported that it broke the P4 code. Solve this by merging x86_pmu::raw_event into x86_pmu::hw_config and provide intel_pmu and amd_pmu specific versions of this callback. The intel_pmu one deals with the ANY flag, the amd_pmu adds the few extra event bits AMD64 has. Reported-by: Stephane Eranian <eranian@google.com> Reported-by: Cyrill Gorcunov <gorcunov@gmail.com> Acked-by: Robert Richter <robert.richter@amd.com> Acked-by: Cyrill Gorcunov <gorcunov@gmail.com> Acked-by: Stephane Eranian <eranian@google.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1269968113.5258.442.camel@laptop> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | perf, x86: implement ARCH_PERFMON_EVENTSEL bit masksRobert Richter2010-04-025-89/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | ARCH_PERFMON_EVENTSEL bit masks are often used in the kernel. This patch adds macros for the bit masks and removes local defines. The function intel_pmu_raw_event() becomes x86_pmu_raw_event() which is generic for x86 models and same also for p6. Duplicate code is removed. Signed-off-by: Robert Richter <robert.richter@amd.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20100330092821.GH11907@erda.amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | perf, x86: Undo some some *_counter* -> *_event* renamesRobert Richter2010-04-027-65/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The big rename: cdd6c48 perf: Do the big rename: Performance Counters -> Performance Events accidentally renamed some members of stucts that were named after registers in the spec. To avoid confusion this patch reverts some changes. The related specs are MSR descriptions in AMD's BKDGs and the ARCHITECTURAL PERFORMANCE MONITORING section in the Intel 64 and IA-32 Architectures Software Developer's Manuals. This patch does: $ sed -i -e 's:num_events:num_counters:g' \ arch/x86/include/asm/perf_event.h \ arch/x86/kernel/cpu/perf_event_amd.c \ arch/x86/kernel/cpu/perf_event.c \ arch/x86/kernel/cpu/perf_event_intel.c \ arch/x86/kernel/cpu/perf_event_p6.c \ arch/x86/kernel/cpu/perf_event_p4.c \ arch/x86/oprofile/op_model_ppro.c $ sed -i -e 's:event_bits:cntval_bits:g' -e 's:event_mask:cntval_mask:g' \ arch/x86/kernel/cpu/perf_event_amd.c \ arch/x86/kernel/cpu/perf_event.c \ arch/x86/kernel/cpu/perf_event_intel.c \ arch/x86/kernel/cpu/perf_event_p6.c \ arch/x86/kernel/cpu/perf_event_p4.c Signed-off-by: Robert Richter <robert.richter@amd.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1269880612-25800-2-git-send-email-robert.richter@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | Merge branch 'perf/urgent' into perf/coreIngo Molnar2010-04-0280-609/+859
|\| | | | | | | | | | | | | | | | | Conflicts: arch/x86/kernel/cpu/perf_event.c Merge reason: Resolve the conflict, pick up fixes Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * perf, x86: Fix callgraphs of 32-bit processes on 64-bit kernelsTorok Edwin2010-04-022-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When profiling a 32-bit process on a 64-bit kernel, callgraph tracing stopped after the first function, because it has seen a garbage memory address (tried to interpret the frame pointer, and return address as a 64-bit pointer). Fix this by using a struct stack_frame with 32-bit pointers when the TIF_IA32 flag is set. Note that TIF_IA32 flag must be used, and not is_compat_task(), because the latter is only set when the 32-bit process is executing a syscall, which may not always be the case (when tracing page fault events for example). Signed-off-by: Török Edwin <edwintorok@gmail.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Paul Mackerras <paulus@samba.org> Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org LKML-Reference: <1268820436-13145-1-git-send-email-edwintorok@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * perf, x86: Fix AMD hotplug & constraint initializationPeter Zijlstra2010-04-022-36/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 3f6da39 ("perf: Rework and fix the arch CPU-hotplug hooks") moved the amd northbridge allocation from CPUS_ONLINE to CPUS_PREPARE_UP however amd_nb_id() doesn't work yet on prepare so it would simply bail basically reverting to a state where we do not properly track node wide constraints - causing weird perf results. Fix up the AMD NorthBridge initialization code by allocating from CPU_UP_PREPARE and installing it from CPU_STARTING once we have the proper nb_id. It also properly deals with the allocation failing. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> [ robustify using amd_has_nb() ] Signed-off-by: Stephane Eranian <eranian@google.com> LKML-Reference: <1269353485.5109.48.camel@twins> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * x86: Move notify_cpu_starting() callback to a later stagePeter Zijlstra2010-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | Because we need to have cpu identification things done by the time we run CPU_STARTING notifiers. ( This init ordering will be relied on by the next fix. ) Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1269353485.5109.48.camel@twins> Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * Merge branch 'perf/urgent' of ↵Ingo Molnar2010-04-022-3/+1
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/urgent
| | * x86,kgdb: Always initialize the hw breakpoint attributeJason Wessel2010-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is required to call hw_breakpoint_init() on an attr before using it in any other calls. This fixes the problem where kgdb will sometimes fail to initialize on x86_64. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: 2.6.33 <stable@kernel.org> LKML-Reference: <1269975907-27602-1-git-send-email-jason.wessel@windriver.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
| | * perf: Use hot regs with software sched switch/migrate eventsFrederic Weisbecker2010-04-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scheduler's task migration events don't work because they always pass NULL regs perf_sw_event(). The event hence gets filtered in perf_swevent_add(). Scheduler's context switches events use task_pt_regs() to get the context when the event occured which is a wrong thing to do as this won't give us the place in the kernel where we went to sleep but the place where we left userspace. The result is even more wrong if we switch from a kernel thread. Use the hot regs snapshot for both events as they belong to the non-interrupt/exception based events family. Unlike page faults or so that provide the regs matching the exact origin of the event, we need to save the current context. This makes the task migration event working and fix the context switch callchains and origin ip. Example: perf record -a -e cs Before: 10.91% ksoftirqd/0 0 [k] 0000000000000000 | --- (nil) perf_callchain perf_prepare_sample __perf_event_overflow perf_swevent_overflow perf_swevent_add perf_swevent_ctx_event do_perf_sw_event __perf_sw_event perf_event_task_sched_out schedule run_ksoftirqd kthread kernel_thread_helper After: 23.77% hald-addon-stor [kernel.kallsyms] [k] schedule | --- schedule | |--60.00%-- schedule_timeout | wait_for_common | wait_for_completion | blk_execute_rq | scsi_execute | scsi_execute_req | sr_test_unit_ready | | | |--66.67%-- sr_media_change | | media_changed | | cdrom_media_changed | | sr_block_media_changed | | check_disk_change | | cdrom_open v2: Always build perf_arch_fetch_caller_regs() now that software events need that too. They don't need it from modules, unlike trace events, so we keep the EXPORT_SYMBOL in trace_event_perf.c Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net>
| * | microblaze: Support word copying in copy_tofrom_userMichal Simek2010-04-011-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | Word copying is used only for aligned addresses. Here is space for improving to use any better copying technique. Look at memcpy implementation. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Print early printk information to log bufferMichal Simek2010-04-011-9/+15
| | | | | | | | | | | | | | | | | | | | | If early printk console is not enabled then all messages are written to log buffer. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: head.S typo fixMichal Simek2010-04-011-2/+2
| | | | | | | | | | | | | | | | | | I forget to change register name in comments. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Use MICROBLAZE_TLB_SIZE in asm codeMichal Simek2010-04-012-3/+3
| | | | | | | | | | | | | | | | | | | | | TLB size was hardcoded in asm code. This patch brings ability to change TLB size only in one place. (mmu.h). Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Kconfig Fix - pciMichal Simek2010-04-011-3/+0
| | | | | | | | | | | | | | | | | | I forget to remove pci Kconfig option. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Adding likely macrosMichal Simek2010-04-016-26/+28
| | | | | | | | | | | | | | | | | | | | | On the base on GCOV analytics is helpful to add likely/unlikely macros. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Add .type and .size to ASM functionsMichal Simek2010-04-013-1/+22
| | | | | | | | | | | | | | | | | | Cachegrind analysis need this fix to be able to log asm functions. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Fix TLB macrosMichal Simek2010-04-011-1/+2
| | | | | | | | | | | | | | | | | | To be able to do trace TLB operations. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Use instruction with delay slotMichal Simek2010-04-011-8/+5
| | | | | | | | | | | | | | | | | | Sync labels. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Remove additional resr and rear loadingMichal Simek2010-04-011-15/+3
| | | | | | | | | | | | | | | | | | RESR and REAR uses the same regs in whole file. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Change register usage for ESR and EARMichal Simek2010-04-011-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | This change synchronize register usage in code. ESR = R4 EAR = R3 Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Prepare work for optimization in exception codeMichal Simek2010-04-011-6/+3
| | | | | | | | | | | | | | | | | | Any sync branch must follow mts instructions not mfs. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Add DEBUG optionMichal Simek2010-04-011-0/+2
| | | | | | | | | | | | | | | | | | Disable debug option in asm code. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Support systems without lmb bramMichal Simek2010-04-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the system has no lmb bram, main memory should be start from zero because of microblaze vectors. DTS fragment could look like: DDR2_SDRAM: memory@0 { device_type = "memory"; reg = < 0x0 0x10000000 >; } ; Then you have to setup CONFIG_KERNEL_BASE_ADDR=0 which caused that kernel physical start address will be zero. On reset vector place will be jump to 0x100 and on 0x100 starts kernel text. You have to solve how to load the kernel before cpu starts. Tested with XMD. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: Sync strlen, strnlen, copy_to/from_userMichal Simek2010-04-011-56/+32
| | | | | | | | | | | | | | | | | | Last sync. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: Unify __copy_tofrom_userMichal Simek2010-04-012-39/+22
| | | | | | | | | | | | | | | | | | Move to generic location. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: Move functions to generic locationMichal Simek2010-04-013-200/+61
| | | | | | | | | | | | | | | | | | noMMU and MMU use them. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: Fix put_user for noMMUMichal Simek2010-04-011-22/+56
| | | | | | | | | | | | | | | | | | | | | | | | Here is small regression on dhrystone tests and I think that on all benchmarking tests. It is due to better checking mechanism in put_user macro Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: Fix get_user macro for noMMUMichal Simek2010-04-011-23/+66
| | | | | | | | | | | | | | | | | | Use unified version. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: fix clear_user for noMMU kernelMichal Simek2010-04-011-45/+36
| | | | | | | | | | | | | | | | | | | | | Previous patches fixed only MMU version and this is the first patch for noMMU kernel Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: Fix strncpy_from_user functionMichal Simek2010-04-011-3/+11
| | | | | | | | | | | | | | | | | | Generic implementation for noMMU and MMU version Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: fix copy_from_user macroMichal Simek2010-04-011-9/+14
| | | | | | | | | | | | | | | | | | copy_from_user macro also use copy_tofrom_user function Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: copy_to_user unificationMichal Simek2010-04-011-9/+16
| | | | | | | | | | | | | | | | | | | | | noMMU and MMU kernel will use copy copy_tofrom_user asm implementation. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: sync put/get/clear_user macrosMichal Simek2010-04-011-37/+69
| | | | | | | | | | | | | | | | | | Add macro description and resort. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: fix put_user and get_user macrosMichal Simek2010-04-011-51/+49
| | | | | | | | | | | | | | | | | | Use FIXUP macros and resort them. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: fix __get_user_asm macroMichal Simek2010-04-011-16/+17
| | | | | | | | | | | | | | | | | | It is used __FIXUP_SECTION and __EX_TABLE_SECTION macros. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: uaccess: fix clean user macroMichal Simek2010-04-011-34/+55
| | | | | | | | | | | | | | | | | | | | | | | | This is the first patch which does uaccess unification. I choosed to do several patches to be able to use bisect in future if any fault happens. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: move noMMU __range_ok function to uaccess.hMichal Simek2010-04-012-9/+6
| | | | | | | | | | | | | | | | | | | | | The same noMMU and MMU functions should be placed in one file. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Move exception_table_entry upwardMichal Simek2010-04-011-16/+15
| | | | | | | | | | | | | | | | | | Just sort to be able remove whole block. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Remove segment.hMichal Simek2010-04-015-52/+34
| | | | | | | | | | | | | | | | | | | | | I would like to use asm-generic uaccess.h where are segment macros defined. This is just first step. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Remove memset in free_init_pagesMichal Simek2010-04-011-1/+0
| | | | | | | | | | | | | | | | | | We don't need to do it. Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Makefile cleanupsArun Bhanu2010-04-011-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CONFIG_INITRAMFS_SOURCE is set, "scripts/gen_initramfs_list.sh" checks if the cpio image exists. Remove the duplicate check from the Makefile. Remove the "clean-kernel" variable which is unused in the Makefile and is not used by the Kbuild. Signed-off-by: Arun Bhanu <arun@bhanu.net> Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Fix Makefile to delete build generated filesArun Bhanu2010-04-012-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'make clean' does not to delete the following build generated file: arch/microblaze/boot/linux.bin.ub 'make mrproper' does not to delete the following build generated files: arch/microblaze/boot/simpleImage.* Fix the Makefile to delete these build generated files. See [1] for a discussion on why simpleImage.* files are deleted with 'make mrproper' and not with 'make clean'. [1] http://lkml.org/lkml/2010/3/12/96 Signed-off-by: Arun Bhanu <arun@bhanu.net> Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Add a missing single quote to make 'make help' happyArun Bhanu2010-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'make ARCH=microblaze help' fails with the following error due to a missing single quote. /bin/sh: -c: line 0: unexpected EOF while looking for matching `'' /bin/sh: -c: line 1: syntax error: unexpected end of file make: *** [help] Error 2 Signed-off-by: Arun Bhanu <arun@bhanu.net> Signed-off-by: Michal Simek <monstr@monstr.eu>
| * | microblaze: Fix "kstack=" parsingSteven J. Magnani2010-04-011-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | The "kstack=" command line parameter is not parsed correctly. All proper values are interpreted as zero. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Michal Simek <monstr@monstr.eu>