]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
14 years agoMerge branch 'perf/urgent' into perf/core
Ingo Molnar [Sat, 3 Apr 2010 16:17:55 +0000 (18:17 +0200)]
Merge branch 'perf/urgent' into perf/core

Conflicts:
tools/perf/Makefile

Merge reason: resolve the conflict.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'perf' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2...
Ingo Molnar [Sat, 3 Apr 2010 16:16:42 +0000 (18:16 +0200)]
Merge branch 'perf' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core

14 years agoperf newt: Pass the input_name to perf_session__browse_hists
Arnaldo Carvalho de Melo [Sat, 3 Apr 2010 14:54:35 +0000 (11:54 -0300)]
perf newt: Pass the input_name to perf_session__browse_hists

So that it can use it in the 'perf annotate' command line, otherwise
it'll use the default and not the specified -i filename passed to 'perf
report'.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf newt: Move the hist browser population bits to separare function
Arnaldo Carvalho de Melo [Sat, 3 Apr 2010 14:25:56 +0000 (11:25 -0300)]
perf newt: Move the hist browser population bits to separare function

Next patches will use that when applying filtes to then repopulate the
browser with the narrowed vision.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf newt: Remove useless column width calculation
Arnaldo Carvalho de Melo [Sat, 3 Apr 2010 14:04:55 +0000 (11:04 -0300)]
perf newt: Remove useless column width calculation

Not used in the TUI interface.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf symbols: Fill in pgoff in mmap synthesized events
Anton Blanchard [Sat, 3 Apr 2010 11:53:31 +0000 (22:53 +1100)]
perf symbols: Fill in pgoff in mmap synthesized events

When we synthesize mmap events we need to fill in the pgoff field.

I wasn't able to test this completely since I couldn't find an
executable region with a non 0 offset. We will see it when we start
doing data profiling.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: David Miller <davem@davemloft.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20100403115331.GK5594@kryten>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf tools: Move the prototypes in util/string.h to util.h
Arnaldo Carvalho de Melo [Sat, 3 Apr 2010 13:19:26 +0000 (10:19 -0300)]
perf tools: Move the prototypes in util/string.h to util.h

So that we avoid conflict with libc's string.h header.

Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Suggested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf: Always build the powerpc perf_arch_fetch_caller_regs version
Frederic Weisbecker [Sat, 3 Apr 2010 10:22:05 +0000 (12:22 +0200)]
perf: Always build the powerpc perf_arch_fetch_caller_regs version

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>
14 years agoperf: Always build the stub perf_arch_fetch_caller_regs version
Frederic Weisbecker [Sat, 3 Apr 2010 10:22:05 +0000 (12:22 +0200)]
perf: Always build the stub perf_arch_fetch_caller_regs version

Now that software events use perf_arch_fetch_caller_regs() too, we
need the stub version to be always built in for archs that don't
implement it.

Fixes the following build error in PARISC:

kernel/built-in.o: In function `perf_event_task_sched_out':
(.text.perf_event_task_sched_out+0x54): undefined reference to `perf_arch_fetch_caller_regs'

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>
14 years agoperf, probe-finder: Build fix on Debian
Borislav Petkov [Mon, 29 Mar 2010 16:47:55 +0000 (18:47 +0200)]
perf, probe-finder: Build fix on Debian

Building chokes with:

 In file included from /usr/include/gelf.h:53,
                 from /usr/include/elfutils/libdw.h:53,
                 from util/probe-finder.h:61,
                 from util/probe-finder.c:39:
 /usr/include/libelf.h:98: error: expected specifier-qualifier-list before 'off64_t'
 [...]

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <20100329164755.GA16034@aftab>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf/scripts: Tuple was set from long in both branches in python_process_event()
Tom Zanussi [Fri, 2 Apr 2010 04:58:25 +0000 (23:58 -0500)]
perf/scripts: Tuple was set from long in both branches in python_process_event()

This is a fix to the signed/unsigned field handling in the
Python scripting engine, based on a patch from Roel Kluin.

Basically, Python wants to use a PyInt (which is internally a
long) if it can i.e. if the value will fit into that type.  If
not, it stores it into a PyLong, which isn't actually a long,
but an arbitrary-precision integer variable.

The code below is similar to to what Python does internally, and
it seems to work as expected on the x86 and x86_64 sytems I
tested it on.

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Roel Kluin <roel.kluin@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: rostedt@goodmis.org
LKML-Reference: <1270184305.6422.10.camel@tropicana>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf tools: sort_dimension__add shouldn't die
Arnaldo Carvalho de Melo [Fri, 2 Apr 2010 15:30:57 +0000 (12:30 -0300)]
perf tools: sort_dimension__add shouldn't die

Propagate error instead.

LKML-Reference: <new-submission>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf session: Remove one more exit() call from library code
Arnaldo Carvalho de Melo [Fri, 2 Apr 2010 13:04:18 +0000 (10:04 -0300)]
perf session: Remove one more exit() call from library code

Return NULL instead and make the caller propagate the error.

LKML-Reference: <new-submission>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf hist: Only allocate callchain_node if processing callchains
Arnaldo Carvalho de Melo [Fri, 2 Apr 2010 12:50:42 +0000 (09:50 -0300)]
perf hist: Only allocate callchain_node if processing callchains

The struct callchain_node size is 120 bytes, that are never used when
there are no callchains or '-g none' is specified, so conditionally
allocate it, reducing sizeof(struct hist_entry) from 210 bytes to only
96, greatly speeding the non-callchain processing.

LKML-Reference: <new-submission>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf kmem: Fixup the symbol address before using it
Arnaldo Carvalho de Melo [Fri, 2 Apr 2010 00:24:38 +0000 (21:24 -0300)]
perf kmem: Fixup the symbol address before using it

We get absolute addresses in the events, but relative ones from the
symbol subsystem, so calculate the absolute address by asking for the
map where the symbol was found, that has the place where the DSO was
actually loaded.

For the core kernel this poses no problems if the kernel is not
relocated by things like kexec, or if we use /proc/kallsyms, but for
modules we were getting really large, negative offsets.

LKML-Reference: <new-submission>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf kmem: Resolve kernel symbols again
Arnaldo Carvalho de Melo [Thu, 1 Apr 2010 22:12:13 +0000 (19:12 -0300)]
perf kmem: Resolve kernel symbols again

Due to the assumption in perf_session__new that the kernel maps would be
created using the fake PERF_RECORD_MMAP event in a perf.data file 'perf
kmem --stat caller', that doesn't have such event, ends up not being
able to resolve the kernel addresses.

Fix it by calling perf_session__create_kernel_maps() in __cmd_kmem().

LKML-Reference: <new-submission>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf hist: Replace ->print() routines by ->snprintf() equivalents
Arnaldo Carvalho de Melo [Wed, 31 Mar 2010 14:33:40 +0000 (11:33 -0300)]
perf hist: Replace ->print() routines by ->snprintf() equivalents

Then hist_entry__fprintf will just us the newly introduced
hist_entry__snprintf, add the newline and fprintf it to the supplied
FILE descriptor.

This allows us to remove the use_browser checking in the color_printf
routines, that now got color_snprintf variants too.

The newt TUI browser (and other GUIs that may come in the future) don't
have to worry about stdio specific stuff in the strings they get from
the se->snprintf routines and instead use whatever means to do the
equivalent.

Also the newt TUI browser don't have to use the fmemopen() hack, instead
it can use the se->snprintf routines directly. For now tho use the
hist_entry__snprintf routine to reduce the patch size.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf record: Add a fallback to the reference relocation symbol
Arnaldo Carvalho de Melo [Tue, 30 Mar 2010 21:27:39 +0000 (18:27 -0300)]
perf record: Add a fallback to the reference relocation symbol

Usually "_text" is enough, but I received reports that its not always
available, so fallback to "_stext" for the symbol we use to check if we
need to apply any relocation to all the symbols in the kernel symtab,
for when, for instance, kexec is being used.

Reported-by: Darren Hart <dvhltc@us.ibm.com>
Cc: Darren Hart <dvhltc@us.ibm.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf tools: Allow specifying O= to build files in a separate directory
Arnaldo Carvalho de Melo [Sat, 27 Mar 2010 17:30:45 +0000 (14:30 -0300)]
perf tools: Allow specifying O= to build files in a separate directory

Avoiding polluting the source tree with build files.

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf tools: Use -o $(BITBUCKET) in one more case
Arnaldo Carvalho de Melo [Sat, 27 Mar 2010 14:43:36 +0000 (11:43 -0300)]
perf tools: Use -o $(BITBUCKET) in one more case

As described in 1703f2c some gcc versions has issues using /dev/null, so
use the mechanism used elsewhere.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf report: Add progress bars
Arnaldo Carvalho de Melo [Sat, 27 Mar 2010 00:16:22 +0000 (21:16 -0300)]
perf report: Add progress bars

For when we are processing the events and inserting the entries in the
browser.

Experimentation here: naming "ui_something" we may be treading into
creating a TUI/GUI set of routines that can then be implemented in terms
of multiple backends.

Also the time it takes for adding things to the "browser" takes, visually
(I guess I should do some profiling here ;-) ), more time than for
processing the events...

That means we probably need to create a custom hist_entry browser, so
that we reuse the structures we have in place instead of duplicating
them in newt.

But progress was made and at least we can see something while long files
are being loaded, that must be one of UI 101 bullet points :-)

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf symbols: map_groups__find_symbol must return the map too
Arnaldo Carvalho de Melo [Fri, 26 Mar 2010 15:30:40 +0000 (12:30 -0300)]
perf symbols: map_groups__find_symbol must return the map too

Tools need to know from which map in the map_group a symbol was resolved
to, so that, for isntance, we can annotate kernel modules symbols by
getting its precise name, etc.

Also add the _by_name variants for completeness.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf symbols: Move more map_groups methods to map.c
Arnaldo Carvalho de Melo [Fri, 26 Mar 2010 15:11:06 +0000 (12:11 -0300)]
perf symbols: Move more map_groups methods to map.c

While writing a standalone test app that uses the symbol system to
find kernel space symbols I noticed these also need to be moved.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
14 years agoperf, x86: Add Nehalem programming quirk to Westmere
Peter Zijlstra [Mon, 29 Mar 2010 14:37:17 +0000 (16:37 +0200)]
perf, x86: Add Nehalem programming quirk to Westmere

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>
14 years agoperf, x86: Fix __initconst vs const
Peter Zijlstra [Mon, 29 Mar 2010 11:09:53 +0000 (13:09 +0200)]
perf, x86: Fix __initconst vs const

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>
14 years agoperf, x86: Fix up the ANY flag stuff
Peter Zijlstra [Tue, 30 Mar 2010 15:00:06 +0000 (17:00 +0200)]
perf, x86: Fix up the ANY flag stuff

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>
14 years agoperf, x86: implement ARCH_PERFMON_EVENTSEL bit masks
Robert Richter [Tue, 30 Mar 2010 09:28:21 +0000 (11:28 +0200)]
perf, x86: implement ARCH_PERFMON_EVENTSEL bit masks

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>
14 years agoperf, x86: Undo some some *_counter* -> *_event* renames
Robert Richter [Mon, 29 Mar 2010 16:36:50 +0000 (18:36 +0200)]
perf, x86: Undo some some *_counter* -> *_event* renames

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>
14 years agoMerge branch 'perf/urgent' into perf/core
Ingo Molnar [Fri, 2 Apr 2010 17:37:50 +0000 (19:37 +0200)]
Merge branch 'perf/urgent' into perf/core

Conflicts:
arch/x86/kernel/cpu/perf_event.c

Merge reason: Resolve the conflict, pick up fixes

Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf probe: Fix to close dwarf when failing to analyze it
Masami Hiramatsu [Fri, 2 Apr 2010 16:50:59 +0000 (12:50 -0400)]
perf probe: Fix to close dwarf when failing to analyze it

Fix to close libdw routine when failing to analyze it in
find_perf_probe_point().

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100402165059.23551.95587.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf probe: Correct error message for non-structure type
Masami Hiramatsu [Fri, 2 Apr 2010 16:50:53 +0000 (12:50 -0400)]
perf probe: Correct error message for non-structure type

perf probe outputs incorrect error message when it is called with
non-existent field on a non-data structure local variable.

<Before>
 # perf probe vfs_read 'count.hoge'
  Fatal: Structure on a register is not supported yet.
 # perf probe vfs_read 'count->hoge'
  Fatal: Semantic error: hoge must be referred by '.'

This corrects the messsage.

<After>
 # perf probe vfs_read 'count.hoge'
  Fatal: count is not a data structure.
 # perf probe vfs_read 'count->hoge'
  Fatal: count is not a data structure.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100402165052.23551.75866.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf probe: Fix not to return non-matched file
Masami Hiramatsu [Fri, 2 Apr 2010 16:50:45 +0000 (12:50 -0400)]
perf probe: Fix not to return non-matched file

Fix cu_find_realpath() not to return the last file path
if that is not matched to input pattern.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100402165045.23551.47780.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf probe: Fix --line syntax help and document
Masami Hiramatsu [Fri, 2 Apr 2010 16:50:39 +0000 (12:50 -0400)]
perf probe: Fix --line syntax help and document

Just fix typos. --line option accepts ':START-END' syntax,
not ':START:END'.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100402165038.23551.62590.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf: Fix 'perf sched record' deadlock
Mike Galbraith [Fri, 26 Mar 2010 10:11:33 +0000 (11:11 +0100)]
perf: Fix 'perf sched record' deadlock

perf sched record can deadlock a box should the holder of
handle->data->lock take an interrupt, and then attempt to
acquire an rq lock held by a CPU trying to acquire the
same lock. Disable interrupts.

   CPU0                            CPU1
   sched event with rq->lock held
                                   grab handle->data->lock
   spin on handle->data->lock
                                   interrupt
                                   try to grab rq->lock

Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1269598293.6174.8.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf, x86: Fix callgraphs of 32-bit processes on 64-bit kernels
Torok Edwin [Wed, 17 Mar 2010 10:07:16 +0000 (12:07 +0200)]
perf, x86: Fix callgraphs of 32-bit processes on 64-bit kernels

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>
14 years agoperf, x86: Fix AMD hotplug & constraint initialization
Peter Zijlstra [Tue, 23 Mar 2010 18:31:15 +0000 (19:31 +0100)]
perf, x86: Fix AMD hotplug & constraint initialization

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>
14 years agox86: Move notify_cpu_starting() callback to a later stage
Peter Zijlstra [Tue, 23 Mar 2010 18:30:52 +0000 (19:30 +0100)]
x86: Move notify_cpu_starting() callback to a later stage

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>
14 years agoMerge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic...
Ingo Molnar [Fri, 2 Apr 2010 17:29:17 +0000 (19:29 +0200)]
Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/urgent

14 years agoMerge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Thu, 1 Apr 2010 16:19:42 +0000 (09:19 -0700)]
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (76 commits)
  drm/radeon/kms: enable ACPI powermanagement mode on radeon gpus.
  drm/radeon/kms: rs400/480 should set common registers.
  drm/radeon/kms: add sanity check to wptr.
  drm/radeon/kms/evergreen: get DP working
  drm/radeon/kms: add hw_i2c module option
  drm/radeon/kms: use new pre/post_xfer i2c bit algo hooks
  drm/radeon/kms: disable MSI on IGP chips
  drm/radeon/kms: display watermark updates (v2)
  drm/radeon/kms/dp: disable training pattern on the sink at the end of link training
  drm/radeon/kms: minor fixes for eDP with LCD* device tags (v2)
  drm/radeon/kms/dp: remove extraneous training complete call
  drm/radeon/kms/atom: minor fixes to transmitter setup
  drm/radeon/kms: Only restrict BO to visible VRAM size when pinning to VRAM.
  drm: fix build error when SYSRQ is disabled
  drm/radeon/kms: fix macbookpro connector quirk
  drm/radeon/r6xx/r7xx: further safe reg clean up
  drm/radeon: bump the UMS driver version for r6xx/r7xx const buffer support
  drm/radeon/kms: bump the version for r6xx/r7xx const buffer support
  drm/radeon/r6xx/r7xx: CS parser fixes
  drm/radeon/kms: fix some typos in r6xx/r7xx hpd setup
  ...

Fix up MSI-related conflicts in drivers/gpu/drm/radeon/radeon_irq_kms.c

14 years agoMerge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze
Linus Torvalds [Thu, 1 Apr 2010 16:14:20 +0000 (09:14 -0700)]
Merge branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze

* 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze: (35 commits)
  microblaze: Support word copying in copy_tofrom_user
  microblaze: Print early printk information to log buffer
  microblaze: head.S typo fix
  microblaze: Use MICROBLAZE_TLB_SIZE in asm code
  microblaze: Kconfig Fix - pci
  microblaze: Adding likely macros
  microblaze: Add .type and .size to ASM functions
  microblaze: Fix TLB macros
  microblaze: Use instruction with delay slot
  microblaze: Remove additional resr and rear loading
  microblaze: Change register usage for ESR and EAR
  microblaze: Prepare work for optimization in exception code
  microblaze: Add DEBUG option
  microblaze: Support systems without lmb bram
  microblaze: uaccess: Sync strlen, strnlen, copy_to/from_user
  microblaze: uaccess: Unify __copy_tofrom_user
  microblaze: uaccess: Move functions to generic location
  microblaze: uaccess: Fix put_user for noMMU
  microblaze: uaccess: Fix get_user macro for noMMU
  microblaze: uaccess: fix clear_user for noMMU kernel
  ...

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
Linus Torvalds [Thu, 1 Apr 2010 16:13:57 +0000 (09:13 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
  eeepc-wmi: new driver for WMI based hotkeys on Eee PC laptops
  asus-laptop: fix warning in asus_handle_init

14 years agooom: fix the unsafe usage of badness() in proc_oom_score()
Oleg Nesterov [Thu, 1 Apr 2010 13:13:57 +0000 (15:13 +0200)]
oom: fix the unsafe usage of badness() in proc_oom_score()

proc_oom_score(task) has a reference to task_struct, but that is all.
If this task was already released before we take tasklist_lock

- we can't use task->group_leader, it points to nowhere

- it is not safe to call badness() even if this task is
  ->group_leader, has_intersects_mems_allowed() assumes
  it is safe to iterate over ->thread_group list.

- even worse, badness() can hit ->signal == NULL

Add the pid_alive() check to ensure __unhash_process() was not called.

Also, use "task" instead of task->group_leader. badness() should return
the same result for any sub-thread. Currently this is not true, but
this should be changed anyway.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomicroblaze: Support word copying in copy_tofrom_user
Michal Simek [Mon, 22 Mar 2010 19:31:26 +0000 (20:31 +0100)]
microblaze: Support word copying in copy_tofrom_user

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>
14 years agomicroblaze: Print early printk information to log buffer
Michal Simek [Wed, 24 Mar 2010 10:07:10 +0000 (11:07 +0100)]
microblaze: Print early printk information to log buffer

If early printk console is not enabled then all messages
are written to log buffer.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: head.S typo fix
Michal Simek [Wed, 24 Mar 2010 10:06:23 +0000 (11:06 +0100)]
microblaze: head.S typo fix

I forget to change register name in comments.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Use MICROBLAZE_TLB_SIZE in asm code
Michal Simek [Wed, 24 Mar 2010 09:09:17 +0000 (10:09 +0100)]
microblaze: Use MICROBLAZE_TLB_SIZE in asm code

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>
14 years agomicroblaze: Kconfig Fix - pci
Michal Simek [Tue, 23 Mar 2010 14:46:10 +0000 (15:46 +0100)]
microblaze: Kconfig Fix - pci

I forget to remove pci Kconfig option.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Adding likely macros
Michal Simek [Tue, 23 Mar 2010 14:37:02 +0000 (15:37 +0100)]
microblaze: Adding likely macros

On the base on GCOV analytics is helpful to add likely/unlikely
macros.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Add .type and .size to ASM functions
Michal Simek [Tue, 23 Mar 2010 07:09:32 +0000 (08:09 +0100)]
microblaze: Add .type and .size to ASM functions

Cachegrind analysis need this fix to be able to log asm functions.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Fix TLB macros
Michal Simek [Mon, 22 Mar 2010 13:54:35 +0000 (14:54 +0100)]
microblaze: Fix TLB macros

To be able to do trace TLB operations.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Use instruction with delay slot
Michal Simek [Mon, 22 Mar 2010 19:43:27 +0000 (20:43 +0100)]
microblaze: Use instruction with delay slot

Sync labels.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Remove additional resr and rear loading
Michal Simek [Fri, 19 Mar 2010 11:50:35 +0000 (12:50 +0100)]
microblaze: Remove additional resr and rear loading

RESR and REAR uses the same regs in whole file.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Change register usage for ESR and EAR
Michal Simek [Fri, 19 Mar 2010 11:44:40 +0000 (12:44 +0100)]
microblaze: Change register usage for ESR and EAR

This change synchronize register usage in code.
ESR = R4
EAR = R3

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Prepare work for optimization in exception code
Michal Simek [Mon, 22 Mar 2010 19:37:23 +0000 (20:37 +0100)]
microblaze: Prepare work for optimization in exception code

Any sync branch must follow mts instructions not mfs.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Add DEBUG option
Michal Simek [Thu, 18 Mar 2010 06:23:04 +0000 (07:23 +0100)]
microblaze: Add DEBUG option

Disable debug option in asm code.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Support systems without lmb bram
Michal Simek [Mon, 15 Mar 2010 07:48:27 +0000 (08:48 +0100)]
microblaze: Support systems without lmb bram

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>
14 years agomicroblaze: uaccess: Sync strlen, strnlen, copy_to/from_user
Michal Simek [Mon, 22 Mar 2010 17:49:45 +0000 (18:49 +0100)]
microblaze: uaccess: Sync strlen, strnlen, copy_to/from_user

Last sync.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: uaccess: Unify __copy_tofrom_user
Michal Simek [Mon, 22 Mar 2010 17:39:20 +0000 (18:39 +0100)]
microblaze: uaccess: Unify __copy_tofrom_user

Move to generic location.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: uaccess: Move functions to generic location
Michal Simek [Mon, 22 Mar 2010 17:23:45 +0000 (18:23 +0100)]
microblaze: uaccess: Move functions to generic location

noMMU and MMU use them.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: uaccess: Fix put_user for noMMU
Michal Simek [Mon, 22 Mar 2010 15:22:41 +0000 (16:22 +0100)]
microblaze: uaccess: Fix put_user for noMMU

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>
14 years agomicroblaze: uaccess: Fix get_user macro for noMMU
Michal Simek [Mon, 8 Mar 2010 09:52:24 +0000 (10:52 +0100)]
microblaze: uaccess: Fix get_user macro for noMMU

Use unified version.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: uaccess: fix clear_user for noMMU kernel
Michal Simek [Mon, 22 Mar 2010 15:02:59 +0000 (16:02 +0100)]
microblaze: uaccess: fix clear_user for noMMU kernel

Previous patches fixed only MMU version and this is the first
patch for noMMU kernel

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: uaccess: Fix strncpy_from_user function
Michal Simek [Mon, 8 Mar 2010 08:38:02 +0000 (09:38 +0100)]
microblaze: uaccess: Fix strncpy_from_user function

Generic implementation for noMMU and MMU version

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: uaccess: fix copy_from_user macro
Michal Simek [Mon, 22 Mar 2010 14:56:32 +0000 (15:56 +0100)]
microblaze: uaccess: fix copy_from_user macro

copy_from_user macro also use copy_tofrom_user function

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: uaccess: copy_to_user unification
Michal Simek [Mon, 22 Mar 2010 14:52:53 +0000 (15:52 +0100)]
microblaze: uaccess: copy_to_user unification

noMMU and MMU kernel will use copy copy_tofrom_user
asm implementation.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: uaccess: sync put/get/clear_user macros
Michal Simek [Mon, 22 Mar 2010 14:46:56 +0000 (15:46 +0100)]
microblaze: uaccess: sync put/get/clear_user macros

Add macro description and resort.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: uaccess: fix put_user and get_user macros
Michal Simek [Mon, 22 Mar 2010 14:25:12 +0000 (15:25 +0100)]
microblaze: uaccess: fix put_user and get_user macros

Use FIXUP macros and resort them.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: uaccess: fix __get_user_asm macro
Michal Simek [Fri, 5 Mar 2010 17:03:53 +0000 (18:03 +0100)]
microblaze: uaccess: fix __get_user_asm macro

It is used __FIXUP_SECTION and __EX_TABLE_SECTION macros.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: uaccess: fix clean user macro
Michal Simek [Fri, 5 Mar 2010 15:50:01 +0000 (16:50 +0100)]
microblaze: uaccess: fix clean user macro

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>
14 years agomicroblaze: move noMMU __range_ok function to uaccess.h
Michal Simek [Fri, 5 Mar 2010 14:49:53 +0000 (15:49 +0100)]
microblaze: move noMMU __range_ok function to uaccess.h

The same noMMU and MMU functions should be placed in
one file.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Move exception_table_entry upward
Michal Simek [Fri, 5 Mar 2010 14:37:57 +0000 (15:37 +0100)]
microblaze: Move exception_table_entry upward

Just sort to be able remove whole block.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Remove segment.h
Michal Simek [Fri, 5 Mar 2010 14:34:12 +0000 (15:34 +0100)]
microblaze: Remove segment.h

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>
14 years agomicroblaze: Remove memset in free_init_pages
Michal Simek [Wed, 3 Mar 2010 16:03:21 +0000 (17:03 +0100)]
microblaze: Remove memset in free_init_pages

We don't need to do it.

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: Makefile cleanups
Arun Bhanu [Wed, 17 Mar 2010 08:06:04 +0000 (16:06 +0800)]
microblaze: Makefile cleanups

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>
14 years agomicroblaze: Fix Makefile to delete build generated files
Arun Bhanu [Wed, 17 Mar 2010 08:06:03 +0000 (16:06 +0800)]
microblaze: Fix Makefile to delete build generated files

'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>
14 years agomicroblaze: Add a missing single quote to make 'make help' happy
Arun Bhanu [Fri, 12 Mar 2010 08:31:40 +0000 (16:31 +0800)]
microblaze: Add a missing single quote to make 'make help' happy

'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>
14 years agomicroblaze: Fix "kstack=" parsing
Steven J. Magnani [Wed, 24 Feb 2010 20:54:15 +0000 (14:54 -0600)]
microblaze: Fix "kstack=" parsing

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>
14 years agox86,kgdb: Always initialize the hw breakpoint attribute
Jason Wessel [Tue, 30 Mar 2010 19:05:07 +0000 (14:05 -0500)]
x86,kgdb: Always initialize the hw breakpoint attribute

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>
14 years agoperf: Use hot regs with software sched switch/migrate events
Frederic Weisbecker [Mon, 22 Mar 2010 18:40:03 +0000 (19:40 +0100)]
perf: Use hot regs with software sched switch/migrate events

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>
14 years agoperf: Correctly align perf event tracing buffer
Frederic Weisbecker [Mon, 22 Mar 2010 23:08:59 +0000 (00:08 +0100)]
perf: Correctly align perf event tracing buffer

The trace event buffer used by perf to record raw sample events
is typed as an array of char and may then not be aligned to 8
by alloc_percpu().

But we need it to be aligned to 8 in sparc64 because we cast
this buffer into a random structure type built by the TRACE_EVENT()
macro to store the traces. So if a random 64 bits field is accessed
inside, it may be not under an expected good alignment.

Use an array of long instead to force the appropriate alignment, and
perform a compile time check to ensure the size in byte of the buffer
is a multiple of sizeof(long) so that its actual size doesn't get
shrinked under us.

This fixes unaligned accesses reported while using perf lock
in sparc 64.

Suggested-by: David Miller <davem@davemloft.net>
Suggested-by: Tejun Heo <htejun@gmail.com>
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>
Cc: Steven Rostedt <rostedt@goodmis.org>
14 years agodrm/radeon/kms: enable ACPI powermanagement mode on radeon gpus.
Dave Airlie [Wed, 31 Mar 2010 03:41:35 +0000 (13:41 +1000)]
drm/radeon/kms: enable ACPI powermanagement mode on radeon gpus.

Some GPUs have an APM/ACPI PM mode selection switch and some BIOSes
set this to APM. We really want this in ACPI mode for Linux.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: rs400/480 should set common registers.
Dave Airlie [Wed, 31 Mar 2010 03:42:50 +0000 (13:42 +1000)]
drm/radeon/kms: rs400/480 should set common registers.

These GPUs should be setting these registers up also.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: add sanity check to wptr.
Dave Airlie [Wed, 31 Mar 2010 03:38:56 +0000 (13:38 +1000)]
drm/radeon/kms: add sanity check to wptr.

If we resume in a bad way, we'll get 0xffffffff in wptr, and then
oops with no console. This just adds a sanity check so that we can
avoid the oops and hopefully get more details out of people's systems.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/evergreen: get DP working
Alex Deucher [Wed, 31 Mar 2010 18:42:11 +0000 (14:42 -0400)]
drm/radeon/kms/evergreen: get DP working

Need to enable the VID stream after link training

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoeeepc-wmi: new driver for WMI based hotkeys on Eee PC laptops
Yong Wang [Sun, 21 Mar 2010 02:26:34 +0000 (10:26 +0800)]
eeepc-wmi: new driver for WMI based hotkeys on Eee PC laptops

Add a WMI driver for Eee PC laptops. Currently it only supports hotkeys.

Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoasus-laptop: fix warning in asus_handle_init
Corentin Chary [Tue, 2 Mar 2010 21:24:12 +0000 (22:24 +0100)]
asus-laptop: fix warning in asus_handle_init

In function 'asus_laptop_get_info':
warning: passing argument 3 of 'asus_handle_init' from incompatible pointer type
note: expected 'char **' but argument is of type 'const char **'

Introduced by commit c21085108a02e1b838c34f3650c8cc9fbd178615
("asus-laptop: fix style problems reported by checkpath.pl").

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
14 years agofat: fix buffer overflow in vfat_create_shortname()
Nikolaus Schulz [Wed, 31 Mar 2010 17:21:10 +0000 (02:21 +0900)]
fat: fix buffer overflow in vfat_create_shortname()

When using the string representation of a random counter as part of the base
name, ensure that it is no longer than 4 bytes.

Since we are repeatedly decrementing the counter in a loop until we have found a
unique base name, the counter may wrap around zero; therefore, it is not enough
to mask its higher bits before entering the loop, this must be done inside the
loop.

[hirofumi@mail.parknet.co.jp: use snprintf()]
Signed-off-by: Nikolaus Schulz <microschulz@web.de>
Cc: stable@kernel.org
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodrm/radeon/kms: add hw_i2c module option
Alex Deucher [Wed, 17 Mar 2010 06:07:37 +0000 (02:07 -0400)]
drm/radeon/kms: add hw_i2c module option

Turn off hw i2c by default except for mm i2c which
is hw only until we sort out the remaining prescale
issues on older chips.  hw i2c can be enabled with
hw_i2c=1.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: use new pre/post_xfer i2c bit algo hooks
Alex Deucher [Sun, 14 Mar 2010 16:22:44 +0000 (12:22 -0400)]
drm/radeon/kms: use new pre/post_xfer i2c bit algo hooks

This allows us to remove the internal bit algo bus used by
the radeon i2c algo.  We now register a radeon algo adapter
if the gpio line is hw capable and the hw inplementation is
available, otherwise we register a bit algo adapter.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge branch 'v2.6.34-rc2' into drm-linus
Dave Airlie [Wed, 31 Mar 2010 04:55:14 +0000 (14:55 +1000)]
Merge branch 'v2.6.34-rc2' into drm-linus

14 years agodrm/radeon/kms: disable MSI on IGP chips
Alex Deucher [Tue, 30 Mar 2010 21:22:32 +0000 (17:22 -0400)]
drm/radeon/kms: disable MSI on IGP chips

Doesn't seem to work reliably and the pci quirks don't
always work.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: display watermark updates (v2)
Alex Deucher [Wed, 31 Mar 2010 04:33:27 +0000 (00:33 -0400)]
drm/radeon/kms: display watermark updates (v2)

- Add module option to force the display priority
  0 = auto, 1 = normal, 2 = high
- Default to high on r3xx/r4xx/rv515 chips
  Fixes flickering problems during heavy acceleration
  due to underflow to the display controllers
- Fill in minimal support for RS600

v2 - update display priority when bandwidth is updated
so the user can change the parameter at runtime and it
will take affect on the next modeset.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/dp: disable training pattern on the sink at the end of link training
Alex Deucher [Tue, 30 Mar 2010 06:03:48 +0000 (02:03 -0400)]
drm/radeon/kms/dp: disable training pattern on the sink at the end of link training

Seems to have gotten lost in the evergreen merge.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: minor fixes for eDP with LCD* device tags (v2)
Alex Deucher [Tue, 30 Mar 2010 01:37:08 +0000 (21:37 -0400)]
drm/radeon/kms: minor fixes for eDP with LCD* device tags (v2)

Some systems have LCD* rather than DFP* device tags in the bios
for eDP connectors; notably the new apple iMac. This fixes
things up so eDP connectors with either tag will work.

v2: fix typo

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/dp: remove extraneous training complete call
Alex Deucher [Mon, 29 Mar 2010 18:06:10 +0000 (14:06 -0400)]
drm/radeon/kms/dp: remove extraneous training complete call

Looks like a copy/paste typo from when evergreen support
was added.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/atom: minor fixes to transmitter setup
Alex Deucher [Mon, 29 Mar 2010 21:39:44 +0000 (17:39 -0400)]
drm/radeon/kms/atom: minor fixes to transmitter setup

- 8 lane links are not valid for DP
- remove unused num var

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: Only restrict BO to visible VRAM size when pinning to VRAM.
Michel Dänzer [Fri, 26 Mar 2010 19:18:55 +0000 (19:18 +0000)]
drm/radeon/kms: Only restrict BO to visible VRAM size when pinning to VRAM.

This prevented radeon.test=1 from testing transfers from/to GTT beyond the
visible VRAM size.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm: fix build error when SYSRQ is disabled
Randy Dunlap [Thu, 25 Mar 2010 18:29:05 +0000 (18:29 +0000)]
drm: fix build error when SYSRQ is disabled

Fix build error when CONFIG_MAGIC_SYSRQ is not enabled:

drivers/gpu/drm/drm_fb_helper.c:915: error: 'sysrq_drm_fb_helper_restore_op' undeclared (first use in this function)
drivers/gpu/drm/drm_fb_helper.c:929: error: 'sysrq_drm_fb_helper_restore_op' undeclared (first use in this function)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: fix macbookpro connector quirk
Alex Deucher [Fri, 26 Mar 2010 21:14:37 +0000 (17:14 -0400)]
drm/radeon/kms: fix macbookpro connector quirk

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/r6xx/r7xx: further safe reg clean up
Alex Deucher [Fri, 26 Mar 2010 23:36:33 +0000 (19:36 -0400)]
drm/radeon/r6xx/r7xx: further safe reg clean up

- remove a few more drm only regs
- remove sampler, alu, bool, loop constant regs.
  They are set via separate packet3's already

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>