1. 16 3月, 2009 9 次提交
    • F
      tracing/ftrace: fix double calls to tracing_start() · ac1d52d0
      Frederic Weisbecker 提交于
      Impact: fix a warning during preemptirqsoff selftests
      
      When the preemptirqsoff selftest fails, we see the following
      warning:
      
      [    6.050000] Testing tracer preemptirqsoff: .. no entries found ..
      ------------[ cut here ]------------
      [    6.060000] WARNING: at kernel/trace/trace.c:688 tracing_start+0x67/0xd3()
      [    6.060000] Modules linked in:
      [    6.060000] Pid: 1, comm: swapper Tainted: G
      [    6.060000] Call Trace:
      [    6.060000]  [<ffffffff802460ff>] warn_slowpath+0xb1/0x100
      [    6.060000]  [<ffffffff802a8f5b>] ? trace_preempt_on+0x35/0x4b
      [    6.060000]  [<ffffffff802a37fb>] ? tracing_start+0x31/0xd3
      [    6.060000]  [<ffffffff802a37fb>] ? tracing_start+0x31/0xd3
      [    6.060000]  [<ffffffff80271e0b>] ? __lock_acquired+0xe6/0x1f2
      [    6.060000]  [<ffffffff802a37fb>] ? tracing_start+0x31/0xd3
      [    6.060000]  [<ffffffff802a3831>] tracing_start+0x67/0xd3
      [    6.060000]  [<ffffffff802a8ace>] ? irqsoff_tracer_reset+0x2d/0x57
      [    6.060000]  [<ffffffff802a4d1c>] trace_selftest_startup_preemptirqsoff+0x1c8/0x1f1
      [    6.060000]  [<ffffffff802a4798>] register_tracer+0x12f/0x241
      [    6.060000]  [<ffffffff810250d0>] ? init_irqsoff_tracer+0x0/0x53
      [    6.060000]  [<ffffffff8102510b>] init_irqsoff_tracer+0x3b/0x53
      
      This is because in fail case, the preemptirqsoff tracer selftest calls twice
      the tracing_start() function:
      
      int
      trace_selftest_startup_preemptirqsoff(struct tracer *trace, struct trace_array *tr)
      {
              if (!ret && !count) {
                      printk(KERN_CONT ".. no entries found ..");
                      ret = -1;
                      tracing_start(); <-----
                      goto out;
              }
              [...]
      out:
              trace->reset(tr);
              tracing_start(); <------
              tracing_max_latency = save_max;
      
              return ret;
      }
      
      Since it is well handled in the out path, we don't need the conditional one.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237159961-7447-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ac1d52d0
    • F
      tracing/core: fix missing mutex unlock on tracing_set_tracer() · 59f586db
      Frederic Weisbecker 提交于
      Impact: fix possible locking imbalance
      
      In case of ring buffer resize failure, tracing_set_tracer forgot to
      release trace_types_lock. Fix it.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237151439-6755-5-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      59f586db
    • F
      tracing/syscalls: select kallsysms · 0ea1c415
      Frederic Weisbecker 提交于
      Syscall tracing must select kallsysms.
      
      The arch code builds a table to find the syscall metadata by syscall
      number. It needs the syscalls names resolution from the symbol table
      to know which name found on the syscalls metadatas match a function
      pointer from the arch sys_call_table.
      Reported-by: NAndrew Morton <akpm@linux-foundation.org>
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237151439-6755-4-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0ea1c415
    • F
      tracing/syscalls: protect thread flag toggling from races · 5be71b61
      Frederic Weisbecker 提交于
      Impact: fix syscall tracer enable/disable race
      
      The current thread flag toggling is racy as shown in the following
      scenario:
      
      - task A is the last user of syscall tracing, it releases the
        TIF_SYSCALL_FTRACE on each tasks
      
      - at the same time task B start syscall tracing. refcount == 0 so
        it sets up TIF_SYSCALL_FTRACE on each tasks.
      
      The effect of the mixup is unpredictable.
      So this fix adds a mutex on {start,stop}_syscall_tracing().
      Reported-by: NAndrew Morton <akpm@linux-foundation.org>
      Reported-by: NIngo Molnar <mingo@elte.hu>
      LKML-Reference: <1237151439-6755-3-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5be71b61
    • F
      tracing/syscalls: various cleanups · 64044345
      Frederic Weisbecker 提交于
      Impact: cleanup
      
      - Drop unused cpu variable
      - Fix some errors on comments
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237151439-6755-2-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      64044345
    • F
      tracing/syscalls: fix missing release of tracing · ac99c58c
      Frederic Weisbecker 提交于
      Impact: fix 'stuck' syscall tracer
      
      The syscall tracer uses a refcounter to enable several users
      simultaneously.
      
      But the refcounter did not behave correctly and always restored
      its value to 0 after calling start_syscall_tracing(). Therefore,
      stop_syscall_tracing() couldn't release correctly the tasks from
      tracing.
      
      Also the tracer forgot to reset the buffer when it is released.
      
      Drop the pointless refcount decrement on start_syscall_tracing()
      and reset the buffer when we release the tracer.
      
      This fixes two reported issue:
      
      - when we switch from syscall tracer to another tracer, syscall
        tracing continued.
      
      - incorrect use of the refcount.
      Reported-by: NAndrew Morton <akpm@linux-foundation.org>
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1237151439-6755-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ac99c58c
    • I
      Merge branches 'tracing/ftrace', 'tracing/syscalls' and 'linus' into tracing/core · 7243f214
      Ingo Molnar 提交于
      Conflicts:
      	arch/parisc/kernel/irq.c
      7243f214
    • K
      parisc: sba_iommu: fix build bug when CONFIG_PARISC_AGP=y · 5bee17f1
      Kyle McMartin 提交于
      CC      drivers/parisc/sba_iommu.o
      drivers/parisc/sba_iommu.c:1373: error: expected identifier or '('
      before '}' token
      make[2]: *** [drivers/parisc/sba_iommu.o] Error 1
      make[1]: *** [drivers/parisc] Error 2
      make: *** [drivers] Error 2
      
      Don't know how this has gone missed for so long... clearly I need
      to do builds on my C8000 more often.
      Signed-off-by: NKyle McMartin <kyle@mcmartin.ca>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5bee17f1
    • L
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · fbd8104c
      Linus Torvalds 提交于
      * master.kernel.org:/home/rmk/linux-2.6-arm: (23 commits)
        [ARM] Fix virtual to physical translation macro corner cases
        [ARM] update mach-types
        [ARM] 5421/1: ftrace: fix crash due to tracing of __naked functions
        MX1 fix include
        [ARM] 5419/1: ep93xx: fix build warnings about struct i2c_board_info
        [ARM] 5418/1: restore lr before leaving mcount
        ARM: OMAP: board-omap3beagle: set i2c-3 to 100kHz
        ARM: OMAP: Allow I2C bus driver to be compiled as a module
        ARM: OMAP: sched_clock() corrected
        ARM: OMAP: Fix compile error if pm.h is included
        [ARM] orion5x: pass dram mbus data to xor driver
        [ARM] S3C64XX: Fix s3c64xx_setrate_clksrc
        [ARM] S3C64XX: sparse warnings in arch/arm/plat-s3c64xx/irq.c
        [ARM] S3C64XX: sparse warnings in arch/arm/plat-s3c64xx/s3c6400-clock.c
        [ARM] S3C64XX: Fix USB host clock mux list
        [ARM] S3C64XX: Fix name of USB host clock.
        [ARM] S3C64XX: Rename IRQ_UHOST to IRQ_USBH
        [ARM] S3C64XX: Do gpiolib configuration earlier
        [ARM] S3C64XX: Staticise s3c64xx_init_irq_eint()
        [ARM] SMDK6410: Declare iodesc table static
        ...
      fbd8104c
  2. 15 3月, 2009 16 次提交
  3. 14 3月, 2009 15 次提交