Ingo Molnar [Tue, 27 Jan 2009 13:30:57 +0000 (14:30 +0100)]
Merge branches 'tracing/blktrace', 'tracing/kmemtrace' and 'tracing/urgent' into tracing/core
Arnaldo Carvalho de Melo [Mon, 26 Jan 2009 18:00:40 +0000 (16:00 -0200)]
blktrace: the ftrace interface needs CONFIG_TRACING
Impact: build fix
Also mention in the help text that blktrace now can be used using
the ftrace interface.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Arnaldo Carvalho de Melo [Mon, 26 Jan 2009 17:00:56 +0000 (15:00 -0200)]
tracing/blktrace: fix up checkpatch reported problems in ftrace plugin patch
Also make sure sparse (make C=2 block/blktrace.o) is happy too.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Arnaldo Carvalho de Melo [Fri, 23 Jan 2009 14:06:27 +0000 (12:06 -0200)]
blktrace: add ftrace plugin
Impact: New way of using the blktrace infrastructure
This drops the requirement of userspace utilities to use the blktrace
facility.
Configuration is done thru sysfs, adding a "trace" directory to the
partition directory where blktrace can be enabled for the associated
request_queue.
The same filters present in the IOCTL interface are present as sysfs
device attributes.
The /sys/block/sdX/sdXN/trace/enable file allows tracing without any
filters.
The other files in this directory: pid, act_mask, start_lba and end_lba
can be used with the same meaning as with the IOCTL interface.
Using the sysfs interface will only setup the request_queue->blk_trace
fields, tracing will only take place when the "blk" tracer is selected
via the ftrace interface, as in the following example:
To see the trace, one can use the /d/tracing/trace file or the
/d/tracign/trace_pipe file, with semantics defined in the ftrace
documentation in Documentation/ftrace.txt.
[root@f10-1 ~]# cat /t/trace
kjournald-305 [000] 3046.491224: 8,1 A WBS 6367 + 8 <- (8,1) 6304
kjournald-305 [000] 3046.491227: 8,1 Q R 6367 + 8 [kjournald]
kjournald-305 [000] 3046.491236: 8,1 G RB 6367 + 8 [kjournald]
kjournald-305 [000] 3046.491239: 8,1 P NS [kjournald]
kjournald-305 [000] 3046.491242: 8,1 I RBS 6367 + 8 [kjournald]
kjournald-305 [000] 3046.491251: 8,1 D WB 6367 + 8 [kjournald]
kjournald-305 [000] 3046.491610: 8,1 U WS [kjournald] 1
<idle>-0 [000] 3046.511914: 8,1 C RS 6367 + 8 [6367]
[root@f10-1 ~]#
The default line context (prefix) format is the one described in the ftrace
documentation, with the blktrace specific bits using its existing format,
described in blkparse(8).
If one wants to have the classic blktrace formatting, this is possible by
using:
[root@f10-1 ~]# echo blk_classic > /t/trace_options
[root@f10-1 ~]# cat /t/trace
8,1 0 3046.491224 305 A WBS 6367 + 8 <- (8,1) 6304
8,1 0 3046.491227 305 Q R 6367 + 8 [kjournald]
8,1 0 3046.491236 305 G RB 6367 + 8 [kjournald]
8,1 0 3046.491239 305 P NS [kjournald]
8,1 0 3046.491242 305 I RBS 6367 + 8 [kjournald]
8,1 0 3046.491251 305 D WB 6367 + 8 [kjournald]
8,1 0 3046.491610 305 U WS [kjournald] 1
8,1 0 3046.511914 0 C RS 6367 + 8 [6367]
[root@f10-1 ~]#
Using the ftrace standard format allows more flexibility, such
as the ability of asking for backtraces via trace_options:
[root@f10-1 ~]# echo noblk_classic > /t/trace_options
[root@f10-1 ~]# echo stacktrace > /t/trace_options
[root@f10-1 ~]# cat /t/trace
kjournald-305 [000] 3318.826779: 8,1 A WBS 6375 + 8 <- (8,1) 6312
kjournald-305 [000] 3318.826782:
<= submit_bio
<= submit_bh
<= sync_dirty_buffer
<= journal_commit_transaction
<= kjournald
<= kthread
<= child_rip
kjournald-305 [000] 3318.826836: 8,1 Q R 6375 + 8 [kjournald]
kjournald-305 [000] 3318.826837:
<= generic_make_request
<= submit_bio
<= submit_bh
<= sync_dirty_buffer
<= journal_commit_transaction
<= kjournald
<= kthread
Please read the ftrace documentation to use aditional, standardized
tracing filters such as /d/tracing/trace_cpumask, etc.
See also /d/tracing/trace_mark to add comments in the trace stream,
that is equivalent to the /d/block/sdaN/msg interface.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Arnaldo Carvalho de Melo [Fri, 23 Jan 2009 14:06:23 +0000 (12:06 -0200)]
ftrace: add ftrace_vprintk
Impact: new helper function
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Randy Dunlap [Fri, 23 Jan 2009 21:03:37 +0000 (13:03 -0800)]
kmemtrace: fix printk format warnings
Fix kmemtrace printk warnings:
kernel/trace/kmemtrace.c:142: warning: format '%4ld' expects type 'long int', but argument 3 has type 'size_t'
kernel/trace/kmemtrace.c:147: warning: format '%4ld' expects type 'long int', but argument 3 has type 'size_t'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Mon, 26 Jan 2009 13:01:52 +0000 (14:01 +0100)]
Merge branches 'tracing/ftrace' and 'tracing/function-graph-tracer' into tracing/core
Frederic Weisbecker [Fri, 23 Jan 2009 01:04:53 +0000 (17:04 -0800)]
tracing/function-graph-tracer: various fixes and features
This patch brings various bugfixes:
- Drop the first irrelevant task switch on the very beginning of a trace.
- Drop the OVERHEAD word from the headers, the DURATION word is sufficient
and will not overlap other columns.
- Make the headers fit well their respective columns whatever the
selected options.
Ie, default options:
# tracer: function_graph
#
# CPU DURATION FUNCTION CALLS
# | | | | | | |
1) 0.646 us | }
1) | mem_cgroup_del_lru_list() {
1) 0.624 us | lookup_page_cgroup();
1) 1.970 us | }
echo funcgraph-proc > trace_options
# tracer: function_graph
#
# CPU TASK/PID DURATION FUNCTION CALLS
# | | | | | | | | |
0) bash-2937 | 0.895 us | }
0) bash-2937 | 0.888 us | __rcu_read_unlock();
0) bash-2937 | 0.864 us | conv_uni_to_pc();
0) bash-2937 | 1.015 us | __rcu_read_lock();
echo nofuncgraph-cpu > trace_options
echo nofuncgraph-proc > trace_options
# tracer: function_graph
#
# DURATION FUNCTION CALLS
# | | | | | |
3.752 us | native_pud_val();
0.616 us | native_pud_val();
0.624 us | native_pmd_val();
About features, one can now disable the duration (this will hide the
overhead too for convenient reasons and because on doesn't need
overhead if it hasn't the duration):
echo nofuncgraph-duration > trace_options
# tracer: function_graph
#
# FUNCTION CALLS
# | | | |
cap_vm_enough_memory() {
__vm_enough_memory() {
vm_acct_memory();
}
}
}
And at last, an option to print the absolute time:
//Restart from default options
echo funcgraph-abstime > trace_options
# tracer: function_graph
#
# TIME CPU DURATION FUNCTION CALLS
# | | | | | | | |
261.339774 | 1) + 42.823 us | }
261.339775 | 1) 1.045 us | _spin_lock_irq();
261.339777 | 1) 0.940 us | _spin_lock_irqsave();
261.339778 | 1) 0.752 us | _spin_unlock_irqrestore();
261.339780 | 1) 0.857 us | _spin_unlock_irq();
261.339782 | 1) | flush_to_ldisc() {
261.339783 | 1) | tty_ldisc_ref() {
261.339783 | 1) | tty_ldisc_try() {
261.339784 | 1) 1.075 us | _spin_lock_irqsave();
261.339786 | 1) 0.842 us | _spin_unlock_irqrestore();
261.339788 | 1) 4.211 us | }
261.339788 | 1) 5.662 us | }
The format is seconds.usecs.
I guess no one needs the nanosec precision here, the main goal is to have
an overview about the general timings of events, and to see the place when
the trace switches from one cpu to another.
ie:
274.874760 | 1) 0.676 us | _spin_unlock();
274.874762 | 1) 0.609 us | native_load_sp0();
274.874763 | 1) 0.602 us | native_load_tls();
274.878739 | 0) 0.722 us | }
274.878740 | 0) 0.714 us | native_pmd_val();
274.878741 | 0) 0.730 us | native_pmd_val();
Here there is a 4000 usecs difference when we switch the cpu.
Changes in V2:
- Completely fix the first pointless task switch.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Fri, 23 Jan 2009 00:01:40 +0000 (19:01 -0500)]
trace, lockdep: manual preempt count adding for local_bh_disable
Impact: fix to preempt trace triggering lockdep check_flag failure
In local_bh_disable, the use of add_preempt_count causes the
preempt tracer to start recording the time preemption is off.
But because it already modified the preempt_count to show
softirqs disabled, and before it called the lockdep code to
handle this, it causes a state that lockdep can not handle.
The preempt tracer will reset the ring buffer on start of a trace,
and the ring buffer reset code does a spin_lock_irqsave. This
calls into lockdep and lockdep will fail when it detects the
invalid state of having softirqs disabled but the internal
current->softirqs_enabled is still set.
The fix is to manually add the SOFTIRQ_OFFSET to preempt count
and call the preempt tracer code outside the lockdep critical
area.
Thanks to Peter Zijlstra for suggesting this solution.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Thu, 22 Jan 2009 19:26:15 +0000 (14:26 -0500)]
trace: fix logic to start/stop counting
The logic in the tracing_start/stop code prevents the WARN_ON
from ever detecting if a start/stop pair was mismatched.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Thu, 22 Jan 2009 16:18:06 +0000 (11:18 -0500)]
trace: remove internal irqsoff disabling for trace output
Impact: cleanup of duplicate features
The trace output disables the ring buffer and prevents tracing to
occur. The code in irqsoff to do the same thing is no longer needed.
This patch removes it.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Fri, 23 Jan 2009 10:10:03 +0000 (11:10 +0100)]
Merge branch 'tracing/ftrace' into tracing/core
Markus Metzger [Mon, 19 Jan 2009 09:38:35 +0000 (10:38 +0100)]
x86, ds, bts: cleanup/fix DS configuration
Cleanup the cpuid check for DS configuration.
This also fixes a Corei7 CPUID enumeration bug.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Wed, 21 Jan 2009 23:45:57 +0000 (18:45 -0500)]
ring-buffer: reset timestamps when ring buffer is reset
Impact: fix bad times of recent resets
The ring buffer needs to reset its timestamps when reseting of the
buffer, otherwise the timestamps are stale and might be used to
calculate times in the buffer causing funny timestamps to appear.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Wed, 21 Jan 2009 23:45:57 +0000 (18:45 -0500)]
ring-buffer: reset timestamps when ring buffer is reset
Impact: fix bad times of recent resets
The ring buffer needs to reset its timestamps when reseting of the
buffer, otherwise the timestamps are stale and might be used to
calculate times in the buffer causing funny timestamps to appear.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Wed, 21 Jan 2009 22:17:04 +0000 (17:17 -0500)]
wakeup-tracer: show scheduling data in output
Impact: better data for wakeup tracer
This patch adds the wakeup and schedule calls that are used by
the scheduler tracer to make the wakeup tracer more readable.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Wed, 21 Jan 2009 21:24:46 +0000 (16:24 -0500)]
trace: separate out rt tasks from wakeup tracer
Impact: add option to trace all tasks or just RT tasks
The current wakeup tracer only traces RT task wakeups. This is
fine for those interested in wake up timings of RT tasks, but
it is useless for those that are interested in the causes
of long wakeups for non RT tasks.
This patch creates a "wakeup_rt" to implement the tracing of just
RT tasks (as the current "wakeup" does). And makes "wakeup" now
trace all tasks as an average developer would expect.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Wed, 21 Jan 2009 20:24:56 +0000 (15:24 -0500)]
ring-buffer: do not swap if recording is disabled
If the ring buffer recording has been disabled. Do not let
swapping of ring buffers occur. Simply return -EAGAIN.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Wed, 21 Jan 2009 19:36:52 +0000 (14:36 -0500)]
trace: do not disable wake up tracer on output of trace
Impact: fix to erased trace output
To try not to have the outputing of a trace interfere with the wakeup
tracer, it would disable tracing while the output was printing. But
if a trace had started when it was disabled, it can show a partial
trace. To try to solve this, on closing of the tracer, it would
clear the trace buffer.
The latency tracers (wakeup and irqsoff) have two buffers. One for
recording and one for holding the max trace that is printed. The
clearing of the trace above should only affect the recording buffer.
But for some reason it would move the erased trace to the print
buffer. Probably due to a race with the closing of the trace and
the saving ofhe max race.
The above is all pretty useless, and if the user does not want the
printing of the trace to be traced itself, then the user can manual
disable tracing. This patch removes all the code that tries to keep
the output of the tracer from modifying the trace.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Thu, 22 Jan 2009 09:26:30 +0000 (10:26 +0100)]
Merge branch 'tracing/ftrace' into tracing/core
Steven Rostedt [Fri, 16 Jan 2009 04:40:11 +0000 (23:40 -0500)]
trace: set max latency variable to zero on default
Impact: trace max latencies on start of latency tracing
This patch sets the max latency to zero whenever one of the
irq variant tracers or the wakeup tracer is set to current tracer.
Most developers expect to see output when starting up a latency
tracer. But since the max_latency is already set to max, and
it takes a latency greater than max_latency to be recorded, there
is no trace. This is not the expected behavior and has even confused
myself.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Wed, 14 Jan 2009 19:50:19 +0000 (14:50 -0500)]
trace: stop all recording to ring buffer on ftrace_dump
Impact: limit ftrace dump output
Currently ftrace_dump only calls ftrace_kill that is a fast way
to prevent the function tracer functions from being called (just sets
a flag and clears the function to call, nothing else). It is better
to also turn off any recording to the ring buffers as well.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Wed, 14 Jan 2009 17:24:42 +0000 (12:24 -0500)]
trace: print ftrace_dump at KERN_EMERG log level
Impact: fix to print out ftrace_dump when expected
I was debugging a hard race condition to only find out that
after I hit the race, my log level was not at level to show
KERN_INFO. The time it took to trigger the race was wasted because
I did not capture the trace.
Since ftrace_dump is only called from kernel oops (and only when
it is set in the kernel command line to do so), or when a
developer adds it to their own local tree, the log level of
the print should be at KERN_EMERG to make sure the print appears.
ftrace_dump is not called by a normal user setup, and will not
add extra unwanted print out to the console. There is no reason
it should be at KERN_INFO.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Lai Jiangshan [Mon, 12 Jan 2009 03:06:18 +0000 (11:06 +0800)]
ring_buffer: reset write when reserve buffer fail
Impact: reset struct buffer_page.write when interrupt storm
if struct buffer_page.write is not reset, any succedent committing
will corrupted ring_buffer:
static inline void
rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer)
{
......
cpu_buffer->commit_page->commit =
cpu_buffer->commit_page->write;
......
}
when "if (RB_WARN_ON(cpu_buffer, next_page == reader_page))", ring_buffer
is disabled, but some reserved buffers may haven't been committed.
we need reset struct buffer_page.write.
when "if (unlikely(next_page == cpu_buffer->commit_page))", ring_buffer
is still available, we should not corrupt it.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Frederic Weisbecker [Wed, 14 Jan 2009 21:33:27 +0000 (13:33 -0800)]
tracing/function-graph-tracer: fix a regression while suspend to disk
Impact: fix a crash while kernel image restore
When the function graph tracer is running and while suspend to disk, some racy
and dangerous things happen against this tracer.
The current task will save its registers including the stack pointer which
contains the return address hooked by the tracer. But the current task will
continue to enter other functions after that to save the memory, and then
it will store other return addresses, and finally loose the old depth which
matches the return address saved in the old stack (during the registers saving).
So on image restore, the code will return to wrong addresses.
And there are other things: on restore, the task will have it's "current"
pointer overwritten during registers restoring....switching from one task to
another... That would be insane to try to trace function graphs at these
stages.
This patch makes the function graph tracer listening on power events, making
it's tracing disabled for the current task (the one that performs the
hibernation work) while suspend/resume to disk, making the tracing safe
during hibernation.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Mon, 19 Jan 2009 19:32:51 +0000 (14:32 -0500)]
ring-buffer: fix alignment problem
Impact: fix to allow some archs to use the ring buffer
Commits in the ring buffer are checked by pointer arithmetic.
If the calculation is incorrect, then the commits will never take
place and the buffer will simply fill up and report an error.
Each page in the ring buffer has a small header:
struct buffer_data_page {
u64 time_stamp;
local_t commit;
unsigned char data[];
};
Unfortuntely, some of the calculations used sizeof(struct buffer_data_page)
to know the size of the header. But this is incorrect on some archs,
where sizeof(struct buffer_data_page) does not equal
offsetof(struct buffer_data_page, data), and on those archs, the commits
are never processed.
This patch replaces the sizeof with offsetof.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Lai Jiangshan [Fri, 16 Jan 2009 08:32:25 +0000 (16:32 +0800)]
trace_workqueue: use percpu data for workqueue stat
Impact: use percpu data instead of a global structure
Use:
static DEFINE_PER_CPU(struct workqueue_global_stats, all_workqueue_stat);
instead of allocating a global structure.
percpu data also works well on NUMA.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Markus Metzger [Mon, 19 Jan 2009 09:38:35 +0000 (10:38 +0100)]
x86, ds, bts: cleanup DS configuration
Cleanup the cpuid check for DS configuration.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Markus Metzger [Mon, 19 Jan 2009 09:35:58 +0000 (10:35 +0100)]
x86, ftrace, hw-branch-tracer: documentation
Document the hw-branch-tracer in the ftrace documentation.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Markus Metzger [Mon, 19 Jan 2009 09:29:16 +0000 (10:29 +0100)]
x86, ftrace, hw-branch-tracer: change trace format
Change the hw-branch-tracer format to be more readable.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Markus Metzger [Mon, 19 Jan 2009 09:33:31 +0000 (10:33 +0100)]
x86, ftrace, hw-branch-tracer: reset trace buffer on close
Reset the ftrace buffer on close. Since we use cyclic buffers, the
trace is not contiguous, anyway.
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Markus Metzger [Mon, 19 Jan 2009 09:31:01 +0000 (10:31 +0100)]
x86, ftrace, hw-branch-tracer: dump trace on oops
Dump the branch trace on an oops (based on ftrace_dump_on_oops).
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Markus Metzger [Mon, 19 Jan 2009 09:26:53 +0000 (10:26 +0100)]
x86, ftrace, hw-branch-tracer: support hotplug cpus
Support hotplug cpus.
Reported-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Sat, 17 Jan 2009 04:18:31 +0000 (23:18 -0500)]
ftrace: test for running of recordmcount.pl twice on an object
Impact: fix failure of dynamic function tracer selftest
In a course of development, a developer does several makes on their
kernel. Sometimes, the make might do something abnormal. In the
case of running the recordmcount.pl script on an object twice,
the script will duplicate all the calls to mcount in the __mcount_loc
section.
On boot up, the dynamic function tracer is careful when it modifies
code, and performs several consistency checks. One is to not modify
the call site if it is not what it expects it to be. If a function
call site is listed twice, the first entry will convert the site
to a nop, and the second will fail because it expected to see a
call to mcount, but instead it sees a nop. Thus, the function tracer
is disabled.
Eric Sesterhenn reported seeing:
[ 1.055440] ftrace: converting mcount calls to 0f 1f 44 00 00
[ 1.055568] ftrace: allocating 29418 entries in 116 pages
[ 1.061000] ------------[ cut here ]------------
[ 1.061000] WARNING: at kernel/trace/ftrace.c:441
[...]
[ 1.060000] ---[ end trace
4eaa2a86a8e2da23 ]---
[ 1.060000] ftrace failed to modify [<
c0118072>] check_corruption+0x3/0x2d
[ 1.060000] actual: 0f:1f:44:00:00
This warning shows that check_corruption+0x3 already had a nop in
its place (0x0f1f440000). After compiling another kernel the problem
went away.
Later Eric Paris notice the same type of issue. Luckily, he saved
the vmlinux file that caused it. In the file we found a bunch of
duplicate mcount call site records, which lead us to the script.
Perhaps this problem only happens to people named Eric.
This patch changes the script to test if the __mcount_loc already
exists in the object file, and if it does, it will print out
an error message and kill the compile.
Reported-by: Eric Sesterhenn <snakebyte@gmx.de>
Reported-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar [Sun, 18 Jan 2009 19:15:05 +0000 (20:15 +0100)]
Merge branch 'tracing/ftrace'; commit 'v2.6.29-rc2' into tracing/core
Linus Torvalds [Fri, 16 Jan 2009 20:43:00 +0000 (12:43 -0800)]
Linux 2.6.29-rc2
Linus Torvalds [Fri, 16 Jan 2009 20:40:37 +0000 (12:40 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (23 commits)
ACPI PCI hotplug: harden against panic regression
ACPI: rename main.c to sleep.c
dell-laptop: move to drivers/platform/x86/ from drivers/misc/
eeepc-laptop: enable Bluetooth ACPI details
ACPI: fix ACPI_FADT_S4_RTC_WAKE comment
kprobes: check CONFIG_FREEZER instead of CONFIG_PM
PM: Fix freezer compilation if PM_SLEEP is unset
thermal fixup for broken BIOS which has invalid trip points.
ACPI: EC: Don't trust ECDT tables from ASUS
ACPI: EC: Limit workaround for ASUS notebooks even more
ACPI: thinkpad-acpi: bump up version to 0.22
ACPI: thinkpad-acpi: handle HKEY event 6030
ACPI: thinkpad-acpi: clean-up fan subdriver quirk
ACPI: thinkpad-acpi: start the event hunt season
ACPI: thinkpad-acpi: handle HKEY thermal and battery alarms
ACPI: thinkpad-acpi: clean up hotkey_notify()
ACPI: thinkpad-acpi: use killable instead of interruptible mutexes
ACPI: thinkpad-acpi: add UWB radio support
ACPI: thinkpad-acpi: preserve radio state across shutdown
ACPI: thinkpad-acpi: resume with radios disabled
...
Linus Torvalds [Fri, 16 Jan 2009 20:40:11 +0000 (12:40 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
netxen: include ipv6.h (fixes build failure)
netxen: avoid invalid iounmap
James Bottomley [Thu, 15 Jan 2009 20:12:27 +0000 (15:12 -0500)]
ACPI PCI hotplug: harden against panic regression
ACPI hotplug panic with current git head
http://lkml.org/lkml/2009/1/10/136
Rather than reverting the entire commit that causes the crash:
e8c331e963c58b83db24b7d0e39e8c07f687dbc6
"PCI hotplug: introduce functions for ACPI slot detection"
simply harden against it while the changes to
the hotplug code on this particularl machine are understood.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Fri, 16 Jan 2009 19:45:34 +0000 (14:45 -0500)]
Merge branch 'misc' into release
Len Brown [Fri, 16 Jan 2009 19:45:24 +0000 (14:45 -0500)]
Merge branch 'thinkpad-acpi' into release
Len Brown [Fri, 16 Jan 2009 19:45:11 +0000 (14:45 -0500)]
Merge branches 'bugzilla-11884' and 'bugzilla-8544' into release
Len Brown [Fri, 16 Jan 2009 18:52:03 +0000 (13:52 -0500)]
ACPI: rename main.c to sleep.c
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Fri, 9 Jan 2009 22:23:38 +0000 (17:23 -0500)]
dell-laptop: move to drivers/platform/x86/ from drivers/misc/
Signed-off-by: Len Brown <len.brown@intel.com>
Jonathan McDowell [Wed, 3 Dec 2008 20:31:11 +0000 (20:31 +0000)]
eeepc-laptop: enable Bluetooth ACPI details
Although rfkill support for the EEE bluetooth device has been added to
2.6.28-rc the appropriate ACPI accessor definitions were not added, so
the support was non functional. The patch below adds the get and set
accessors and has been verified to work on an EEE 901.
Signed-off-by: Jonathan McDowell <noodles@earth.li>
Acked-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
David Brownell [Fri, 9 Jan 2009 20:17:08 +0000 (12:17 -0800)]
ACPI: fix ACPI_FADT_S4_RTC_WAKE comment
Make the comment for ACPI_FADT_S4_RTC_WAKE match the ACPI spec;
that bit has nothing to do with status bits.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Masami Hiramatsu [Tue, 6 Jan 2009 20:15:32 +0000 (21:15 +0100)]
kprobes: check CONFIG_FREEZER instead of CONFIG_PM
Check CONFIG_FREEZER instead of CONFIG_PM because kprobe booster
depends on freeze_processes() and thaw_processes() when CONFIG_PREEMPT=y.
This fixes a linkage error which occurs when CONFIG_PREEMPT=y, CONFIG_PM=y
and CONFIG_FREEZER=n.
Reported-by: Cheng Renquan <crquan@gmail.com>
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Len Brown <len.brown@intel.com>
Rafael J. Wysocki [Tue, 6 Jan 2009 20:14:04 +0000 (21:14 +0100)]
PM: Fix freezer compilation if PM_SLEEP is unset
Freezer fails to compile if with the following configuration
settings:
CONFIG_CGROUPS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_MODULES=y
CONFIG_FREEZER=y
CONFIG_PM=y
CONFIG_PM_SLEEP=n
Fix this by making process.o compilation depend on CONFIG_FREEZER.
Reported-by: Cheng Renquan <crquan@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
Zhang Rui [Fri, 16 Jan 2009 17:53:42 +0000 (12:53 -0500)]
thermal fixup for broken BIOS which has invalid trip points.
ACPI thermal driver only re-evaluate VALID trip points.
For the broken BIOS show in
http://bugzilla.kernel.org/show_bug.cgi?id=8544
the active[0] is set to invalid at boot time
and it will not be re-evaluated again.
We can still get a single warning message at boot time.
http://marc.info/?l=linux-kernel&m=
120496222629983&w=2
http://bugzilla.kernel.org/show_bug.cgi?id=12203
Signed-off-by: Zhang Rui<rui.zhang@intel.com>
Tested-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Len Brown <len.brown@intel.com>
Dhananjay Phadke [Fri, 16 Jan 2009 19:03:25 +0000 (11:03 -0800)]
netxen: include ipv6.h (fixes build failure)
Fixes a build error in absence of CONFIG_IPV6:
drivers/net/netxen/netxen_nic_main.c:1189: error: implicit declaration of function 'ipv6_hdr'
drivers/net/netxen/netxen_nic_main.c:1189: error: invalid type argument of '->'
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Starikovskiy [Tue, 13 Jan 2009 23:57:53 +0000 (02:57 +0300)]
ACPI: EC: Don't trust ECDT tables from ASUS
http://bugzilla.kernel.org/show_bug.cgi?id=9399
http://bugzilla.kernel.org/show_bug.cgi?id=11880
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Dhananjay Phadke [Fri, 16 Jan 2009 19:03:01 +0000 (11:03 -0800)]
netxen: avoid invalid iounmap
For NX3031 only one I/O range is mapped, so unmapping other
two which are used by older chips, causes this warning on
ppc64.
"Attempt to iounmap early bolted mapping at 0x0000000000000000"
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexey Starikovskiy [Tue, 13 Jan 2009 23:57:47 +0000 (02:57 +0300)]
ACPI: EC: Limit workaround for ASUS notebooks even more
References: http://bugzilla.kernel.org/show_bug.cgi?id=11884
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Linus Torvalds [Fri, 16 Jan 2009 17:32:33 +0000 (09:32 -0800)]
Merge git://git./linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: fix ioctl arg size (userland incompatible change!)
Btrfs: Clear the device->running_pending flag before bailing on congestion
Chris Mason [Fri, 16 Jan 2009 16:59:08 +0000 (11:59 -0500)]
Btrfs: fix ioctl arg size (userland incompatible change!)
The structure used to send device in btrfs ioctl calls was not
properly aligned, and so 32 bit ioctls would not work properly on
64 bit kernels.
We could fix this with compat ioctls, but we're just one byte away
and it doesn't make sense at this stage to carry about the compat ioctls
forever at this stage in the project.
This patch brings the ioctl arg up to an evenly aligned 4k.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason [Fri, 16 Jan 2009 16:58:19 +0000 (11:58 -0500)]
Btrfs: Clear the device->running_pending flag before bailing on congestion
Btrfs maintains a queue of async bio submissions so the checksumming
threads don't have to wait on get_request_wait. In order to avoid
extra wakeups, this code has a running_pending flag that is used
to tell new submissions they don't need to wake the thread.
When the threads notice congestion on a single device, they
may decide to requeue the job and move on to other devices. This
makes sure the running_pending flag is cleared before the
job is requeued.
It should help avoid IO stalls by making sure the task is woken up
when new submissions come in.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Linus Torvalds [Fri, 16 Jan 2009 16:41:09 +0000 (08:41 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
serial: Add 16850 uart type support to OF uart driver
hvc_console: Remove tty->low_latency
powerpc: Get the number of SLBs from "slb-size" property
powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices
powerpc/ps3: printing fixups for l64 to ll64 conversion drivers/video
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/scsi
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/ps3
powerpc/ps3: Printing fixups for l64 to ll64 conversion sound/ppc
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/char
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/block
powerpc/ps3: Printing fixups for l64 to ll64 conversion arch/powerpc
powerpc/ps3: ps3_repository_read_mm_info() takes u64 * arguments
powerpc/ps3: clear_bit()/set_bit() operate on unsigned longs
powerpc/ps3: The lv1_ routines have u64 parameters
powerpc/ps3: Use dma_addr_t down through the stack
powerpc/ps3: set_dabr() takes an unsigned long
powerpc: Cleanup from l64 to ll64 change drivers/scsi
Linus Torvalds [Fri, 16 Jan 2009 16:40:57 +0000 (08:40 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
sata_fsl: Return non-zero on error in probe()
drivers/ata/pata_ali.c: s/isa_bridge/ali_isa_bridge/ to fix alpha build
libata: New driver for OCTEON SOC Compact Flash interface (v7).
libata: Add another column to the ata_timing table.
sata_via: Add VT8261 support
pata_atiixp: update port enabledness test handling
[libata] get-identity ioctl: Fix use of invalid memory pointer
Linus Torvalds [Fri, 16 Jan 2009 16:40:40 +0000 (08:40 -0800)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] Skip deleted devices in __scsi_device_lookup_by_target()
[SCSI] Add SUN Universal Xport to no attach blacklist
[SCSI] iscsi_tcp: make padbuf non-static
[SCSI] mpt fusion: Add Firmware debug support
[SCSI] mpt fusion: Add separate msi enable disable for FC,SPI,SAS
[SCSI] mpt fusion: Update MPI Headers to version 01.05.19
[SCSI] qla2xxx: Fix ISP restart bug in multiq code
Linus Torvalds [Fri, 16 Jan 2009 16:39:52 +0000 (08:39 -0800)]
Merge branch 'drm-next' of git://git./linux/kernel/git/airlied/drm-2.6
* 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/i915: lock correct mutex around object unreference.
drm/i915: add support for physical memory objects
drm/i915: make LVDS fixed mode a preferred mode
drm: handle depth & bpp changes correctly
drm: initial KMS config fixes
drm/i915: setup sarea properly in master_priv
drm/i915: set vblank enabled flag correctly across IRQ install/uninstall
drm/i915: don't enable vblanks on disabled pipes
Linus Torvalds [Fri, 16 Jan 2009 16:14:51 +0000 (08:14 -0800)]
Revert "PCI PM: Register power state of devices during initialization"
This reverts commit
98e6e286d7b01deb7453b717aa38ebb69d6cefc0, as Yinghai
Lu reports that it breaks kexec with at least the e1000 and e1000e
drivers. The reason is that the shutdown sequence puts the hardware
into D3 sleep, and the commit causes us to claim that it then is in D0
(running) state just because we don't understand the PM capabilities.
Which then later makes "pci_set_power_state()" not do anything, and the
device never wakes up properly and just returns 0xff to everything.
Reported-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: From: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Jesse Barnes <jesse.barnes@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michal Sojka [Wed, 14 Jan 2009 13:02:38 +0000 (14:02 +0100)]
sata_fsl: Return non-zero on error in probe()
while I was looking over kernel sources I've found this small bug.
Formerly, zero was returned even if an error happened.
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Andrew Morton [Thu, 15 Jan 2009 00:48:42 +0000 (16:48 -0800)]
drivers/ata/pata_ali.c: s/isa_bridge/ali_isa_bridge/ to fix alpha build
drivers/ata/pata_ali.c:44: error: static declaration of 'isa_bridge' follows non-static declaration
arch/alpha/include/asm/pci.h:274: error: previous declaration of 'isa_bridge' was here
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
David Daney [Fri, 16 Jan 2009 01:45:32 +0000 (17:45 -0800)]
libata: New driver for OCTEON SOC Compact Flash interface (v7).
Cavium OCTEON processor support was recently merged, so now we have
this CF driver for your consideration.
Most OCTEON variants have *no* DMA or interrupt support on the CF
interface so for these, only PIO is supported. Although if DMA is
available, we do take advantage of it.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
David Daney [Fri, 16 Jan 2009 01:45:31 +0000 (17:45 -0800)]
libata: Add another column to the ata_timing table.
The forthcoming OCTEON SOC Compact Flash driver needs an additional
timing value that was not available in the ata_timing table. I add a
new column for dmack_hold time. The values were obtained from the
Compact Flash specification Rev 4.1.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
JosephChan@via.com.tw [Fri, 16 Jan 2009 11:44:55 +0000 (19:44 +0800)]
sata_via: Add VT8261 support
Signed-off-by: Joseph Chan <josephchan@via.com.tw>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Tejun Heo [Fri, 16 Jan 2009 06:27:27 +0000 (15:27 +0900)]
pata_atiixp: update port enabledness test handling
Port enabledness test fits much better into init_one() instead of
pre_reset(). The reason why these tests are in pre_reset() is purely
historical at this point. Move it to init_one(). This will help
further changes.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Jeff Garzik [Fri, 16 Jan 2009 15:17:09 +0000 (10:17 -0500)]
[libata] get-identity ioctl: Fix use of invalid memory pointer
for SAS drivers.
Caught by Ke Wei (and team?) at Marvell.
Also, move the ata_scsi_ioctl export to libata-scsi.c, as that seems to be the
general trend.
Acked-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Steven Rostedt [Fri, 16 Jan 2009 04:40:11 +0000 (23:40 -0500)]
trace: set max latency variable to zero on default
Impact: trace max latencies on start of latency tracing
This patch sets the max latency to zero whenever one of the
irq variant tracers or the wakeup tracer is set to current tracer.
Most developers expect to see output when starting up a latency
tracer. But since the max_latency is already set to max, and
it takes a latency greater than max_latency to be recorded, there
is no trace. This is not the expected behavior and has even confused
myself.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Fri, 16 Jan 2009 04:06:03 +0000 (23:06 -0500)]
ftrace: remove static from function tracer functions
Impact: clean up
After reorganizing the functions in trace.c and trace_function.c,
they no longer need to be in global context. This patch makes the
functions and one variable into static.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Fri, 16 Jan 2009 03:21:43 +0000 (22:21 -0500)]
ftrace: combine stack trace in function call
Impact: less likely to interleave function and stack traces
This patch does replaces the separate stack trace on function with
a record function and stack trace together. This will switch between
the function only recording to a function and stack recording.
Also some whitespace fix ups as well.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Fri, 16 Jan 2009 02:00:50 +0000 (21:00 -0500)]
trace: clean up format errors in calls to trace_seq_printf
After adding the printf format checking for trace_seq_printf, several
warnings now show up. This patch cleans them up.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Fri, 16 Jan 2009 01:50:54 +0000 (20:50 -0500)]
trace: add gcc printf check to trace_seq_printf
Andrew Morton suggested adding a printf checker to trace_seq_printf
since there are a number of users that have improper format arguments.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Fri, 16 Jan 2009 01:40:23 +0000 (20:40 -0500)]
ftrace: move function tracer functions out of trace.c
Impact: clean up of trace.c
The function tracer functions were put in trace.c because it needed
to share static variables that were in trace.c. Since then, those
variables have become global for various reasons. This patch moves
the function tracer functions into trace_function.c where they belong.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Steven Rostedt [Fri, 16 Jan 2009 00:12:40 +0000 (19:12 -0500)]
ftrace: add stack trace to function tracer
Impact: new feature to stack trace any function
Chris Mason asked about being able to pick and choose a function
and get a stack trace from it. This feature enables his request.
# echo io_schedule > /debug/tracing/set_ftrace_filter
# echo function > /debug/tracing/current_tracer
# echo func_stack_trace > /debug/tracing/trace_options
Produces the following in /debug/tracing/trace:
kjournald-702 [001] 135.673060: io_schedule <-sync_buffer
kjournald-702 [002] 135.673671:
<= sync_buffer
<= __wait_on_bit
<= out_of_line_wait_on_bit
<= __wait_on_buffer
<= sync_dirty_buffer
<= journal_commit_transaction
<= kjournald
Note, be careful about turning this on without filtering the functions.
You may find that you have a 10 second lag between typing and seeing
what you typed. This is why the stack trace for the function tracer
does not use the same stack_trace flag as the other tracers use.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Lai Jiangshan [Thu, 15 Jan 2009 10:05:40 +0000 (18:05 +0800)]
ftrace: fix trace_output
Impact: fix bug for handling partial line
trace_seq_printf(), seq_print_userip_objs(), ... return
0 -- partial line was written
other(>0) -- success
duplicate output is also removed in trace_print_raw().
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Dave Airlie [Thu, 15 Jan 2009 04:03:07 +0000 (14:03 +1000)]
drm/i915: lock correct mutex around object unreference.
This makes sure the mutex is held around the unreference.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 30 Dec 2008 10:31:46 +0000 (20:31 +1000)]
drm/i915: add support for physical memory objects
This is an initial patch to do support for objects which needs physical
contiguous main ram, cursors and overlay registers on older chipsets.
These objects are bound on cursor bin, like pinning, and we copy
the data to/from the backing store object into the real one on attach/detach.
notes:
possible over the top in attach/detach operations.
no overlay support yet.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jesse Barnes [Wed, 14 Jan 2009 18:53:36 +0000 (10:53 -0800)]
drm/i915: make LVDS fixed mode a preferred mode
The detected fixed panel mode really is preferred, so mark it as such and
add it to the LVDS connector mode list.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Jesse Barnes [Fri, 9 Jan 2009 21:56:14 +0000 (13:56 -0800)]
drm: handle depth & bpp changes correctly
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Jesse Barnes [Mon, 12 Jan 2009 20:05:32 +0000 (12:05 -0800)]
drm: initial KMS config fixes
When mode setting is first initialized, the driver will call into
drm_helper_initial_config() to set up an initial output and framebuffer
configuration. This routine is responsible for probing the available
connectors, encoders, and crtcs, looking for modes and putting together
something reasonable (where reasonable is defined as "allows kernel
messages to be visible on as many displays as possible").
However, the code was a bit too aggressive in setting default modes when
none were found on a given connector. Even if some connectors had modes,
any connectors found lacking modes would have the default 800x600 mode added
to their mode list, which in some cases could cause problems later down the
line. In my case, the LVDS was perfectly available, but the initial config
code added 800x600 modes to both of the detected but unavailable HDMI
connectors (which are on my non-existent docking station). This ended up
preventing later code from setting a mode on my LVDS, which is bad.
This patch fixes that behavior by making the initial config code walk
through the connectors first, counting the available modes, before it decides
to add any default modes to a possibly connected output. It also fixes the
logic in drm_target_preferred() that was causing zeroed out modes to be set
as the preferred mode for a given connector, even if no modes were available.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Matthias Fuchs [Thu, 15 Jan 2009 09:43:35 +0000 (09:43 +0000)]
serial: Add 16850 uart type support to OF uart driver
This patch adds support for "ns16850" as supported value
of the compatible node in flat device tree uart descriptions.
This is needed for example when you have a XR16C2850 uart
connected to a PPC405's external bus controller.
Signed-off-by: Matthias Fuchs <mfuchs@ma-fu.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Hendrik Brueckner [Wed, 14 Jan 2009 23:15:44 +0000 (23:15 +0000)]
hvc_console: Remove tty->low_latency
This patch removes the tty->low_latency setting.
For irq based hvc_console backends the tty->low_latency must be set to 0,
because the tty_flip_buffer_push() function must not be called from IRQ context
(see drivers/char/tty_buffer.c).
For polled backends, the low_latency setting causes the bug trace below, because
tty_flip_buffer_push() is called within an atomic context and subsequent calls
might sleep due to mutex_lock.
BUG: sleeping function called from invalid context at /root/cvs/linux-2.6.git/kernel/mutex.c:207
in_atomic(): 1, irqs_disabled(): 0, pid: 748, name: khvcd
1 lock held by khvcd/748:
#0: (hvc_structs_lock){--..}, at: [<
00000000002ceb50>] khvcd+0x58/0x12c
CPU: 0 Not tainted 2.6.29-rc1git #29
Process khvcd (pid: 748, task:
000000002fb9a480, ksp:
000000002f66bd78)
070000000000000a 000000002f66ba00 0000000000000002 (null)
000000002f66baa0 000000002f66ba18 000000002f66ba18 0000000000104f08
ffffffffffffc000 000000002f66bd78 (null) (null)
000000002f66ba00 000000000000000c 000000002f66ba00 000000002f66ba70
0000000000466af8 0000000000104f08 000000002f66ba00 000000002f66ba50
Call Trace:
([<
0000000000104e7c>] show_trace+0x138/0x158)
[<
0000000000104f62>] show_stack+0xc6/0xf8
[<
0000000000105740>] dump_stack+0xb0/0xc0
[<
000000000013144a>] __might_sleep+0x14e/0x17c
[<
000000000045e226>] mutex_lock_nested+0x42/0x3b4
[<
00000000002c443e>] echo_char_raw+0x3a/0x9c
[<
00000000002c688c>] n_tty_receive_buf+0x1154/0x1208
[<
00000000002ca0a2>] flush_to_ldisc+0x152/0x220
[<
00000000002ca1da>] tty_flip_buffer_push+0x6a/0x90
[<
00000000002cea74>] hvc_poll+0x244/0x2c8
[<
00000000002ceb68>] khvcd+0x70/0x12c
[<
000000000015bbd0>] kthread+0x68/0xa0
[<
0000000000109d5a>] kernel_thread_starter+0x6/0xc
[<
0000000000109d54>] kernel_thread_starter+0x0/0xc
1 lock held by khvcd/748:
#0: (hvc_structs_lock){--..}, at: [<
00000000002ceb50>] khvcd+0x58/0x12c
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Michael Neuling [Wed, 14 Jan 2009 13:42:41 +0000 (13:42 +0000)]
powerpc: Get the number of SLBs from "slb-size" property
The PAPR says that the property for specifying the number of SLBs should
be called "slb-size". We currently only look for "ibm,slb-size" because
this is what firmware actually presents.
This patch makes us look for the "slb-size" property as well and in
preference to the "ibm,slb-size". This should future proof us if
firmware changes to match PAPR.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Dave Kleikamp [Wed, 14 Jan 2009 09:09:34 +0000 (09:09 +0000)]
powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices
powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices
The subpage_prot syscall fails on second and subsequent calls for a given
region, because is_hugepage_only_range() is mis-identifying the 4 kB
slices when the process has a 64 kB page size.
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 20:13:39 +0000 (20:13 +0000)]
powerpc/ps3: printing fixups for l64 to ll64 conversion drivers/video
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 20:11:44 +0000 (20:11 +0000)]
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/scsi
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 20:10:06 +0000 (20:10 +0000)]
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/ps3
Also some min -> mint_t conversion.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 20:07:55 +0000 (20:07 +0000)]
powerpc/ps3: Printing fixups for l64 to ll64 conversion sound/ppc
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 20:06:02 +0000 (20:06 +0000)]
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/char
Also a couple of min -> min_t changes.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 20:04:48 +0000 (20:04 +0000)]
powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/block
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 20:02:39 +0000 (20:02 +0000)]
powerpc/ps3: Printing fixups for l64 to ll64 conversion arch/powerpc
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 20:01:28 +0000 (20:01 +0000)]
powerpc/ps3: ps3_repository_read_mm_info() takes u64 * arguments
Fixes compiler warnings:
arch/powerpc/platforms/ps3/mm.c:1205: warning: passing argument 2 of 'ps3_repository_read_mm_info' from incompatible pointer type
arch/powerpc/platforms/ps3/mm.c:1205: warning: passing argument 3 of 'ps3_repository_read_mm_info' from incompatible pointer type
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 20:00:29 +0000 (20:00 +0000)]
powerpc/ps3: clear_bit()/set_bit() operate on unsigned longs
This fixes these compiler warning:
arch/powerpc/platforms/ps3/interrupt.c:109: warning: passing argument 2 of 'clear_bit' from incompatible pointer type
arch/powerpc/platforms/ps3/interrupt.c:130: warning: passing argument 2 of 'set_bit' from incompatible pointer type
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 19:59:41 +0000 (19:59 +0000)]
powerpc/ps3: The lv1_ routines have u64 parameters
We just fix up the reference parameters as the others are dealt with by
arithmetic promotion rules and don't cause warnings.
This removes warnings like this:
arch/powerpc/platforms/ps3/interrupt.c:327: warning: passing argument 1 of 'lv1_construct_event_receive_port' from incompatible pointer type
Also, these:
drivers/ps3/ps3-vuart.c:462: warning: passing argument 4 of 'ps3_vuart_raw_read' from incompatible pointer type
drivers/ps3/ps3-vuart.c:592: warning: passing argument 4 of 'ps3_vuart_raw_read' from incompatible pointer type
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 19:58:10 +0000 (19:58 +0000)]
powerpc/ps3: Use dma_addr_t down through the stack
Push the dma_addr_t type usage all the way down to where the actual
values are manipulated.
Now that u64 is "unsigned long long", this removes warnings like:
arch/powerpc/platforms/ps3/system-bus.c:532: warning: passing argument 4 of 'ps3_dma_map' from incompatible pointer type
arch/powerpc/platforms/ps3/system-bus.c:649: warning: passing argument 4 of 'ps3_dma_map' from incompatible pointer type
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 13 Jan 2009 19:54:50 +0000 (19:54 +0000)]
powerpc/ps3: set_dabr() takes an unsigned long
Also silences this warning:
arch/powerpc/platforms/ps3/setup.c:275: warning: initialization from incompatible pointer type
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Stephen Rothwell [Tue, 6 Jan 2009 14:59:00 +0000 (14:59 +0000)]
powerpc: Cleanup from l64 to ll64 change drivers/scsi
This is a powerpc specific driver.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Linus Torvalds [Fri, 16 Jan 2009 00:55:00 +0000 (16:55 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: sched_slice() fixlet
sched: fix update_min_vruntime
sched: SCHED_OTHER vs SCHED_IDLE isolation
sched: SCHED_IDLE weight change
sched: fix bandwidth validation for UID grouping
Revert "sched: improve preempt debugging"
Linus Torvalds [Fri, 16 Jan 2009 00:53:42 +0000 (16:53 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc64: Fix UP build failure.
This page took 0.048763 seconds and 5 git commands to generate.