aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-10-18perf_events: Fix bogus context time trackingStephane Eranian1-1/+7
You can only call update_context_time() when the context is active, i.e., the thread it is attached to is still running. However, perf_event_read() can be called even when the context is inactive, e.g., user read() the counters. The call to update_context_time() must be conditioned on the status of the context, otherwise, bogus time_enabled, time_running may be returned. Here is an example on AMD64. The task program is an example from libpfm4. The -p prints deltas every 1s. $ task -p -e cpu_clk_unhalted sleep 5 2,266,610 cpu_clk_unhalted (0.00% scaling, ena=2,158,982, run=2,158,982) 0 cpu_clk_unhalted (0.00% scaling, ena=2,158,982, run=2,158,982) 0 cpu_clk_unhalted (0.00% scaling, ena=2,158,982, run=2,158,982) 0 cpu_clk_unhalted (0.00% scaling, ena=2,158,982, run=2,158,982) 0 cpu_clk_unhalted (0.00% scaling, ena=2,158,982, run=2,158,982) 5,242,358,071 cpu_clk_unhalted (99.95% scaling, ena=5,000,359,984, run=2,319,270) Whereas if you don't read deltas, e.g., no call to perf_event_read() until the process terminates: $ task -e cpu_clk_unhalted sleep 5 2,497,783 cpu_clk_unhalted (0.00% scaling, ena=2,376,899, run=2,376,899) Notice that time_enable, time_running are bogus in the first example causing bogus scaling. This patch fixes the problem, by conditionally calling update_context_time() in perf_event_read(). Signed-off-by: Stephane Eranian <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Cc: [email protected] LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2010-10-18lockdep: Check the depth of subclassHitoshi Mitake1-8/+10
Current look_up_lock_class() doesn't check the parameter "subclass". This rarely rises problems because the main caller of this function, register_lock_class(), checks it. But register_lock_class() is not the only function which calls look_up_lock_class(). lock_set_class() and its callees also call it. And lock_set_class() doesn't check this parameter. This will rise problems when the the value of subclass is larger than MAX_LOCKDEP_SUBCLASSES. Because the address (used as the key of class) caliculated with too large subclass has a probability to point another key in different lock_class_key. Of course this problem depends on the memory layout and occurs with really low probability. Signed-off-by: Hitoshi Mitake <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Vojtech Pavlik <[email protected]> Cc: Frederic Weisbecker <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2010-10-18lockdep: Add improved subclass cachingHitoshi Mitake2-8/+30
Current lockdep_map only caches one class with subclass == 0, and looks up hash table of classes when subclass != 0. It seems that this has no problem because the case of subclass != 0 is rare. But locks of struct rq are acquired with subclass == 1 when task migration is executed. Task migration is high frequent event, so I modified lockdep to cache subclasses. I measured the score of perf bench sched messaging. This patch has slightly but certain (order of milli seconds or 10 milli seconds) effect when lots of tasks are running. I'll show the result in the tail of this description. NR_LOCKDEP_CACHING_CLASSES specifies how many classes can be cached in the instances of lockdep_map. I discussed with Peter Zijlstra in LinuxCon Japan about this approach and he taught me that caching every subclasses(8) is cleary waste of memory. So number of cached classes should be configurable. === Score comparison of benchmarks === # "min" means best score, and "max" means worst score for i in `seq 1 10`; do ./perf bench -f simple sched messaging; done before: min: 0.565000, max: 0.583000, avg: 0.572500 after: min: 0.559000, max: 0.568000, avg: 0.563300 # with more processes for i in `seq 1 10`; do ./perf bench -f simple sched messaging -g 40; done before: min: 2.274000, max: 2.298000, avg: 2.286300 after: min: 2.242000, max: 2.270000, avg: 2.259700 Signed-off-by: Hitoshi Mitake <[email protected]> Cc: Frederic Weisbecker <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2010-10-18Merge branch 'linus' into core/lockingIngo Molnar236-1052/+1815
Merge reason: Update to almost-final-.36 Signed-off-by: Ingo Molnar <[email protected]>
2010-10-18sched: Drop all load weight manipulation for RT tasksLinus Walleij1-6/+0
Load weights are for the CFS, they do not belong in the RT task. This makes all RT scheduling classes leave the CFS weights alone. This fixes a real bug as well: I noticed the following phonomena: a process elevated to SCHED_RR forks with SCHED_RESET_ON_FORK set, and the child is indeed SCHED_OTHER, and the niceval is indeed reset to 0. However the weight inserted by set_load_weight() remains at 0, giving the task insignificat priority. With this fix, the weight is reset to what the task had before being elevated to SCHED_RR/SCHED_FIFO. Cc: Lennart Poettering <[email protected]> Cc: [email protected] Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2010-10-18sched: Create special class for stop/migrate workPeter Zijlstra3-12/+158
In order to separate the stop/migrate work thread from the SCHED_FIFO implementation, create a special class for it that is of higher priority than SCHED_FIFO itself. This currently solves a problem where cpu-hotplug consumes so much cpu-time that the SCHED_FIFO class gets throttled, but has the bandwidth replenishment timer pending on the now dead cpu. It is also required for when we add the planned deadline scheduling class above SCHED_FIFO, as the stop/migrate thread still needs to transcent those tasks. Tested-by: Heiko Carstens <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <1285165776.2275.1022.camel@laptop> Signed-off-by: Ingo Molnar <[email protected]>
2010-10-18sched: Unindent labelsPeter Zijlstra2-9/+9
Labels should be on column 0. Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <[email protected]>
2010-10-18MIPS: Enable ISA_DMA_API config to fix build failureNamhyung Kim1-0/+4
Add ISA_DMA_API config item and select it when GENERIC_ISA_DMA enabled. This fixes build failure on allmodconfig like following: CC sound/isa/es18xx.o sound/isa/es18xx.c: In function 'snd_es18xx_playback1_prepare': sound/isa/es18xx.c:501:9: error: implicit declaration of function 'snd_dma_program' sound/isa/es18xx.c: In function 'snd_es18xx_playback_pointer': sound/isa/es18xx.c:818:3: error: implicit declaration of function 'snd_dma_pointer' make[3]: *** [sound/isa/es18xx.o] Error 1 make[2]: *** [sound/isa/es18xx.o] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 Signed-off-by: Namhyung Kim <[email protected]> Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1717/ Signed-off-by: Ralf Baechle <[email protected]>
2010-10-18MIPS: 32-bit: Fix build failure in asm/fcntl.hNamhyung Kim1-0/+1
CC security/integrity/ima/ima_fs.o In file included from linux/include/linux/fcntl.h:4:0, from linux/security/integrity/ima/ima_fs.c:18: linux/arch/mips/include/asm/fcntl.h:63:2: error: expected specifier-qualifier-list before 'off_t' make[3]: *** [security/integrity/ima/ima_fs.o] Error 1 make[2]: *** [security/integrity/ima/ima_fs.o] Error 2 make[1]: *** [sub-make] Error 2 make: *** [all] Error 2 Signed-off-by: Namhyung Kim <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1715/ Signed-off-by: Ralf Baechle <[email protected]>
2010-10-18MIPS: Remove all generated vmlinuz* files on "make clean"Wu Zhangjin1-1/+1
[Ralf: I changed the patch to explicitly list all files to be deleted out of paranoia.] Signed-off-by: Wu Zhangjin <[email protected]> Patchwork: http://patchwork.linux-mips.org/patch/1590/ Signed-off-by: Ralf Baechle <[email protected]>
2010-10-18MIPS: do_sigaltstack() expects userland pointersAl Viro2-4/+6
o32 compat does the right thing, native and n32 compat do not... Signed-off-by: Al Viro <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: http://patchwork.linux-mips.org/patch/1700/ Signed-off-by: Ralf Baechle <[email protected]>
2010-10-18MIPS: Fix error values in case of bad_stackAl Viro2-2/+2
We want EFAULT, not -<syscall number> Signed-off-by: Al Viro <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1699/ Signed-off-by: Ralf Baechle <[email protected]>
2010-10-18MIPS: Sanitize restart logicsAl Viro7-35/+34
Put the original syscall number into ->regs[0] when we leave syscall with error. Use it in restart logics. Everything else will have it 0 since we pass through SAVE_SOME on all the ways in. Note that in places like bad_stack and inllegal_syscall we leave it 0 - it's not restartable. Signed-off-by: Al Viro <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1698/ Signed-off-by: Ralf Baechle <[email protected]>
2010-10-18MIPS: secure_computing, syscall audit: syscall number should in r2, not r0.Al Viro1-2/+2
As it is, audit_syscall_entry() and secure_computing() get the bogus value (0, in fact) Signed-off-by: Al Viro <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1697/ Signed-off-by: Ralf Baechle <[email protected]>
2010-10-18MIPS: Don't block signals if we'd failed to setup a sigframeAl Viro1-0/+3
Signed-off-by: Al Viro <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/1696/ Signed-off-by: Ralf Baechle <[email protected]>
2010-10-18Input: evdev - fix EVIOCSABS regressionDaniel Mack1-1/+1
448cd16 ("Input: evdev - rearrange ioctl handling") broke EVIOCSABS by checking for the wrong direction bit. Signed-off-by: Daniel Mack <[email protected]> Reported-by: Sven Neumann <[email protected]> Tested-by: Sven Neumann <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2010-10-18Input: evdev - fix Ooops in EVIOCGABS/EVIOCSABSDaniel Mack1-0/+6
This fixes a regression introduced by the dynamic allocation of absinfo for input devices. We need to bail out early for input devices which don't have absolute axis. [ 929.664303] Pid: 2989, comm: input Not tainted 2.6.36-rc8+ #14 MS-7260/MS-7260 [ 929.664318] EIP: 0060:[<c12bdc01>] EFLAGS: 00010246 CPU: 0 [ 929.664331] EIP is at evdev_ioctl+0x4f8/0x59f [ 929.664341] EAX: 00000040 EBX: 00000000 ECX: 00000006 EDX: f45a1efc [ 929.664355] ESI: 00000000 EDI: f45a1efc EBP: f45a1f24 ESP: f45a1eb8 [ 929.664369] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 929.664402] f470da74 f6a30e78 f462c240 00000018 bfe4a260 00000000 f45b06fc 00000000 [ 929.664429] <0> 000000c4 b769d000 c3544620 f470da74 f45b06fc f45b06fc f45a1f38 c107dd1f [ 929.664458] <0> f4710b74 000000c4 00000000 00000000 00000000 0000029d 00000a74 f4710b74 [ 929.664500] [<c107dd1f>] ? handle_mm_fault+0x2be/0x59a [ 929.664513] [<c12bd709>] ? evdev_ioctl+0x0/0x59f [ 929.664524] [<c1099d30>] ? do_vfs_ioctl+0x494/0x4d9 [ 929.664538] [<c10432a1>] ? up_read+0x16/0x29 [ 929.664550] [<c101c818>] ? do_page_fault+0x2ff/0x32d [ 929.664564] [<c108d048>] ? do_sys_open+0xc5/0xcf [ 929.664575] [<c1099db6>] ? sys_ioctl+0x41/0x61 [ 929.664587] [<c1002710>] ? sysenter_do_call+0x12/0x36 [ 929.684570] ---[ end trace 11b83e923bd8f2bb ]--- Signed-off-by: Daniel Mack <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2010-10-18Merge branch 'for-spi' of ↵Grant Likely184-1413/+2071
git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin into spi/next
2010-10-18tracing: Remove parent recording in latency tracer graph optionsSteven Rostedt1-1/+0
Even though the parent is recorded with the normal function tracing of the latency tracers (irqsoff and wakeup), the function graph recording is bogus. This is due to the function graph messing with the return stack. The latency tracers pass in as the parent CALLER_ADDR0, which works fine for plain function tracing. But this causes bogus output with the graph tracer: 3) <idle>-0 | d.s3. 0.000 us | return_to_handler(); 3) <idle>-0 | d.s3. 0.000 us | _raw_spin_unlock_irqrestore(); 3) <idle>-0 | d.s3. 0.000 us | return_to_handler(); 3) <idle>-0 | d.s3. 0.000 us | trace_hardirqs_on(); The "return_to_handle()" call is the trampoline of the function graph tracer, and is meaningless in this context. Cc: Jiri Olsa <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-10-18tracing: Use one prologue for the preempt irqs off tracer function tracersSteven Rostedt1-48/+48
The preempt and irqsoff tracers have three types of function tracers. Normal function tracer, function graph entry, and function graph return. Each of these use a complex dance to prevent recursion and whether to trace the data or not (depending if interrupts are enabled or not). This patch moves the duplicate code into a single routine, to prevent future mistakes with modifying duplicate complex code. Cc: Jiri Olsa <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-10-18tracing: Use one prologue for the wakeup tracer function tracersSteven Rostedt1-52/+50
The wakeup tracer has three types of function tracers. Normal function tracer, function graph entry, and function graph return. Each of these use a complex dance to prevent recursion and whether to trace the data or not (depending on the wake_task variable). This patch moves the duplicate code into a single routine, to prevent future mistakes with modifying duplicate complex code. Cc: Jiri Olsa <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-10-18tracing: Graph support for wakeup tracerJiri Olsa1-10/+221
Add function graph support for wakeup latency tracer. The graph output is enabled by setting the 'display-graph' trace option. Signed-off-by: Jiri Olsa <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-10-18tracing: Make graph related irqs/preemptsoff functions globalJiri Olsa3-52/+71
Move trace_graph_function() and print_graph_headers_flags() functions to the trace_function_graph.c to be globaly available. Signed-off-by: Jiri Olsa <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-10-18tracing: Add proper check for irq_depth routinesJiri Olsa1-4/+20
The check_irq_entry and check_irq_return could be called from graph event context. In such case there's no graph private data allocated. Adding checks to handle this case. Signed-off-by: Jiri Olsa <[email protected]> LKML-Reference: <[email protected]> [ Fixed some grammar in the comments ] Signed-off-by: Steven Rostedt <[email protected]>
2010-10-18tracing/trivial: Remove cast from void*matt mooney2-3/+3
Unnecessary cast from void* in assignment. Signed-off-by: matt mooney <[email protected]> Signed-off-by: Steven Rostedt <[email protected]>
2010-10-18Merge branch 'devel' of ↵Russell King75-161/+1252
git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel-stable
2010-10-18GFS2: fixed typoAndrea Gelmini1-1/+1
Signed-off-by: Andrea Gelmini <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]>
2010-10-18ARM: S5P64X0: Bug fix on errors of build with CONFIG_PREEMPT_NONESeungChull Suh1-0/+1
This patch adds header <linux/sched.h> into the below files for build with CONFIG_PREEMPT_NONE. arch/arm/mach-s5p64x0/cpu.c Signed-off-by: Seung-Chull Suh <[email protected]> [[email protected]: edited title and message] Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18ARM: S5P64X0: Fix GPIO rbank supportAtul Dahiya1-5/+0
The patch removes s3c_gpio_lock/unlock to avoid acquiring the lock recursively as lock is already acquired by calling function. Signed-off-by: Atul Dahiya <[email protected]> Signed-off-by: Sangbeom Kim <[email protected]> [[email protected]: removed useless variable due to this] Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18ARM: S5P64X0: Replace the 6440 system device class definition with 64x0Abhilash Kesavan1-1/+1
The s5p64x0_sysclass should be used in place of the obselete s5p6440_sysclass. Signed-off-by: Abhilash Kesavan <[email protected]> Signed-off-by: Sangbeom Kim <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18ARM: S5P64X0: FIX typo in the ADC device nameNaveen Krishna Ch1-2/+2
Fix the touch screen device name from s3c64x0-adc to s3c64xx-adc. Signed-off-by: Naveen Krishna Ch <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18ARM: s5p64x0_defconfig: Update for support S5P6440 and S5P6450Kukjin Kim1-1/+2
This patch updates s5p64x0_defconfig and changes the name from s5p6440_defconfig so that can support S5P6440 and S5P6450 with one kernel. Tested on SMDK6440(S5P6440) and SMDK6450(S5P6450). Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18ARM: S5P64X0: Add UART serial support for S5P6450Kukjin Kim3-4/+63
This patch adds UART serial port support for S5P6450 SoC. The S5P6450 has 6 UARTs, so adds resource of UART4 and UART5. And to fix membase which is in serial/samsung.c is from Ben Dooks. Signed-off-by: Kukjin Kim <[email protected]> Cc: Ben Dooks <[email protected]>
2010-10-18ARM: S5P64X0: Move SMDK6440 board file and Add SMDK6450 board fileKukjin Kim2-35/+234
This patch moves smdk6440 board file from mach-s5p6440 into the new mach-s5p64x0 directory and adds smdk6450 board file. Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18ARM: S5P64X0: Move GPIO support files for merge S5P64X0Kukjin Kim4-138/+208
This patch moves S5P6440 GPIO support files from mach-s5p6440 into the new mach-s5p64x0 for merge S5P6440 and S5P6450 SocS. NOTE: Not supported S5P6450 GPIO yet. Will be supported soon. Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18ARM: S5P64X0: Add S5P6450 I2C supportKukjin Kim3-10/+51
This patch adds S5P6450 I2C support in the ARCH_S5P64X0. And moves S5P6440 I2C support files into the mach-s5p64x0 together. Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18ARM: S5P64X0: Move DMA support for S5P64X0Kukjin Kim3-21/+85
This patch moves DMA support files in the mach-s5p64x0 for S5P6440 and S5P6450 SoCs. Signed-off-by: Kukjin Kim <[email protected]> Cc: Jassi Brar <[email protected]>
2010-10-18ARM: S5P64X0: Update Audio supportKukjin Kim8-321/+422
This patch updates Audio and SPI for S5P6440 and S5P6450 SoCs. Signed-off-by: Kukjin Kim <[email protected]> Cc: Jassi Brar <[email protected]>
2010-10-18ARM: S5P64X0: Update Timer supportKukjin Kim2-10/+13
This patch updates timer support for S5P6440 and S5P6450 SoCs. Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18ARM: S5P64X0: Update IRQ supportKukjin Kim2-16/+40
This patch updates IRQ support for S5P6440 and S5P6450 SoCs. Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18ARM: S5P64X0: Update Clock for S5P6440 and S5P6450Kukjin Kim10-979/+1674
This patch updates regarding clock files for supporting S5P6440 and S5P6450 with one kernel image. The mach-s5p64x0/clock.c is for common of them and there are specific clock files for each SoCs. Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18ARM: S5P64X0: Add S5P64X0(S5P6440 and S5P6450) initialization supportKukjin Kim21-384/+711
This patch adds ARCH_S5P64X0 which can support S5P6440 and S5P6450 with one kernel image. So moved some files of mach-s5p6440 into the new ARCH directory mach-s5p64x0. Signed-off-by: Kukjin Kim <[email protected]>
2010-10-18asm-generic/io.h: allow people to override individual funcsMike Frysinger1-0/+26
For the Blackfin port, we can use much of the asm-generic/io.h header, but we still need to declare some of our own versions of functions. Like the __raw_read* and in/out "string" helpers. So let people do this easily for many of these funcs. Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2010-10-18spi/bfin_spi: namespace local structsMike Frysinger1-58/+61
Signed-off-by: Mike Frysinger <[email protected]>
2010-10-18spi/bfin_spi: init earlyMichael Hennerich1-1/+1
Some systems using this bus sometimes have very basic devices on them such as regulators. So we need to be loaded even earlier in case the devices are used by things such as early board init code. Therefore register in subsys_initcall(). Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Mike Frysinger <[email protected]>
2010-10-18spi/bfin_spi: check per-transfer bits_per_wordBob Liu1-1/+6
Currently, if the bits_per_word when doing a transfer is not 8bits, we always treat it as 16bits when we should actually be returning an error. Signed-off-by: Bob Liu <[email protected]> Signed-off-by: Mike Frysinger <[email protected]>
2010-10-18spi/bfin_spi: warn when CS is driven by hardware (CPHA=0)Barry Song1-2/+7
When the hardware is controlling the CS, there are some SPI options we are unable to support. So issue a warning in the hopes that the user will change to a SPI mode where we can support things sanely. Signed-off-by: Barry Song <[email protected]> Signed-off-by: Mike Frysinger <[email protected]>
2010-10-18spi/bfin_spi: cs should be always low when a new transfer beginsRob Maris1-2/+1
Signed-off-by: Rob Maris <[email protected]> Signed-off-by: Barry Song <[email protected]> Signed-off-by: Mike Frysinger <[email protected]>
2010-10-18spi/bfin_spi: fix typo in commentRob Maris1-1/+1
Signed-off-by: Rob Maris <[email protected]> Signed-off-by: Barry Song <[email protected]> Signed-off-by: Mike Frysinger <[email protected]>
2010-10-18spi/bfin_spi: reject unsupported SPI modesMike Frysinger1-0/+4
Who knows what people will try! Signed-off-by: Mike Frysinger <[email protected]>