04 Feb, 2015

7 commits

  • The tracing "instances" directory can create sub tracing buffers
    with mkdir, and remove them with rmdir. As a mkdir will also create
    all the files and directories that control the sub buffer the inode
    mutexes need to be released before this is done, to avoid deadlocks.
    It is better to let the tracing system unlock the inode mutexes before
    calling the functions that create the files within the new directory
    (or deletes the files from the one being destroyed).

    Now that tracing has been converted over to tracefs, the tracefs file
    system can be modified to accommodate this feature. It still releases
    the locks, but the filesystem itself can take care of the ugly
    business and let the user just do what it needs.

    The tracing system now attaches a descriptor to the directory dentry
    that can have userspace create or remove sub directories. If this
    descriptor does not exist for a dentry, then that dentry can not be
    used to create other directories. This descriptor holds a mkdir and
    rmdir method that only takes a character string as an argument.

    The tracefs file system will first make a copy of the dentry name
    before releasing the locks. Then it will pass the copied name to the
    methods. It is up to the tracing system that supplied the methods to
    handle races with duplicate names and such as all the inode mutexes
    would be released when the functions are called.

    Cc: Al Viro
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • When tracefs is configured, have the directory /sys/kernel/tracing appear
    just like /sys/kernel/debug appears when debugfs is configured.

    This will give a consistent place for system admins to mount tracefs.

    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • As tools currently rely on the tracing directory in debugfs, we can not
    just created a tracefs infrastructure and expect sysadmins to mount
    the new tracefs to have their old tools work.

    Instead, the debugfs tracing directory is still created and the tracefs
    file system is mounted there when the debugfs filesystem is mounted.

    No longer does the tracing infrastructure update the debugfs file system,
    but instead interacts with the tracefs file system. But now, it still
    appears to the user like nothing changed, except you also have the feature
    of mounting just the tracing system without needing all of debugfs!

    Cc: Al Viro
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • debugfs was fine for the tracing facility as a quick way to get
    an interface. Now that tracing has matured, it should separate itself
    from debugfs such that it can be mounted separately without needing
    to mount all of debugfs with it. That is, users resist using tracing
    because it requires mounting debugfs. Having tracing have its own file
    system lets users get the features of tracing without needing to bring
    in the rest of the kernel's debug infrastructure.

    Another reason for tracefs is that debubfs does not support mkdir.
    Currently, to create instances, one does a mkdir in the tracing/instance
    directory. This is implemented via a hack that forces debugfs to do
    something it is not intended on doing. By converting over to tracefs, this
    hack can be removed and mkdir can be properly implemented. This patch does
    not address this yet, but it lays the ground work for that to be done.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • Add a separate file system to handle the tracing directory. Currently it
    is part of debugfs, but that is starting to show its limits.

    One thing is that in order to access the tracing infrastructure, you need
    to mount debugfs. As that includes debugging from all sorts of sub systems
    in the kernel, it is not considered advisable to mount such an all
    encompassing debugging system.

    Having the tracing system in its own file systems gives access to the
    tracing sub system without needing to include all other systems.

    Another problem with tracing using the debugfs system is that the
    instances use mkdir to create sub buffers. debugfs does not support mkdir
    from userspace so to implement it, special hacks were used. By controlling
    the file system that the tracing infrastructure uses, this can be properly
    done without hacks.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • The options for cmdline tracers are not created if the debugfs system
    is not ready yet. If tracing has started before debugfs is up, then the
    option files for the tracer are not created. Create them when creating
    the tracing directory if the current tracer requires option files.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • Do not bother creating tracer options if no tracing directory
    exists. If a tracer is enabled via the command line, and is
    started before the tracing directory is created, then it wont have
    its tracer specific options created.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

03 Feb, 2015

1 commit


02 Feb, 2015

2 commits

  • The top level trace array is treated a little different than the
    instances, as it has to deal with more of the general tracing.
    The tr->dir is the tracing directory, which is an immutable
    dentry, where as the tr->dir of instances are the dentry that
    was created, and can be destroyed later. These should have different
    functions accessing them.

    As only tracing_init_dentry() deals with the top level array, fold
    the code for it into that function, and remove the trace_init_dentry_tr()
    that was also used by the instances to get their directory dentry.

    Add a tracing_get_dentry() to just get the tracing dir entry for
    instances as well as the top level array.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     
  • tracing_init_dentry_tr() is not used outside of trace.c, it should
    be static.

    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

29 Jan, 2015

1 commit

  • The ring_buffer_producer uses 'struct timeval' to measure
    its start and end times. 'struct timeval' on 32-bit systems
    will have its tv_sec value overflow in year 2038 and beyond.
    This patch replaces struct timeval with 'ktime_t' which uses
    64-bit representation for nanoseconds.

    Link: http://lkml.kernel.org/r/20150128141611.GA2701@tinar

    Suggested-by: Arnd Bergmann
    Suggested-by: Steven Rostedt
    Signed-off-by: Tina Ruchandani
    Signed-off-by: Steven Rostedt

    Tina Ruchandani
     

28 Jan, 2015

2 commits

  • If a trace event contains an array, there is currently no standard
    way to format this for text output. Drivers are currently hacking
    around this by a) local hacks that use the trace_seq functionailty
    directly, or b) just not printing that information. For fixed size
    arrays, formatting of the elements can be open-coded, but this gets
    cumbersome for arrays of non-trivial size.

    These approaches result in non-standard content of the event format
    description delivered to userspace, so userland tools needs to be
    taught to understand and parse each array printing method
    individually.

    This patch implements a __print_array() helper that tracepoint
    implementations can use instead of reinventing it. A simple C-style
    syntax is used to delimit the array and its elements {like,this}.

    So that the helpers can be used with large static arrays as well as
    dynamic arrays, they take a pointer and element count: they can be
    used with __get_dynamic_array() for use with dynamic arrays.
    Link: http://lkml.kernel.org/r/1422449335-8289-2-git-send-email-javi.merino@arm.com

    Cc: Ingo Molnar
    Signed-off-by: Dave Martin
    Signed-off-by: Javi Merino
    Signed-off-by: Steven Rostedt

    Dave Martin
     
  • Remove the output-confusing newline below:

    [ 0.191328]
    **********************************************************
    [ 0.191493] ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE **
    [ 0.191586] ** **
    ...

    Link: http://lkml.kernel.org/r/1422375440-31970-1-git-send-email-bp@alien8.de

    Signed-off-by: Borislav Petkov
    [ added an extra '\n' by itself, to keep what it was suppose to do ]
    Signed-off-by: Steven Rostedt

    Borislav Petkov
     

26 Jan, 2015

12 commits


23 Jan, 2015

2 commits


18 Jan, 2015

9 commits

  • Linus Torvalds
     
  • Pull ARM SoC fixes from Olof Johansson:
    "We've been sitting on our fixes branch for a while, so this batch is
    unfortunately on the large side.

    A lot of these are tweaks and fixes to device trees, fixing various
    bugs around clocks, reg ranges, etc. There's also a few defconfig
    updates (which are on the late side, no more of those).

    All in all the diffstat is bigger than ideal at this time, but nothing
    in here seems particularly risky"

    * tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
    reset: sunxi: fix spinlock initialization
    ARM: dts: disable CCI on exynos5420 based arndale-octa
    drivers: bus: check cci device tree node status
    ARM: rockchip: disable jtag/sdmmc autoswitching on rk3288
    ARM: nomadik: fix up leftover device tree pins
    ARM: at91: board-dt-sama5: add phy_fixup to override NAND_Tree
    ARM: at91/dt: sam9263: Add missing clocks to lcdc node
    ARM: at91: sama5d3: dt: correct the sound route
    ARM: at91/dt: sama5d4: fix the timer reg length
    ARM: exynos_defconfig: Enable LM90 driver
    ARM: exynos_defconfig: Enable options for display panel support
    arm: dts: Use pmu_system_controller phandle for dp phy
    ARM: shmobile: sh73a0 legacy: Set .control_parent for all irqpin instances
    ARM: dts: berlin: correct BG2Q's SM GPIO location.
    ARM: dts: berlin: add broken-cd and set bus width for eMMC in Marvell DMP DT
    ARM: dts: berlin: fix io clk and add missing core clk for BG2Q sdhci2 host
    ARM: dts: Revert disabling of smc91x for n900
    ARM: dts: imx51-babbage: Fix ULPI PHY reset modelling
    ARM: dts: dra7-evm: fix qspi device tree partition size
    ARM: omap2plus_defconfig: use CONFIG_CPUFREQ_DT
    ...

    Linus Torvalds
     
  • Pull clock driver fixes from Mike Turquette:
    "Small number of fixes for clock drivers and a single null pointer
    dereference fix in the framework core code.

    The driver fixes vary from fixing section mismatch warnings to
    preventing machines from hanging (and preventing developers from
    crying)"

    * tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux:
    clk: fix possible null pointer dereference
    Revert "clk: ppc-corenet: Fix Section mismatch warning"
    clk: rockchip: fix deadlock possibility in cpuclk
    clk: berlin: bg2q: remove non-exist "smemc" gate clock
    clk: at91: keep slow clk enabled to prevent system hang
    clk: rockchip: fix rk3288 cpuclk core dividers
    clk: rockchip: fix rk3066 pll lock bit location
    clk: rockchip: Fix clock gate for rk3188 hclk_emem_peri
    clk: rockchip: add CLK_IGNORE_UNUSED flag to fix rk3066/rk3188 USB Host

    Linus Torvalds
     
  • Pull SCSI fixes from James Bottomley:
    "This is one fix for a Multiqueue sleeping in invalid context problem
    and a MAINTAINER file update for Qlogic"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: ->queue_rq can't sleep
    MAINTAINERS: Update maintainer list for qla4xxx

    Linus Torvalds
     
  • The commit 646cafc6 (clk: Change clk_ops->determine_rate to
    return a clk_hw as the best parent) opens a possibility for
    null pointer dereference, fix this.

    Signed-off-by: Stanimir Varbanov
    Reviewed-by: Stephen Boyd
    Signed-off-by: Michael Turquette

    Stanimir Varbanov
     
  • This reverts commit da788acb28386aa896224e784954bb73c99ff26c.

    That commit tried to fix the section mismatch warning by moving the
    ppc_corenet_clk_driver struct to init section. This is definitely wrong
    because the kernel would free the memories occupied by this struct
    after boot while this driver is still registered in the driver core.
    The kernel would panic when accessing this driver struct.

    Cc: stable@vger.kernel.org # 3.17
    Signed-off-by: Kevin Hao
    Acked-by: Scott Wood
    Signed-off-by: Michael Turquette

    Kevin Hao
     
  • Lockdep reported a possible deadlock between the cpuclk lock and for example
    the i2c driver.

    CPU0 CPU1
    ---- ----
    lock(clk_lock);
    local_irq_disable();
    lock(&(&i2c->lock)->rlock);
    lock(clk_lock);

    lock(&(&i2c->lock)->rlock);

    *** DEADLOCK ***

    The generic clock-types of the core ccf already use spin_lock_irqsave when
    touching clock registers, so do the same for the cpuclk.

    Signed-off-by: Heiko Stuebner
    Reviewed-by: Doug Anderson
    Signed-off-by: Michael Turquette
    [mturquette@linaro.org: removed initialization of "flags"]

    Heiko Stübner
     
  • Pull dmaengine fixes from Vinod Koul:
    "Two patches, the first by Andy to fix dw dmac runtime pm and second
    one by me to fix the dmaengine headers in MAINTAINERS"

    * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
    dmaengine: dw: balance PM runtime calls
    MAINTAINERS: dmaengine: fix the header file for dmaengine

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "Mostly tooling fixes, but also two PMU driver fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf tools powerpc: Use dwfl_report_elf() instead of offline.
    perf tools: Fix segfault for symbol annotation on TUI
    perf test: Fix dwarf unwind using libunwind.
    perf tools: Avoid build splat for syscall numbers with uclibc
    perf tools: Elide strlcpy warning with uclibc
    perf tools: Fix statfs.f_type data type mismatch build error with uclibc
    tools: Remove bitops/hweight usage of bits in tools/perf
    perf machine: Fix __machine__findnew_thread() error path
    perf tools: Fix building error in x86_64 when dwarf unwind is on
    perf probe: Propagate error code when write(2) failed
    perf/x86/intel: Fix bug for "cycles:p" and "cycles:pp" on SLM
    perf/rapl: Fix sysfs_show() initialization for RAPL PMU

    Linus Torvalds
     

17 Jan, 2015

4 commits

  • …it/acme/linux into perf/urgent

    Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

    - Fix segfault when using both the map symtab viewer and annotation
    in the TUI (Namhyung Kim).

    - uClibc build fixes (Alexey Brodkin, Vineet Gupta).

    - bitops/hweight were moved from tools/perf/ too tools/include, move
    some leftovers (Arnaldo Carvalho de Melo)

    - Fix dwarf unwind x86_64 build error (Namhyung Kim)

    - Fix __machine__findnew_thread() error path (Namhyung Kim)

    - Propagate error code when write(2) failed in 'perf probe' (Namhyung Kim)

    - Use dwfl_report_elf() instead of offline in powerpc bits to
    properly handle non prelinked DSOs (Sukadev Bhattiprolu).

    - Fix dwarf unwind using libunwind in 'perf test' (Wang Nan)

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • …kgene/linux-samsung into fixes

    Merge "Samsung fixes for v3.19" from Kukjin Kim:

    Samsung fixes for v3.19
    - exynos_defconfig: enable LM90 driver and display panel support
    - HWMON
    - SENSORS_LM90
    - Direct Rendering Manager (DRM)
    - DRM bridge registration and lookup framework
    - Parade ps8622/ps8625 eDP/LVDS bridge
    - NXP ptn3460 eDP/LVDS bridge
    - Exynos Fully Interactive Mobile Display controller (FIMD)
    - Panel registration and lookup framework
    - Simple panels
    - Backlight & LCD device support

    - use pmu_system_controller phandle for dp phy
    : DP PHY requires pmu_system_controller to handle PMU reg. now

    * tag 'samsung-fixes-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
    ARM: exynos_defconfig: Enable LM90 driver
    ARM: exynos_defconfig: Enable options for display panel support
    arm: dts: Use pmu_system_controller phandle for dp phy

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     
  • Call spin_lock_init() before the spinlocks are used, both in early init
    and probe functions preventing a lockdep splat.

    I have been observing lockdep complaining [1] during boot on my a80 optimus [2]
    when CONFIG_PROVE_LOCKING has been enabled. This patch resolves the splat,
    and has been tested on a few other sunxi platforms without issue.

    [1] http://storage.kernelci.org/next/next-20150107/arm-multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab-tbaker/boot-sun9i-a80-optimus.html
    [2] http://kernelci.org/boot/?a80-optimus

    Signed-off-by: Tyler Baker
    Cc:
    Acked-by: Philipp Zabel
    Signed-off-by: Kevin Hilman
    Signed-off-by: Olof Johansson

    Tyler Baker
     
  • …rnel/git/horms/renesas into fixes

    Merge "Renesas ARM Based SoC Fixes for v3.19" from Simon Horman:

    Renesas ARM Based SoC Fixes for v3.19

    This pull request is based on the last round of SoC updates for v3.19,
    Fourth Round of Renesas ARM Based SoC Updates for v3.19, tagged as
    renesas-soc3-for-v3.19, merged into your next/soc branch and included in
    v3.19-rc1.

    - ARM: shmobile: r8a7740: Instantiate GIC from C board code in legacy builds

    Set .control_parent for all irqpin instances for sh73a0 SoC when booting
    using legacy C.

    - ARM: shmobile: r8a7740: Instantiate GIC from C board code in legacy builds

    This fixes a long standing problem which has been present since
    the sh73a0 SoC started using the INTC External IRQ pin driver.

    The patch that introduced the problem is 341eb5465f67437a ("ARM:
    shmobile: INTC External IRQ pin driver on sh73a0") which was included
    in v3.10.

    * tag 'renesas-soc-fixes-for-v3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
    ARM: shmobile: sh73a0 legacy: Set .control_parent for all irqpin instances
    ARM: shmobile: r8a7740: Instantiate GIC from C board code in legacy builds

    Olof Johansson