aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/sys_sh.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-09-20perf_counter: x86: Fix PMU resource leakPeter Zijlstra1-3/+6
Dave noticed that we leak the PMU resource reservations when we fail the hardware counter init. Reported-by: David Miller <davem@davemloft.net> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: David Miller <davem@davemloft.net> LKML-Reference: <1252483487.7746.164.camel@twins> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-20perf util: SVG performance improvementsArjan van de Ven1-23/+55
Tweak the output SVG to increase performance in SVG viewers by limiting the different types of font sizes and by smarter transformations on the text. At least with Inkscape this gives a notable performance improvement during zoom and scrolling. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090920181438.3a49cb93@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-20perf util: Make the timechart SVG width dynamicArjan van de Ven4-14/+31
This patch adds a command line option for timechart that allows the user to specify the width of the SVG file. This patch also makes sure that each second of recording has at least 200 units (pixels at 96 DPI) of width. This impacts recordings longer than 5 seconds; recordings shorter than 5 second will scale up to have a width of 1000 units for the whole recording (as before). Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090920181416.69570c5d@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-20perf timechart: Show the duration of scheduler delays in the SVGArjan van de Ven3-8/+57
Given that scheduler latencies are the hot thing nowadays, show the duration of said latencies in the SVG in text form. In addition, if the latency is more than 10 msec, pick a brighter yellow color as a way to point these long delays out. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090920181353.796f4509@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-20perf timechart: Show the name of the waker/wakee in timechartArjan van de Ven3-11/+30
Timechart currently shows thin green lines for sending or receiving wakeups. This patch also prints (in a very small font) the name of the process that is being woken/wakes up this process. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090920181328.68baa978@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19perf_counter: Fix perf_copy_attr() pointer arithmeticIan Schram1-10/+10
There is still some weird code in per_copy_attr(). Which supposedly checks that all bytes trailing a struct are zero. It doesn't seem to get pointer arithmetic right. Since it increments an iterating pointer by sizeof(unsigned long) rather than 1. Signed-off-by: Ian Schram <ischram@telenet.be> [ v2: clean up the messy PTR_ALIGN logic as well. ] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: <stable@kernel.org> # for v2.6.31.x LKML-Reference: <4AB3DEE2.3030600@telenet.be> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19perf utils: Use a define for the maximum length of a trace eventArjan van de Ven1-7/+7
As per Ingo's review: use a #define rather than an open coded constant for the maximum length of a trace event for storing in the perf.data file. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: fweisbec@gmail.com Cc: peterz@infradead.org Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20090919133630.10533d3e@infradead.org> [ add a few comments to nearby functions ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19perf: Add timechart help text and add timechart to "perf help"Arjan van de Ven2-0/+36
As suggested by Ingo, add a timechart man page help text, as well as add it to the "perf help" overview. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: fweisbec@gmail.com Cc: peterz@infradead.org Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20090919133604.3767fa35@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19tracing, x86, cpuidle: Move the end point of a C state in the power tracerArjan van de Ven2-3/+2
The "end of a C state" trace point currently happens before the code runs that corrects the TSC for having stopped during idle. The result of this is that the timestamp of the end-of-C-state event is garbage on cpus where the TSC stops during idle. This patch moves the end point of the C state to after the timekeeping engine of the kernel has been corrected. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Len Brown <len.brown@intel.com> Cc: fweisbec@gmail.com Cc: peterz@infradead.org Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20090919133533.139c2a46@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19perf utils: Be consistent about minimum text size in the svghelperArjan van de Ven1-11/+13
Be more consistent in the svghelper about the minimum text size by having a global #define for this. There needs to be a minimum text size in order to keep the size of the SVG file within the reach of what current SVG viewers can cope with. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: fweisbec@gmail.com Cc: peterz@infradead.org Cc: Paul Mackerras <paulus@samba.org> Cc: Arjan van de Ven <arjan@infradead.org> LKML-Reference: <20090919133507.7374ef8b@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19perf timechart: Add "perf timechart record"Arjan van de Ven1-8/+39
Add a command line option to record a trace, similar to "perf sched record". Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: fweisbec@gmail.com Cc: peterz@infradead.org Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <20090919133442.0dc2c7f5@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19perf: Add the timechart toolArjan van de Ven4-0/+1129
timechart is a tool to visualize what is going on in the system. The user makes a trace of what is going on with > perf record --timechart /usr/bin/some_command and then can turn the output of this into an svg file > perf timechart which then can be viewed with any SVG view; inkscape works well enough for me. The idea behind timechart is to create a "infinitely zoomable" picture; something that has high level information on a 1:1 zoom level, but which exposes more details every time you zoom into a specific area. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090912130713.6a77bbc0@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19perf: Add a SVG helper library fileArjan van de Ven3-0/+408
The timechart tool writes out SVG format output; this patch adds a set of helper functions to abstract dealing with SVG from the core timechart code. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090912130613.677f0516@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19tracing, perf: Convert the power tracer into an event tracerArjan van de Ven10-388/+113
This patch converts the existing power tracer into an event tracer, so that power events (C states and frequency changes) can be tracked via "perf". This also removes the perl script that was used to demo the tracer; its functionality is being replaced entirely with timechart. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090912130542.6d314860@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19perf: Add a sample_event type to the event_unionArjan van de Ven1-0/+7
Add a sample_event type to the event_union so that raw samples can be processed easily. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090912130511.411434b5@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19perf: Allow perf utilities to have "callback" options without argumentsArjan van de Ven1-0/+2
timechart needs to add a "callback" type command line argument that does not take arguments. This patch adds the parse-options.h infrastructure to make this possible. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090912130440.548666c1@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19perf: Store trace event name/id pairs in perf.dataArjan van de Ven3-0/+90
The trace event name<->id mapping is dynamic for each kernel compile. In order for perf.data to be useable outside the actual system, we thus need to store a table of this mapping for later use. This patch adds this table to perf.data, and provides helper functions for lookup up fields from this table. To avoid mistakes, lookup-from-table is kept completely seprate from lookup-from-local-debugfs. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090912130405.6960d099@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-19perf: Add a timestamp to fork eventsArjan van de Ven3-2/+12
perf timechart needs to know when a process forked, in order to be able to visualize properly when tasks start. This patch adds a time field to the event structure, and fills it in appropriately. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20090912130341.51ad2de2@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-18sched_clock: Make it NMI safePeter Zijlstra2-75/+56
Arjan complained about the suckyness of TSC on modern machines, and asked if we could do something about that for PERF_SAMPLE_TIME. Make cpu_clock() NMI safe by removing the spinlock and using cmpxchg. This also makes it smaller and more robust. Affects architectures that use HAVE_UNSTABLE_SCHED_CLOCK, i.e. IA64 and x86. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-18perf_counter: Fix up swcounter throttlingPeter Zijlstra1-1/+1
/me dons the brown paper bag. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-18x86, perf_counter, bts: Optimize BTS overflow handlingMarkus Metzger3-174/+266
Draining the BTS buffer on a buffer overflow interrupt takes too long resulting in a kernel lockup when tracing the kernel. Restructure perf_counter sampling into sample creation and sample output. Prepare a single reference sample for BTS sampling and update the from and to address fields when draining the BTS buffer. Drain the entire BTS buffer between a single perf_output_begin() / perf_output_end() pair. Signed-off-by: Markus Metzger <markus.t.metzger@intel.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20090915130023.A16204@sedona.ch.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-18pty_write: don't do a tty_wakeup() when the buffers are fullLinus Torvalds1-2/+4
Commit ac89a9174 ("pty: don't limit the writes to 'pty_space()' inside 'pty_write()'") removed the pty_space() checking, in order to let the regular tty buffer code limit the buffering itself. That was all good, but as a subtle side effect it meant that we'd be doing a tty_wakeup() even in the case where the buffers were all filled up, and didn't actually make any progress on the write. Which sounds innocuous, but it interacts very badly with the ppp_async code, which has an infinite loop in ppp_async_push() that tries to push out data to the tty. When we call tty_wakeup(), that loop ends up thinking that progress was made (see the subtle interactions between XMIT_WAKEUP and 'tty_stuffed' for details). End result: one unhappy ppp user. Fixed by noticing when tty_insert_flip_string() didn't actually do anything, and then not doing any more processing (including, very much not calling tty_wakeup()). Bisected-and-tested-by: Peter Volkov <pva@gentoo.org> Cc: stable@kernel.org (2.6.31) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-18perf sched: Add --input=file option to builtin-sched.cMike Galbraith1-1/+3
perf sched record passes unparsed args on to perf record, so specifying an output file via perf sched record -o FILE (cmd) just works. Ergo, provide an option to specify input file as well. Also add the missing 'map' command to help. Signed-off-by: Mike Galbraith <efault@gmx.de> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1253254944.20589.11.camel@marge.simson.net> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-18perf trace: Sample timestamp and cpu when using record flagLi Zefan1-1/+4
Sample timestamp and cpu just like the -R option. Before: init-0 [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=18 handler=eth0 init-0 [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=18 handler=eth0 init-0 [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=1 handler=i8042 init-0 [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=18 handler=eth0 init-0 [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=1 handler=i8042 After: init-0 [001] 7364.568965353: irq_handler_entry: irq=18 handler=eth0 init-0 [001] 7365.530226877: irq_handler_entry: irq=1 handler=i8042 init-0 [001] 7365.542831563: irq_handler_entry: irq=18 handler=eth0 init-0 [001] 7365.644156299: irq_handler_entry: irq=18 handler=eth0 init-0 [001] 7365.694556201: irq_handler_entry: irq=18 handler=eth0 Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <4AB1F827.8040905@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-18perf tools: Increase MAX_EVENT_LENGTHLi Zefan1-1/+1
The name length of some trace events is longer than 30, like sys_enter_sched_get_priority_max and ext4_mb_discard_preallocations. Passing those events to perf-record will fail, try: # ./perf record -f -e syscalls:sys_enter_sched_get_priority_max -F 1 -a Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <4AB1F4AB.7050205@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-18perf tools: Fix memory leak in read_ftrace_printk()Li Zefan1-3/+4
get_tracing_file() should be paired with put_tracing_file(). Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <4AB1F48F.4070807@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-17x86, pat: don't use rb-tree based lookup in reserve_memtype()Suresh Siddha1-10/+2
Recent enhancement of rb-tree based lookup exposed a bug with the lookup mechanism in the reserve_memtype() which ensures that there are no conflicting memtype requests for the memory range. memtype_rb_search() returns an entry which has a start address <= new start address. And from here we traverse the linear linked list to check if there any conflicts with the existing mappings. As the rbtree is based on the start address of the memory range, it is quite possible that we have several overlapped mappings whose start address is much less than new requested start but the end is >= new requested end. This results in conflicting memtype mappings. Same bug exists with the old code which uses cached_entry from where we traverse the linear linked list. But the new rb-tree code exposes this bug fairly easily. For now, don't use the memtype_rb_search() and always start the search from the head of linear linked list in reserve_memtype(). Linear linked list for most of the systems grow's to few 10's of entries(as we track memory type of RAM pages using struct page). So we should be ok for now. We still retain the rbtree and use it to speed up free_memtype() which doesn't have the same bug(as we know what exactly we are searching for in free_memtype). Also use list_for_each_entry_from() in free_memtype() so that we start the search from rb-tree lookup result. Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> LKML-Reference: <1253136483.4119.12.camel@sbs-t61.sc.intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-09-17libata: Add pata_atp867x driver for Artop/Acard ATP867X controllersJohn(Jung-Ik) Lee4-0/+560
This is a new pata driver for ARTOP 867X 64bit 4-channel UDMA133 ATA ctrls. Based on the Atp867 data sheet rev 1.2, Acard, and in part on early ide codes from Eric Uhrhane <ericu@google.com>. Signed-off-by: John(Jung-Ik) Lee <jilee@google.com> Reviewed-by: Grant Grundler <grundler@google.com> Reviewed-by: Gwendal Gringo <gwendal@google.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-09-17pata_amd: do not filter out valid modes in nv_mode_filterRobert Hancock1-0/+3
On a Compaq Presario V3000 laptop (NVIDIA MCP51 chipset), pata_amd selects PIO0 mode for the PATA DVD-RAM drive instead of MWDMA2 which it supports: ata4.00: ATAPI: HL-DT-ST DVDRAM GSA-4084N, KQ09, max MWDMA2 ata4: nv_mode_filter: 0x39f&0x7001->0x1, BIOS=0x0 (0x0) ACPI=0x7001 (60:600:0x11) ata4.00: configured for PIO0 For some reason, the BIOS-set UDMA configuration returns 0 and the ACPI _GTM reports that UDMA2 and PIO0 are enabled. This causes nv_mode_filter to end up allowing only PIO0 and UDMA0-2. Since the drive doesn't support UDMA we end up using PIO0. Since the controllers should always support PIO4, MWDMA2 and UDMA2 regardless of what cable type is used, let's make sure we don't filter out these modes regardless of what wacky settings the BIOS is using. Signed-off-by: Robert Hancock <hancockrwd@gmail.com> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-09-17sata_promise: update reset codeMikael Pettersson1-1/+120
sata_promise's reset code has deviated quite a bit from the Promise reference driver's, and it has been observed to fail to recover from errors in some cases. This patch thus updates the reset code to more closely match the reference driver: - soft reset (pdc_reset_port): * wait for ATA engine to not be in packet command mode (2nd gen only) * write reset bit in PDC_CTLSTAT before the first read in the loop * for 2nd gen SATA follow up with FPDMA reset and clearing error status registers - hard reset (pdc_sata_hardreset): * wait for ATA engine to not be in packet command mode (2nd gen only) * reset ATA engine via the PCI control register * Tejun's change to use non-waiting hardreset + follow-up SRST I'm not changing the hotplug mask bits since they are taken care of by sata_promise's ->freeze() and ->thaw() operations. And I'm not writing the PMP port # because that's always zero (for now). Tested here on various controllers. In particular, one disk which used to timeout and fail to recover from certain hdparm and smartmonctl commands now works nicely. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-09-17sata_promise: disable hotplug on 1st gen chipsMikael Pettersson1-17/+17
1st generation Promise SATA chips are prone to generating spurious hotplug events which can disrupt normal operation. This has been observed on 20376 and 20378 chips. This patch thus disables hotplug support on 1st gen chips while leaving it enabled for 2nd gen chips. The pdc_sata_hotplug_offset() function becomes redundant so it is removed. Tested on 1st gen 20376 and 20378 mainboard chips and on a 2nd gen SATA300 PCI card. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Tested-by: Kurt Roeckx <kurt@roeckx.be> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-09-17libata: fix spurious WARN_ON_ONCE() on port freezeTejun Heo1-2/+2
Commit 54c38444fad6a99b4b19512f8f0055d69115e69e makes libata abort qcs after the port is frozen. This is necessary to guarantee that TF registers are accessed after the DMA engine is shutdown after an error. However, this triggers WARN_ON_ONCE() check in ata_qc_complete() spuriously. Move WARN_ON_ONCE() downwards such that failing commands while frozen doesn't trigger it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: stable <stable@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-09-17ahci: restore pci_intx() handlingTejun Heo1-2/+2
Commit a5bfc4714b3f01365aef89a92673f2ceb1ccf246 dropped explicit pci_intx() manipulation from ahci because it seemed unnecessary and ahci doesn't seem to be the right place to be tweaking it if it were. This was largely okay but there are exceptions. There was one on an embedded platform which was fixed via firmware and now bko#14124 reports it on a HP DL320. http://bugzilla.kernel.org/show_bug.cgi?id=14124 I still think this isn't something libata drivers should be caring about (the only ones which are calling pci_intx() explicitly are libata ones and one other driver) but for now reverting the change seems to be the right thing to do. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-09-17perf sched: Determine the number of CPUs automaticallyIngo Molnar1-1/+3
For 'perf sched map' output, determine max_cpu automatically, instead of the static default of 15. [ v2: use sysconf() pointed out by Arjan van de Ven <arjan@infradead.org> ] Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-17perf record: Disable profiling before draining the bufferPeter Zijlstra1-1/+12
I noticed that perf-record continues profiling itself after the child terminated and we're draining the buffer. This can cause a _lot_ of overhead with --all recording - we keep and keep recording, which produces new and new events. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-17perf_counter: Allow for a wakeup watermarkPeter Zijlstra2-15/+27
Currently we wake the mmap() consumer once every PAGE_SIZE of data and/or once event wakeup_events when specified. For high speed sampling this results in too many wakeups wrt. the buffer size, hence change this. We move the default wakeup limit to 1/4-th the buffer size, and provide for means to manually specify this limit. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-17perf_counter: Do not throttle single swcounter eventsPeter Zijlstra1-4/+13
We can have swcounter events that contribute more than a single count per event, when used with a non-zero period, those can generate multiple events, which is when we need throttling. However, swcounter that contribute only a single count per event can only come as fast as we can run code, hence don't throttle them. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-17vsnprintf: remove duplicate comment of vsnprintfSteven Rostedt1-6/+4
Remove the duplicate comment of bstr_printf that is the same as the vsnprintf. Add the 's' option to the comment for the pointer function. This is more of an internal function so the little duplication of the comment here is OK. Reported-by: Zhaolei <zhaolei@cn.fujitsu.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-09-17softirq: add BLOCK_IOPOLL to softirq_to_nameLi Zefan2-11/+12
With BLOCK_IOPOLL_SOFTIRQ added, softirq_to_name[] and show_softirq_name() needs to be updated. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> LKML-Reference: <4AB20398.8070209@cn.fujitsu.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-09-17oprofile: fix oprofile regression: select RING_BUFFER_ALLOW_SWAPChristian Borntraeger1-0/+1
commit 85bac32c4a52c592b857f2c360cc5ec93a097d70 ring-buffer: only enable ring_buffer_swap_cpu when needed broke oprofile (at least on s390, but likely on all platforms). this patch lets oprofile select RING_BUFER_ALLOW_SWAP to make ring_buffer_swap_cpu usable for oprofile. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> LKML-Reference: <200909162156.49239.borntraeger@de.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Robert Richter <robert.richter@amd.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-09-17tracing: switch function prints from %pf to %psSteven Rostedt3-7/+7
For direct function pointers (like what mcount provides) PowerPC64 requires the use of %ps, otherwise nothing is printed. This patch converts all prints of functions retrieved through mcount to use the %ps format from the %pf. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-09-17vsprintf: add %ps that is the same as %pS but is like %pfSteven Rostedt1-2/+4
On PowerPC64 function pointers do not point directly at the functions, but instead point to pointers to the functions. The output of %pF expects to point to a pointer to the function, whereas %pS will show the function itself. mcount returns the direct pointer to the function and not the pointer to the pointer. Thus %pS must be used to show this. The function tracer requires printing of the functions without offsets and uses the %pf instead. %pF produces run_local_timers+0x4/0x1f %pf produces just run_local_timers For PowerPC64, we need to use the direct pointer, and we only have %pS which will produce .run_local_timers+0x4/0x1f This patch creates a %ps that matches the %pf as %pS matches %pF. Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Zhao Lei <zhaolei@cn.fujitsu.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-09-17MIPS: BCM63xx: Add integrated ethernet mac support.Maxime Bizon6-1/+2444
Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs.Maxime Bizon40-0/+5896
Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17MIPS: BCM63xx: Add Broadcom 63xx CPU definitions.Maxime Bizon3-0/+34
Todo: Nothing ever detects CPU_BCM6338 but the code tests for it anyway. Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17MIPS: Octeon: Move some platform device registration to its own file.David Daney3-148/+166
There is a bunch of platform device registration in arch/mips/cavium-octeon/setup.c. We move it to its own file in preparation for adding more platform devices. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17MIPS: Don't corrupt page tables on vmalloc fault.David Daney1-2/+10
The code after the vmalloc_fault: label in do_page_fault() modifies user page tables, this is not correct for 64-bit kernels. For 64-bit kernels we should go straight to the no_context handler skipping vmalloc_fault. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17MIPS: Shrink the size of tlb handlerWu Fei4-63/+3
By combining swapper_pg_dir and module_pg_dir, several if conditions can be eliminated from the tlb exception handler. The reason they can be combined is that, the effective virtual address of vmalloc returned is at the bottom, and of module_alloc returned is at the top. It also fixes the bug in vmalloc(), which happens when its return address is not covered by the first pgd. Signed-off-by: Wu Fei <at.wufei@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17MIPS: Alchemy: override loops_per_jiffy detectionManuel Lauss1-0/+4
loops_per_jiffy depends on coreclk speed; preset it instead of letting the kernel waste precious microseconds trying to approximate it. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-17MIPS: hw_random: Add hardware RNG for Octeon SOCs.David Daney3-0/+161
Signed-off-by: David Daney <ddaney@caviumnetworks.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>