19 Sep, 2019

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver pull request for 5.4-rc1.

    As has been happening in previous releases, more and more individual
    driver subsystem trees are ending up in here. Now if that is good or
    bad I can't tell, but hopefully it makes your life easier as it's more
    of an aggregation of trees together to one merge point for you.

    Anyway, lots of stuff in here:
    - habanalabs driver updates
    - thunderbolt driver updates
    - misc driver updates
    - coresight and intel_th hwtracing driver updates
    - fpga driver updates
    - extcon driver updates
    - some dma driver updates
    - char driver updates
    - android binder driver updates
    - nvmem driver updates
    - phy driver updates
    - parport driver fixes
    - pcmcia driver fix
    - uio driver updates
    - w1 driver updates
    - configfs fixes
    - other assorted driver updates

    All of these have been in linux-next for a long time with no reported
    issues"

    * tag 'char-misc-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (200 commits)
    misc: mic: Use PTR_ERR_OR_ZERO rather than its implementation
    habanalabs: correctly cast variable to __le32
    habanalabs: show correct id in error print
    habanalabs: stop using the acronym KMD
    habanalabs: display card name as sensors header
    habanalabs: add uapi to retrieve aggregate H/W events
    habanalabs: add uapi to retrieve device utilization
    habanalabs: Make the Coresight timestamp perpetual
    habanalabs: explicitly set the queue-id enumerated numbers
    habanalabs: print to kernel log when reset is finished
    habanalabs: replace __le32_to_cpu with le32_to_cpu
    habanalabs: replace __cpu_to_le32/64 with cpu_to_le32/64
    habanalabs: Handle HW_IP_INFO if device disabled or in reset
    habanalabs: Expose devices after initialization is done
    habanalabs: improve security in Debug IOCTL
    habanalabs: use default structure for user input in Debug IOCTL
    habanalabs: Add descriptive name to PSOC app status register
    habanalabs: Add descriptive names to PSOC scratch-pad registers
    habanalabs: create two char devices per ASIC
    habanalabs: change device_setup_cdev() to be more generic
    ...

    Linus Torvalds
     

18 Sep, 2019

2 commits

  • …anaszewski/linux-leds

    Pull LED updates from Jacek Anaszewski:
    "In this cycle we've finally managed to contribute the patch set
    sorting out LED naming issues. Besides that there are many changes
    scattered among various LED class drivers and triggers.

    LED naming related improvements:

    - add new 'function' and 'color' fwnode properties and deprecate
    'label' property which has been frequently abused for conveying
    vendor specific names that have been available in sysfs anyway

    - introduce a set of standard LED_FUNCTION* definitions

    - introduce a set of standard LED_COLOR_ID* definitions

    - add a new {devm_}led_classdev_register_ext() API with the
    capability of automatic LED name composition basing on the
    properties available in the passed fwnode; the function is
    backwards compatible in a sense that it uses 'label' data, if
    present in the fwnode, for creating LED name

    - add tools/leds/get_led_device_info.sh script for retrieving LED
    vendor, product and bus names, if applicable; it also performs
    basic validation of an LED name

    - update following drivers and their DT bindings to use the new LED
    registration API:

    - leds-an30259a, leds-gpio, leds-as3645a, leds-aat1290, leds-cr0014114,
    leds-lm3601x, leds-lm3692x, leds-lp8860, leds-lt3593, leds-sc27xx-blt

    Other LED class improvements:

    - replace {devm_}led_classdev_register() macros with inlines

    - allow to call led_classdev_unregister() unconditionally

    - switch to use fwnode instead of be stuck with OF one

    LED triggers improvements:

    - led-triggers:
    - fix dereferencing of null pointer
    - fix a memory leak bug

    - ledtrig-gpio:
    - GPIO 0 is valid

    Drop superseeded apu2/3 support from leds-apu since for apu2+ a newer,
    more complete driver exists, based on a generic driver for the AMD
    SOCs gpio-controller, supporting LEDs as well other devices:

    - drop profile field from priv data

    - drop iosize field from priv data

    - drop enum_apu_led_platform_types

    - drop superseeded apu2/3 led support

    - add pr_fmt prefix for better log output

    - fix error message on probing failure

    Other misc fixes and improvements to existing LED class drivers:

    - leds-ns2, leds-max77650:
    - add of_node_put() before return

    - leds-pwm, leds-is31fl32xx:
    - use struct_size() helper

    - leds-lm3697, leds-lm36274, leds-lm3532:
    - switch to use fwnode_property_count_uXX()

    - leds-lm3532:
    - fix brightness control for i2c mode
    - change the define for the fs current register
    - fixes for the driver for stability
    - add full scale current configuration
    - dt: Add property for full scale current.
    - avoid potentially unpaired regulator calls
    - move static keyword to the front of declarations
    - fix optional led-max-microamp prop error handling

    - leds-max77650:
    - add of_node_put() before return
    - add MODULE_ALIAS()
    - Switch to fwnode property API

    - leds-as3645a:
    - fix misuse of strlcpy

    - leds-netxbig:
    - add of_node_put() in netxbig_leds_get_of_pdata()
    - remove legacy board-file support

    - leds-is31fl319x:
    - simplify getting the adapter of a client

    - leds-ti-lmu-common:
    - fix coccinelle issue
    - move static keyword to the front of declaration

    - leds-syscon:
    - use resource managed variant of device register

    - leds-ktd2692:
    - fix a typo in the name of a constant

    - leds-lp5562:
    - allow firmware files up to the maximum length

    - leds-an30259a:
    - fix typo

    - leds-pca953x:
    - include the right header"

    * tag 'leds-for-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: (72 commits)
    leds: lm3532: Fix optional led-max-microamp prop error handling
    led: triggers: Fix dereferencing of null pointer
    leds: ti-lmu-common: Move static keyword to the front of declaration
    leds: lm3532: Move static keyword to the front of declarations
    leds: trigger: gpio: GPIO 0 is valid
    leds: pwm: Use struct_size() helper
    leds: is31fl32xx: Use struct_size() helper
    leds: ti-lmu-common: Fix coccinelle issue in TI LMU
    leds: lm3532: Avoid potentially unpaired regulator calls
    leds: syscon: Use resource managed variant of device register
    leds: Replace {devm_}led_classdev_register() macros with inlines
    leds: Allow to call led_classdev_unregister() unconditionally
    leds: lm3532: Add full scale current configuration
    dt: lm3532: Add property for full scale current.
    leds: lm3532: Fixes for the driver for stability
    leds: lm3532: Change the define for the fs current register
    leds: lm3532: Fix brightness control for i2c mode
    leds: Switch to use fwnode instead of be stuck with OF one
    leds: max77650: Switch to fwnode property API
    led: triggers: Fix a memory leak bug
    ...

    Linus Torvalds
     
  • Pull documentation updates from Jonathan Corbet:
    "It's a somewhat calmer cycle for docs this time, as the churn of the
    mass RST conversion is happily mostly behind us.

    - A new document on reproducible builds.

    - We finally got around to zapping the documentation for hardware
    support that was removed in 2004; one doesn't want to rush these
    things.

    - The usual assortment of fixes, typo corrections, etc"

    * tag 'docs-5.4' of git://git.lwn.net/linux: (67 commits)
    Documentation: kbuild: Add document about reproducible builds
    docs: printk-formats: Stop encouraging use of unnecessary %h[xudi] and %hh[xudi]
    Documentation: Add "earlycon=sbi" to the admin guide
    doc:lock: remove reference to clever use of read-write lock
    devices.txt: improve entry for comedi (char major 98)
    docs: mtd: Update spi nor reference driver
    doc: arm64: fix grammar dtb placed in no attributes region
    Documentation: sysrq: don't recommend 'S' 'U' before 'B'
    mailmap: Update email address for Quentin Perret
    docs: ftrace: clarify when tracing is disabled by the trace file
    docs: process: fix broken link
    Documentation/arm/samsung-s3c24xx: Remove stray U+FEFF character to fix title
    Documentation/arm/sa1100/assabet: Fix 'make assabet_defconfig' command
    Documentation/arm/sa1100: Remove some obsolete documentation
    docs/zh_CN: update Chinese howto.rst for latexdocs making
    Documentation: virt: Fix broken reference to virt tree's index
    docs: Fix typo on pull requests guide
    kernel-doc: Allow anonymous enum
    Documentation: sphinx: Don't parse socket() as identifier reference
    Documentation: sphinx: Add missing comma to list of strings
    ...

    Linus Torvalds
     

04 Sep, 2019

17 commits

  • This patch adds barrier packets in the trace stream when the offset in the
    data buffer needs to be moved forward. Otherwise the decoder isn't aware
    of the break in the stream and can't synchronise itself with the trace
    data.

    Signed-off-by: Mathieu Poirier
    Tested-by: Yabin Cui
    Reviewed-by: Leo Yan
    Link: https://lore.kernel.org/r/20190829202842.580-18-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • If less space is available in the perf ring buffer than the ETR buffer,
    barrier packets inserted in the trace stream by tmc_sync_etr_buf() are
    skipped over when the head of the buffer is moved forward, resulting in
    traces that can't be decoded.

    This patch decouples the process of syncing ETR buffers and the addition
    of barrier packets in order to perform the latter once the offset in the
    trace buffer has been properly computed.

    Signed-off-by: Mathieu Poirier
    Reviewed-by: Leo Yan
    Link: https://lore.kernel.org/r/20190829202842.580-17-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • Make the computation of a memory mask representing the width of the memory
    bus into a function so that it can be re-used by the ETR driver.

    Signed-off-by: Mathieu Poirier
    Reviewed-by: Leo Yan
    Link: https://lore.kernel.org/r/20190829202842.580-16-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Mathieu Poirier
     
  • When tracing etm data of multiple threads on multiple cpus through
    perf interface, each cpu has a unique etr_perf_buffer while sharing
    the same etr device. There is no guarantee that the last cpu starts
    etm tracing also stops last. This makes perf_data check fail.

    Fix it by checking etr_buf instead of etr_perf_buffer.
    Also move the code setting and clearing perf_buf to more suitable
    places.

    Fixes: 3147da92a8a8 ("coresight: tmc-etr: Allocate and free ETR memory buffers for CPU-wide scenarios")
    Signed-off-by: Yabin Cui
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-15-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Yabin Cui
     
  • TMC etr always copies all available data to perf aux buffer, which
    may exceed the available space in perf aux buffer. It isn't suitable
    for not-snapshot mode, because:
    1) It may overwrite previously written data.
    2) It may make the perf_event_mmap_page->aux_head report having more
    or less data than the reality.

    So change to only copy the latest data fitting the available space in
    perf aux buffer.

    Signed-off-by: Yabin Cui
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-14-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Yabin Cui
     
  • To improve clarity, let's update the comment for etm4_os_unlock
    to use the name of the register as per the ETM architecture
    specification.

    The existing comment is also misleading as it suggests any value
    written to TRCOSLAR unlocks the trace registers, however it must
    be '0' - let's also correct this.

    Signed-off-by: Andrew Murray
    Reviewed-by: Suzuki K Poulose
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-13-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Andrew Murray
     
  • Given that the user-exposed module parameter for 'boot_enable' matches
    the variable that it sets, let's use module_param instead of
    module_param_named.

    Let's also use octal permissions (checkpatch recommends this) and
    provide a module parameter description.

    Signed-off-by: Andrew Murray
    Reviewed-by: Suzuki K Poulose
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-12-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Andrew Murray
     
  • Synchronization is recommended before disabling the trace registers
    to prevent any start or stop points being speculative at the point
    of disabling the unit (section 7.3.77 of ARM IHI 0064D).

    Synchronization is also recommended after programming the trace
    registers to ensure all updates are committed prior to normal code
    resuming (section 4.3.7 of ARM IHI 0064D).

    Let's ensure these syncronization points are present in the code
    and clearly commented.

    Note that we could rely on the barriers in CS_LOCK and
    coresight_disclaim_device_unlocked or the context switch to user
    space - however coresight may be of use in the kernel.

    On armv8 the mb macro is defined as dsb(sy) - Given that the etm4x is
    only used on armv8 let's directly use dsb(sy) instead of mb(). This
    removes some ambiguity and makes it easier to correlate the code with
    the TRM.

    Signed-off-by: Andrew Murray
    Reviewed-by: Suzuki K Poulose
    [Fixed capital letter for "use" in title]
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-11-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Andrew Murray
     
  • In addition to unlocking the OS lock, etm4_os_unlock will also
    set the os_unlock flag. Therefore let's avoid unnecessarily
    setting os_unlock flag outside of this function.

    Signed-off-by: Andrew Murray
    Reviewed-by: Suzuki K Poulose
    [Fixed capital letter for "remove" in the title]
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-10-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Andrew Murray
     
  • The ACPI bindings for CoreSight has been updated to add the device
    id for non-programmable CoreSight funnels (aka static funnels) as of
    v1.1 [0]. Add the ACPI id for static funnels in the driver.

    [0] https://static.docs.arm.com/den0067/a/DEN0067_CoreSight_ACPI_1.1.pdf

    Signed-off-by: Suzuki K Poulose
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-9-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     
  • We warn the users of obsolete bindings in the DT for coresight replicator
    and funnel drivers. However we use pr_warn_once() which doesn't give a clue
    about which device it is bound to. Let us use dev_warn_once() to give the
    context.

    Cc: Mathieu Poirier
    Signed-off-by: Suzuki K Poulose
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-8-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     
  • CoreSight TMC-ETR must have the non-secure invasive debug access
    enabled for use by self-hosted tracing. Without it, there is no
    point in enabling the ETR. So, let us check it in the TMC_AUTHSTATUS
    register and fail the probe if it is disabled.

    Cc: Mathieu Poirier
    Signed-off-by: Suzuki K Poulose
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-7-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     
  • We have so far ignored the memory errors, assuming that we have perfect
    hardware and driver. Let us handle the memory errors reported by the
    TMC ETR in status and truncate the buffer.

    Cc: Mathieu Poirier
    Signed-off-by: Suzuki K Poulose
    [Removed ASCII smiley face from changelog]
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-6-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     
  • We now use refcounts for the etr_buf users. Let us initialize it
    while we allocate it.

    Cc: Mathieu Poirier
    Signed-off-by: Suzuki K Poulose
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-5-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     
  • Add support for coresight CPU debug module on Qualcomm
    Kryo CPUs. This patch adds the UCI entries for Kryo CPUs
    found on MSM8996 which shares the same PIDs as ETMs.

    Without this, below error is observed on MSM8996:

    [ 5.429867] OF: graph: no port node found in /soc/debug@3810000
    [ 5.429938] coresight-etm4x: probe of 3810000.debug failed with error -22
    [ 5.435415] coresight-cpu-debug 3810000.debug: Coresight debug-CPU0 initialized
    [ 5.446474] OF: graph: no port node found in /soc/debug@3910000
    [ 5.448927] coresight-etm4x: probe of 3910000.debug failed with error -22
    [ 5.454681] coresight-cpu-debug 3910000.debug: Coresight debug-CPU1 initialized
    [ 5.487765] OF: graph: no port node found in /soc/debug@3a10000
    [ 5.488007] coresight-etm4x: probe of 3a10000.debug failed with error -22
    [ 5.493024] coresight-cpu-debug 3a10000.debug: Coresight debug-CPU2 initialized
    [ 5.501802] OF: graph: no port node found in /soc/debug@3b10000
    [ 5.512901] coresight-etm4x: probe of 3b10000.debug failed with error -22
    [ 5.513192] coresight-cpu-debug 3b10000.debug: Coresight debug-CPU3 initialized

    Signed-off-by: Sai Prakash Ranjan
    Tested-by: Leo Yan
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-4-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Sai Prakash Ranjan
     
  • Instead of overriding the peripheral id(PID) check in AMBA
    by hardcoding them in DT, add the PIDs to the ETM4x driver.
    Here we use Unique Component Identifier(UCI) for MSM8996
    since the ETM and CPU debug module shares the same PIDs.
    SDM845 does not support CPU debug module.

    Signed-off-by: Sai Prakash Ranjan
    Reviewed-by: Suzuki K Poulose
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-3-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Sai Prakash Ranjan
     
  • Avoid an extra function call in two function implementations
    by using a ternary operator instead of a conditional statement.

    This issue was detected by using the Coccinelle software.

    Signed-off-by: Markus Elfring
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190829202842.580-2-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Markus Elfring
     

03 Sep, 2019

1 commit


29 Aug, 2019

3 commits

  • This adds support for the Trace Hub in Tiger Lake PCH.

    Signed-off-by: Alexander Shishkin
    Cc: stable@vger.kernel.org # v4.14+
    Link: https://lore.kernel.org/r/20190821074955.3925-5-alexander.shishkin@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     
  • Add support for the Trace Hub in another Lewisburg PCH.

    Signed-off-by: Alexander Shishkin
    Cc: stable@vger.kernel.org # v4.14+
    Link: https://lore.kernel.org/r/20190821074955.3925-4-alexander.shishkin@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     
  • In the error path of stm_source_register_device(), the kfree is
    unnecessary, as the put_device() before it ends up calling
    stm_source_device_release() to free stm_source_device, leading to
    a double free at the outer kfree() call. Remove it.

    Signed-off-by: Ding Xiang
    Signed-off-by: Alexander Shishkin
    Fixes: 7bd1d4093c2fa ("stm class: Introduce an abstraction for System Trace Module devices")
    Link: https://lore.kernel.org/linux-arm-kernel/1563354988-23826-1-git-send-email-dingxiang@cmss.chinamobile.com/
    Cc: stable@vger.kernel.org # v4.4+
    Link: https://lore.kernel.org/r/20190821074955.3925-2-alexander.shishkin@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Ding Xiang
     

19 Aug, 2019

2 commits

  • We need the char/misc fixes in here as well.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Pull SPDX fixes from Greg KH:
    "Here are four small SPDX fixes for 5.3-rc5.

    A few style fixes for some SPDX comments, added an SPDX tag for one
    file, and fix up some GPL boilerplate for another file.

    All of these have been in linux-next for a few weeks with no reported
    issues (they are comment changes only, so that's to be expected...)"

    * tag 'spdx-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
    i2c: stm32: Use the correct style for SPDX License Identifier
    intel_th: Use the correct style for SPDX License Identifier
    coccinelle: api/atomic_as_refcounter: add SPDX License Identifier
    kernel/configs: Replace GPL boilerplate code with SPDX identifier

    Linus Torvalds
     

12 Aug, 2019

1 commit


02 Aug, 2019

1 commit

  • While running the linux-next with CONFIG_DEBUG_LOCKS_ALLOC enabled,
    I get the following splat.

    BUG: key ffffcb5636929298 has not been registered!
    ------------[ cut here ]------------
    DEBUG_LOCKS_WARN_ON(1)
    WARNING: CPU: 1 PID: 53 at kernel/locking/lockdep.c:3669 lockdep_init_map+0x164/0x1f0
    CPU: 1 PID: 53 Comm: kworker/1:1 Tainted: G W 5.2.0-next-20190712-00015-g00ad4634222e-dirty #603
    Workqueue: events amba_deferred_retry_func
    pstate: 60c00005 (nZCv daif +PAN +UAO)
    pc : lockdep_init_map+0x164/0x1f0
    lr : lockdep_init_map+0x164/0x1f0

    [ trimmed ]

    Call trace:
    lockdep_init_map+0x164/0x1f0
    __kernfs_create_file+0x9c/0x158
    sysfs_add_file_mode_ns+0xa8/0x1d0
    sysfs_add_file_to_group+0x88/0xd8
    etm_perf_add_symlink_sink+0xcc/0x138
    coresight_register+0x110/0x280
    tmc_probe+0x160/0x420

    [ trimmed ]

    ---[ end trace ab4cc669615ba1b0 ]---

    Fix this by initialising the dynamically allocated attribute properly.

    Cc: Mathieu Poirier
    Fixes: bb8e370bdc14 ("coresight: perf: Add "sinks" group to PMU directory")
    Cc: stable
    Signed-off-by: Suzuki K Poulose
    [Fixed a typograhic error in the changelog]
    Signed-off-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20190801172323.18359-2-mathieu.poirier@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     

01 Aug, 2019

1 commit


31 Jul, 2019

1 commit

  • This patch corrects the SPDX License Identifier style
    in header files related to Drivers for Intel(R) Trace Hub
    controller.
    For C header files Documentation/process/license-rules.rst
    mandates C-like comments (opposed to C source files where
    C++ style should be used)

    Changes made by using a script provided by Joe Perches here:
    https://lkml.org/lkml/2019/2/7/46

    Suggested-by: Joe Perches
    Signed-off-by: Nishad Kamdar
    Signed-off-by: Greg Kroah-Hartman

    Nishad Kamdar
     

30 Jul, 2019

3 commits

  • Add a helper to match a device by its type and provide wrappers
    for {bus/class/driver}_find_device() APIs.

    Cc: Alexander Shishkin
    Cc: Arnd Bergmann
    Cc: Harald Freudenberger
    Cc: Heiko Carstens
    Cc: linux-usb@vger.kernel.org
    Cc: Oliver Neukum
    Cc: Sebastian Andrzej Siewior
    Cc: Tomas Winkler
    Cc: "Rafael J. Wysocki"
    Cc: Greg Kroah-Hartman
    Cc: Ulf Hansson
    Cc: Joe Perches
    Signed-off-by: Suzuki K Poulose
    Link: https://lore.kernel.org/r/20190723221838.12024-5-suzuki.poulose@arm.com
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     
  • Add a helper to match the firmware node handle of a device and provide
    wrappers for {bus/class/driver}_find_device() APIs to avoid proliferation
    of duplicate custom match functions.

    Cc: "David S. Miller"
    Cc: Doug Ledford
    Cc: Jason Gunthorpe
    Cc: linux-usb@vger.kernel.org
    Cc: "Rafael J. Wysocki"
    Cc: Ulf Hansson
    Cc: Joe Perches
    Cc: Will Deacon
    Cc: Joerg Roedel
    Signed-off-by: Suzuki K Poulose
    Acked-by: Robin Murphy
    Reviewed-by: Mathieu Poirier
    Reviewed-by: Heikki Krogerus
    Link: https://lore.kernel.org/r/20190723221838.12024-4-suzuki.poulose@arm.com
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     
  • Add a helper to match the device name for device lookup. Also
    reuse this generic exported helper for the existing bus_find_device_by_name().
    and add similar variants for driver/class.

    Cc: Alessandro Zummo
    Cc: Alexander Aring
    Cc: Alexander Shishkin
    Cc: Arnd Bergmann
    Cc: Dan Murphy
    Cc: Harald Freudenberger
    Cc: Heiko Carstens
    Cc: Jacek Anaszewski
    Cc: Lee Jones
    Cc: linux-leds@vger.kernel.org
    Cc: linux-rtc@vger.kernel.org
    Cc: linux-usb@vger.kernel.org
    Cc: linux-wpan@vger.kernel.org
    Cc: Maxime Coquelin
    Cc: Pavel Machek
    Cc: Peter Oberparleiter
    Cc: "Rafael J. Wysocki"
    Cc: Stefan Schmidt
    Cc: Greg Kroah-Hartman
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Suzuki K Poulose
    Reviewed-by: Heikki Krogerus
    Acked-by: Alexandre Belloni
    Link: https://lore.kernel.org/r/20190723221838.12024-2-suzuki.poulose@arm.com
    Signed-off-by: Greg Kroah-Hartman

    Suzuki K Poulose
     

25 Jul, 2019

5 commits

  • The MSU configuration registers may contain buffer address/size set by
    the BIOS or an external hardware debugger, which may want to take over
    tracing from the driver when the driver is not actively tracing.

    Preserve these settings when not actively tracing.

    Signed-off-by: Alexander Shishkin
    Reviewed-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20190705141425.19894-6-alexander.shishkin@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     
  • We already prevent freeing buffers via sysfs interface in case there are
    existing users or if trace is active. Treat the existence of locked windows
    similarly and return -EBUSY on attempts to free the buffer. When the last
    window is unlocked, the freeing will succeed.

    Signed-off-by: Alexander Shishkin
    Reviewed-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20190705141425.19894-5-alexander.shishkin@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     
  • Currently, the window size is limited to the maximum number of sg entries
    in one table. This is because the code addresses individual blocks within
    the window by their numeric index. In reality, though, the blocks most
    often are iterated through sequentially. By rewriting the logic to use sg
    pointers instead of block indices we loose the necessity to dereference
    them directly and gain the ability to use multiple chained tables if
    necessary.

    Get rid of the limitation by replacing index-based block accesses with
    sequential block accesses.

    Signed-off-by: Alexander Shishkin
    Reviewed-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20190705141425.19894-4-alexander.shishkin@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     
  • This patch adds an example MSU buffer "sink", which consumes trace
    data from MSC buffers.

    Functionally, it acts similarly to "multi" mode with automatic window
    switching.

    Signed-off-by: Alexander Shishkin
    Reviewed-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20190705141425.19894-3-alexander.shishkin@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     
  • Introduces a concept of external buffers, which is a mechanism for creating
    trace sinks that would receive trace data from MSC buffers and transfer it
    elsewhere.

    A external buffer can implement its own window allocation/deallocation if
    it has to. It must provide a callback that's used to notify it when a
    window fills up, so that it can then start a DMA transaction from that
    window 'elsewhere'. This window remains in a 'locked' state and won't be
    used for storing new trace data until the buffer 'unlocks' it with a
    provided API call, at which point the window can be used again for storing
    trace data.

    This relies on a functional "last block" interrupt, so not all versions of
    Trace Hub can use this feature, which does not reflect on existing users.

    Signed-off-by: Alexander Shishkin
    Reviewed-by: Andy Shevchenko
    Link: https://lore.kernel.org/r/20190705141425.19894-2-alexander.shishkin@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Alexander Shishkin
     

13 Jul, 2019

2 commits

  • Fix Linus' merge error in the parent commit, causing:

    drivers/hwtracing/coresight/coresight.c:1051:11: error: incompatible pointer types passing 'int (struct device *, void *)' to parameter of type 'int (*)(struct device *, const void *)' [-Werror,-Wincompatible-pointer-types]
    coresight_device_fwnode_match);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    include/linux/device.h:173:17: note: passing argument to parameter 'match' here
    int (*match)(struct device *dev, const void *data));
    ^

    due to missed header file fixup.

    Fixes: f632a8170a6b ("Merge tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core")
    Signed-off-by: Nathan Chancellor
    [ Greg even sent this patch with his pull request, but I stupidly
    thought it was the merge resolution fix I had already done as part of
    the merge. But no, this was the extra fix for the header file
    that goes with the definition I _had_ caught - Linus ]
    Signed-off-by: Linus Torvalds

    Nathan Chancellor
     
  • Pull driver core and debugfs updates from Greg KH:
    "Here is the "big" driver core and debugfs changes for 5.3-rc1

    It's a lot of different patches, all across the tree due to some api
    changes and lots of debugfs cleanups.

    Other than the debugfs cleanups, in this set of changes we have:

    - bus iteration function cleanups

    - scripts/get_abi.pl tool to display and parse Documentation/ABI
    entries in a simple way

    - cleanups to Documenatation/ABI/ entries to make them parse easier
    due to typos and other minor things

    - default_attrs use for some ktype users

    - driver model documentation file conversions to .rst

    - compressed firmware file loading

    - deferred probe fixes

    All of these have been in linux-next for a while, with a bunch of
    merge issues that Stephen has been patient with me for"

    * tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (102 commits)
    debugfs: make error message a bit more verbose
    orangefs: fix build warning from debugfs cleanup patch
    ubifs: fix build warning after debugfs cleanup patch
    driver: core: Allow subsystems to continue deferring probe
    drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT
    arch_topology: Remove error messages on out-of-memory conditions
    lib: notifier-error-inject: no need to check return value of debugfs_create functions
    swiotlb: no need to check return value of debugfs_create functions
    ceph: no need to check return value of debugfs_create functions
    sunrpc: no need to check return value of debugfs_create functions
    ubifs: no need to check return value of debugfs_create functions
    orangefs: no need to check return value of debugfs_create functions
    nfsd: no need to check return value of debugfs_create functions
    lib: 842: no need to check return value of debugfs_create functions
    debugfs: provide pr_fmt() macro
    debugfs: log errors when something goes wrong
    drivers: s390/cio: Fix compilation warning about const qualifiers
    drivers: Add generic helper to match by of_node
    driver_find_device: Unify the match function with class_find_device()
    bus_find_device: Unify the match callback with class_find_device
    ...

    Linus Torvalds