1. 24 3月, 2009 1 次提交
    • A
      tracing: Fix TRACING_SUPPORT dependency for PPC32 · 45b95608
      Anton Vorontsov 提交于
      commit 40ada30f ("tracing: clean up menu"),
      despite the "clean up" in its purpose, introduced a behavioural
      change for Kconfig symbols: we no longer able to select tracing
      support on PPC32 (because IRQFLAGS_SUPPORT isn't yet implemented).
      
      The IRQFLAGS_SUPPORT is not mandatory for most tracers, tracing core
      has a special case for platforms w/o irqflags (which, by the way, has
      become useless as of the commit above).
      
      Though according to Ingo Molnar, there was periodic build failures on
      weird, unmaintained architectures that had no irqflags-tracing support
      and hence didn't know the raw_irqs_save/restore primitives. Thus we'd
      better not enable irqflags-less tracing for all architectures.
      
      This patch restores the old behaviour for PPC32, and thus brings the
      tracing back. Other architectures can either add themselves to the
      exception list or (better) implement TRACE_IRQFLAGS_SUPPORT.
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Acked-b: Steven Rostedt <rostedt@goodmis.org>
      Cc: linuxppc-dev@ozlabs.org
      LKML-Reference: <20090323220724.GA9851@oksana.dev.rtsoft.ru>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      45b95608
  2. 23 3月, 2009 4 次提交
    • F
      tracing/ftrace: check if debugfs is registered before creating files · 3e1f60b8
      Frederic Weisbecker 提交于
      Impact: fix a crash with ftrace={nop,boot} parameter
      
      If the nop or initcall tracers are launched as boot tracers,
      they will attempt to create their option directory and files.
      But these tracers are registered very early and then assigned
      as "boot tracers" very early if asked to.
      
      Since they do this before debugfs has been registered (core initcall),
      a crash is triggered.
      
      Another early tracers could also come later. So we fix it by
      checking if debugfs is initialized before creating the root
      tracing directory.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1237759847-21025-3-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3e1f60b8
    • F
      debugfs: function to know if debugfs is initialized · c0f92ba9
      Frederic Weisbecker 提交于
      Impact: add new debugfs API
      
      With ftrace, some tracers are registered in early initcalls
      and attempt to create files on the debugfs filesystem.
      Depending on when they are activated, they can try to create their
      file at any time. Some checks can be done on the tracing area
      but providing a helper to know if debugfs is registered make it
      really more easy.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1237759847-21025-2-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c0f92ba9
    • D
      tracing: fix four sparse warnings · b8b94265
      Dmitri Vorobiev 提交于
      Impact: cleanup.
      
      This patch fixes the following sparse warnings:
      
       kernel/trace/trace.c:385:9: warning: symbol 'trace_seq_to_buffer' was
       not declared. Should it be static?
      
       kernel/trace/trace_clock.c:29:13: warning: symbol 'trace_clock_local'
       was not declared. Should it be static?
      
       kernel/trace/trace_clock.c:54:13: warning: symbol 'trace_clock' was not
       declared. Should it be static?
      
       kernel/trace/trace_clock.c:74:13: warning: symbol 'trace_clock_global'
       was not declared. Should it be static?
      Signed-off-by: NDmitri Vorobiev <dmitri.vorobiev@movial.com>
      LKML-Reference: <1237741871-5827-4-git-send-email-dmitri.vorobiev@movial.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b8b94265
    • I
      Merge branches 'tracing/ftrace', 'tracing/hw-breakpoints',... · a524446f
      Ingo Molnar 提交于
      Merge branches 'tracing/ftrace', 'tracing/hw-breakpoints', 'tracing/ring-buffer', 'tracing/textedit' and 'linus' into tracing/core
      a524446f
  3. 22 3月, 2009 2 次提交
  4. 21 3月, 2009 1 次提交
    • F
      tracing/ring-buffer: don't annotate rb_cpu_notify with __cpuinit · 09c9e84d
      Frederic Weisbecker 提交于
      Impact: remove a section warning
      
      CONFIG_DEBUG_SECTION_MISMATCH raises the following warning on -tip:
      
        WARNING: kernel/trace/built-in.o(.text+0x5bc5): Section mismatch in
        reference from the function ring_buffer_alloc() to the function
        .cpuinit.text:rb_cpu_notify()
        The function ring_buffer_alloc() references
        the function __cpuinit rb_cpu_notify().
      
      This is actually harmless. The code in the ring buffer don't build
      rb_cpu_notify and other cpu hotplug stuffs when !CONFIG_HOTPLUG_CPU
      so we have no risk to reference freed memory here (it would even
      be harmless if we unconditionally build it because register_cpu_notifier
      would do nothing when !CONFIG_HOTPLUG_CPU.
      
      But since ring_buffer_alloc() can be called everytime, we don't want it
      to be annotated with __cpuinit so we drop the __cpuinit from
      rb_cpu_notify.
      
      This is not a waste of memory because it is only defined and used on
      CONFIG_HOTPLUG_CPU.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1237606416-22268-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      09c9e84d
  5. 20 3月, 2009 18 次提交
  6. 19 3月, 2009 11 次提交
    • F
      tracing/ring-buffer: fix non cpu hotplug case · 3bf832ce
      Frederic Weisbecker 提交于
      Impact: fix warning with irqsoff tracer
      
      The ring buffer allocates its buffers on pre-smp time (early_initcall).
      It means that, at first, only the boot cpu buffer is allocated and
      the ring-buffer cpumask only has the boot cpu set (cpu_online_mask).
      
      Later, the secondary cpu will show up and the ring-buffer will be notified
      about this event: the appropriate buffer will be allocated and the cpumask
      will be updated.
      
      Unfortunately, if !CONFIG_CPU_HOTPLUG, the ring-buffer will not be
      notified about the secondary cpus, meaning that the cpumask will have
      only the cpu boot set, and only one cpu buffer allocated.
      
      We fix that by using cpu_possible_mask if !CONFIG_CPU_HOTPLUG.
      
      This patch fixes the following warning with irqsoff tracer running:
      
      [  169.317794] WARNING: at kernel/trace/trace.c:466 update_max_tr_single+0xcc/0xf3()
      [  169.318002] Hardware name: AMILO Li 2727
      [  169.318002] Modules linked in:
      [  169.318002] Pid: 5624, comm: bash Not tainted 2.6.29-rc8-tip-02636-g6aafa6c #11
      [  169.318002] Call Trace:
      [  169.318002]  [<ffffffff81036182>] warn_slowpath+0xea/0x13d
      [  169.318002]  [<ffffffff8100b9d6>] ? ftrace_call+0x5/0x2b
      [  169.318002]  [<ffffffff8100b9d6>] ? ftrace_call+0x5/0x2b
      [  169.318002]  [<ffffffff8100b9d1>] ? ftrace_call+0x0/0x2b
      [  169.318002]  [<ffffffff8101ef10>] ? ftrace_modify_code+0xa9/0x108
      [  169.318002]  [<ffffffff8106e27f>] ? trace_hardirqs_off+0x25/0x27
      [  169.318002]  [<ffffffff8149afe7>] ? _spin_unlock_irqrestore+0x1f/0x2d
      [  169.318002]  [<ffffffff81064f52>] ? ring_buffer_reset_cpu+0xf6/0xfb
      [  169.318002]  [<ffffffff8106637c>] ? ring_buffer_reset+0x36/0x48
      [  169.318002]  [<ffffffff8106aeda>] update_max_tr_single+0xcc/0xf3
      [  169.318002]  [<ffffffff8100bc17>] ? sysret_check+0x22/0x5d
      [  169.318002]  [<ffffffff8106e3ea>] stop_critical_timing+0x142/0x204
      [  169.318002]  [<ffffffff8106e4cf>] trace_hardirqs_on_caller+0x23/0x25
      [  169.318002]  [<ffffffff8149ac28>] trace_hardirqs_on_thunk+0x3a/0x3c
      [  169.318002]  [<ffffffff8100bc17>] ? sysret_check+0x22/0x5d
      [  169.318002] ---[ end trace db76cbf775a750cf ]---
      
      Because this tracer may try to swap two cpu ring buffers for an
      unregistered cpu on the ring buffer.
      
      This patch might also fix a fair loss of traces due to unallocated buffers
      for secondary cpus.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Acked-b: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1237470453-5427-1-git-send-email-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3bf832ce
    • S
      function-graph: consolidate prologues for output · ac5f6c96
      Steven Rostedt 提交于
      Impact: clean up
      
      The prologue of the function graph entry, return and comments all
      start out pretty much the same. Each of these duplicate code and
      do so slightly differently.
      
      This patch consolidates the printing of the pid, absolute time,
      cpu and proc (and for entry, the interrupt).
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      ac5f6c96
    • L
      ftrace: protect running nmi (V3) · e9d9df44
      Lai Jiangshan 提交于
      When I review the sensitive code ftrace_nmi_enter(), I found
      the atomic variable nmi_running does protect NMI VS do_ftrace_mod_code(),
      but it can not protects NMI(entered nmi) VS NMI(ftrace_nmi_enter()).
      
      cpu#1                   | cpu#2                 | cpu#3
      ftrace_nmi_enter()      | do_ftrace_mod_code()  |
        not modify            |                       |
      ------------------------|-----------------------|--
      executing               | set mod_code_write = 1|
      executing             --|-----------------------|--------------------
      executing               |                       | ftrace_nmi_enter()
      executing               |                       |    do modify
      ------------------------|-----------------------|-----------------
      ftrace_nmi_exit()       |                       |
      
      cpu#3 may be being modified the code which is still being executed on cpu#1,
      it will have undefined results and possibly take a GPF, this patch
      prevents it occurred.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      LKML-Reference: <49C0B411.30003@cn.fujitsu.com>
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      e9d9df44
    • I
      tracepoints: dont update zero-sized tracepoint sections · ec625cb2
      Ingo Molnar 提交于
      Zero-sized tracepoint sections can occur if tracing is enabled but
      no tracepoint is defined. Do not emit a warning in that case.
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
      LKML-Reference: <1237394936.3132.1.camel@localhost.localdomain>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ec625cb2
    • J
      tracing: fix oops in tracepoint_update_probe_range() · 09933a10
      Jaswinder Singh Rajput 提交于
      Change this crash:
      
       BUG: unable to handle kernel NULL pointer dereference at (null)
       IP: [<ffffffff8107d4de>] tracepoint_update_probe_range+0x1f/0x9b
       PGD 13d5fb067 PUD 13d688067 PMD 0
       Oops: 0000 [#1] SMP
      
      To a more debuggable WARN_ONCE().
      Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1237394936.3132.1.camel@localhost.localdomain>
      [ moved the check outside the lock and added a WARN_ON(). ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      09933a10
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 · a1e4ee22
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
        Staging: benet: remove driver now that it is merged in drivers/net/
      a1e4ee22
    • L
      Merge branch 'for-2.6.29' of git://linux-nfs.org/~bfields/linux · 85bff885
      Linus Torvalds 提交于
      * 'for-2.6.29' of git://linux-nfs.org/~bfields/linux:
        nfsd: nfsd should drop CAP_MKNOD for non-root
        NFSD: provide encode routine for OP_OPENATTR
      85bff885
    • G
      Staging: benet: remove driver now that it is merged in drivers/net/ · d0573fac
      Greg Kroah-Hartman 提交于
      The benet driver is now in the proper place in drivers/net/benet, so we
      can remove the staging version.
      Acked-by: NSathya Perla <sathyap@serverengines.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d0573fac
    • L
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · d941d0ed
      Linus Torvalds 提交于
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/ps3: ps3_defconfig updates
        powerpc/mm: Respect _PAGE_COHERENT on classic ppc32 SW
        powerpc/5200: Enable CPU_FTR_NEED_COHERENT for MPC52xx
        ps3/block: Replace mtd/ps3vram by block/ps3vram
      d941d0ed
    • L
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 · 99dbe109
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
        USB: storage: Unusual USB device Prolific 2507 variation added
        USB: Add device id for Option GTM380 to option driver
        USB: Add Vendor/Product ID for new CDMA U727 to option driver
        USB: Updated unusual-devs entry for USB mass storage on Nokia 6233
        USB: Option: let cdc-acm handle Sony Ericsson F3507g / Dell 5530
        USB: EHCI: expedite unlinks when the root hub is suspended
        USB: EHCI: Fix isochronous URB leak
        USB: option.c: add ZTE 622 modem device
        USB: wusbcore/wa-xfer, fix lock imbalance
        USB: misc/vstusb, fix lock imbalance
        USB: misc/adutux, fix lock imbalance
        USB: image/mdc800, fix lock imbalance
        USB: atm/cxacru, fix lock imbalance
        USB: unusual_devs: Add support for GI 0431 SD-Card interface
        USB: serial: new cp2101 device id
        USB: serial: ftdi: enable UART detection on gnICE JTAG adaptors blacklist interface0
        USB: serial: add FTDI USB/Serial converter devices
        USB: usbfs: keep async URBs until the device file is closed
        USB: usbtmc: add protocol 1 support
        USB: usbtmc: fix stupid bug in open()
      99dbe109
  7. 18 3月, 2009 3 次提交