21 Jun, 2018

1 commit

  • [ Upstream commit 278d744c46fd4f1925aec77752d18a0e4a9cbec3 ]

    Add missing of_node_put()s at two places for device nodes returned by
    of_parse_phandle().

    Fixes: 051fb70fd4ea ("remoteproc: qcom: Driver for the self-authenticating
    Hexagon v5")
    Signed-off-by: Tobias Jordan
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Tobias Jordan
     

30 May, 2018

1 commit


02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

12 Oct, 2017

1 commit


11 Oct, 2017

2 commits

  • When RPMSG_QCOM_GLINK_SMEM=m and one driver causes the qcom_common.c file
    to be compiled as built-in, we get a link error:

    drivers/remoteproc/qcom_common.o: In function `glink_subdev_remove':
    qcom_common.c:(.text+0x130): undefined reference to `qcom_glink_smem_unregister'
    qcom_common.c:(.text+0x130): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qcom_glink_smem_unregister'
    drivers/remoteproc/qcom_common.o: In function `glink_subdev_probe':
    qcom_common.c:(.text+0x160): undefined reference to `qcom_glink_smem_register'
    qcom_common.c:(.text+0x160): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qcom_glink_smem_register'

    Out of the three PIL driver instances, QCOM_ADSP_PIL already has a
    Kconfig dependency to prevent this from happening, but the other two
    do not. This adds the same dependency there.

    Fixes: eea07023e6d9 ("remoteproc: qcom: adsp: Allow defining GLINK edge")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Bjorn Andersson

    Arnd Bergmann
     
  • The priv->mem[] array has IMX7D_RPROC_MEM_MAX elements so the > should
    be >= to avoid writing one element beyond the end of the array.

    Fixes: a0ff4aa6f010 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Bjorn Andersson

    Dan Carpenter
     

10 Sep, 2017

1 commit

  • Pull rpmsg updates from Bjorn Andersson:
    "This extends the Qualcomm GLINK implementation to support the
    additional features used for communicating with modem and DSP
    coprocessors in modern Qualcomm platforms.

    In addition to this there's support for placing virtio RPMSG buffers
    in non-System RAM"

    * tag 'rpmsg-v4.14' of git://github.com/andersson/remoteproc: (29 commits)
    rpmsg: glink: initialize ret to zero to ensure error status check is correct
    rpmsg: glink: fix null pointer dereference on a null intent
    dt-bindings: soc: qcom: Extend GLINK to cover SMEM
    remoteproc: qcom: adsp: Allow defining GLINK edge
    rpmsg: glink: Export symbols from common code
    rpmsg: glink: Release idr lock before returning on error
    rpmsg: glink: Handle remote rx done command
    rpmsg: glink: Request for intents when unavailable
    rpmsg: glink: Use the intents passed by remote
    rpmsg: glink: Receive and store the remote intent buffers
    rpmsg: glink: Add announce_create ops and preallocate intents
    rpmsg: glink: Add rx done command
    rpmsg: glink: Make RX FIFO peak accessor to take an offset
    rpmsg: glink: Use the local intents when receiving data
    rpmsg: glink: Add support for TX intents
    rpmsg: glink: Fix idr_lock from mutex to spinlock
    rpmsg: glink: Add support for transport version negotiation
    rpmsg: glink: Introduce glink smem based transport
    rpmsg: glink: Do a mbox_free_channel in remove
    rpmsg: glink: Return -EAGAIN when there is no FIFO space
    ...

    Linus Torvalds
     

02 Sep, 2017

3 commits


31 Aug, 2017

2 commits

  • Subdevices might depend on earlier registered subdevices for
    communication purposes, as such they should be stopped in reverse order
    so that said communication channel is removed after the dependent
    subdevice is stopped.

    Signed-off-by: Bjorn Andersson

    Bjorn Andersson
     
  • Provide a basic driver to control Cortex M4 co-processor found
    on NXP i.MX7D and i.MX6SX.
    Currently it is able to resolve addresses between M4 and main CPU,
    start and stop the co-processor. Other functionality is not provided
    or test.

    This driver was tested on NXP i.MX7D and expected to work on
    i.MX6SX as well.

    Signed-off-by: Oleksij Rempel
    Signed-off-by: Bjorn Andersson

    Oleksij Rempel
     

30 Aug, 2017

1 commit


28 Aug, 2017

3 commits

  • Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
    reset lines") started to transition the reset control request API calls
    to explicitly state whether the driver needs exclusive or shared reset
    control behavior. Convert all drivers requesting exclusive resets to the
    explicit API call so the temporary transition helpers can be removed.

    No functional changes.

    Cc: Patrice Chotard
    Cc: Ohad Ben-Cohen
    Cc: Bjorn Andersson
    Cc: linux-remoteproc@vger.kernel.org
    Signed-off-by: Philipp Zabel
    Signed-off-by: Bjorn Andersson

    Philipp Zabel
     
  • Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
    reset lines") started to transition the reset control request API calls
    to explicitly state whether the driver needs exclusive or shared reset
    control behavior. Convert all drivers requesting exclusive resets to the
    explicit API call so the temporary transition helpers can be removed.

    No functional changes.

    Cc: Ohad Ben-Cohen
    Cc: Bjorn Andersson
    Cc: linux-remoteproc@vger.kernel.org
    Signed-off-by: Philipp Zabel
    Signed-off-by: Bjorn Andersson

    Philipp Zabel
     
  • Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
    reset lines") started to transition the reset control request API calls
    to explicitly state whether the driver needs exclusive or shared reset
    control behavior. Convert all drivers requesting exclusive resets to the
    explicit API call so the temporary transition helpers can be removed.

    No functional changes.

    Cc: Ohad Ben-Cohen
    Cc: Bjorn Andersson
    Cc: linux-remoteproc@vger.kernel.org
    Acked-by: Suman Anna
    Signed-off-by: Philipp Zabel
    Signed-off-by: Bjorn Andersson

    Philipp Zabel
     

25 Aug, 2017

5 commits

  • Add support to the keystone remoteproc driver for managing the
    DSP present in the Keystone 2 66AK2G SoC. The 66AK2G SoC has
    a Power Management Micro Controller (PMMC) that manages the
    individual device's power, clock and reset functionalities.

    The keystone remoteproc driver already uses standard frameworks
    for reset and clock control, so it doesn't require any significant
    modifications other than a new compatible suitable for 66AK2G DSP.

    The binding document is also updated to reflect the modified
    property values used by the 66AK2G DSP node as compared to the
    values used by existing Keystone 2 DSPs.

    Acked-by: Rob Herring
    Signed-off-by: Suman Anna
    Signed-off-by: Andrew F. Davis
    Signed-off-by: Bjorn Andersson

    Suman Anna
     
  • The Davinci remoteproc driver currently supports the DSP remoteproc
    device created in legacy-style on OMAP-L13x SoCs. The driver has been
    enhanced to support the DSP remoteproc device created through Device
    Tree now. The current DT support handles the C674x DSP processor
    subsystem on OMAP-L138 SoCs.

    Signed-off-by: Suman Anna
    Signed-off-by: Bjorn Andersson

    Suman Anna
     
  • The DSP subsystem on OMAP-L13x SoCs has various internal RAM
    memories that can accessed from the ARM side. These memories
    can be configured to be used as either RAM or Cache.

    The Davinci remoteproc driver has been enhanced to parse and
    store the kernel mappings for these internal RAM memories.
    These mappings can then be used to support direct loading of
    text/data into these memories from the remoteproc driver.

    Signed-off-by: Suman Anna
    Signed-off-by: Bjorn Andersson

    Suman Anna
     
  • The davinci remoteproc driver currently uses the platform_get_resource()
    API for retrieving the IOMEM resources. Switch this function to use the
    platform_get_resource_byname() API instead in preparation for adding the
    DT support so that the binding can be agnostic of the IOMEM resource
    order.

    Signed-off-by: Suman Anna
    Signed-off-by: Bjorn Andersson

    Suman Anna
     
  • Make this const as it is only stored in the type field of a device
    structure, which is const.
    Done using Coccinelle.

    Signed-off-by: Bhumika Goyal
    Signed-off-by: Bjorn Andersson

    Bhumika Goyal
     

03 Aug, 2017

1 commit

  • This adds the remoteproc part of subsystem restart, which is responsible
    for emitting notifications to other processors in the system about a
    dying remoteproc instance.

    These notifications are propagated to the various communication systems
    in the various remote processors to shut down communication links that
    was left in a dangling state as the remoteproc was stopped (or crashed).

    Signed-off-by: Bjorn Andersson

    Bjorn Andersson
     

27 Jul, 2017

1 commit

  • The additional arguments in the internal __rproc_boot() function
    were dropped in commit 2bfc311a57f5 ("remoteproc: Drop wait in
    __rproc_boot()"). The exported rproc_boot() is now just a wrapper
    around this internal function, so merge them together.

    While at this, also remove the declaration for the previously
    cleaned up rproc_boot_nowait() function.

    Signed-off-by: Suman Anna
    Signed-off-by: Bjorn Andersson

    Suman Anna
     

28 Jun, 2017

3 commits

  • Drop the dependency on RESET_CONTROLLER for the Keystone remoteproc
    driver to resolve some circular dependencies around different choices
    for RESET_CONTROLLER on common ARM configs. This dependency is
    inherent as the RESET_CONTROLLER will be enabled due to the enabled
    ARCH_HAS_RESET_CONTROLLER for ARCH_KEYSTONE.

    Signed-off-by: Suman Anna
    Signed-off-by: Bjorn Andersson

    Suman Anna
     
  • All the remoteproc platform driver Kconfig symbols are defined and
    included under an if REMOTEPROC condition, so the dependency on
    REMOTEPROC is implicit and they do not need an explicit 'depends
    on REMOTEPROC' line. So, clean these up.

    Signed-off-by: Suman Anna
    Signed-off-by: Bjorn Andersson

    Suman Anna
     
  • A dependency to VIRTUALIZATION has been added to REMOTEPROC in v3.10
    kernel in commit b9777859ec01 ("remoteproc: fix kconfig dependencies
    for VIRTIO") to resolve Kconfig warnings due to the inclusion of the
    virtio configuration file from the ARM's KVM config file. The KVM
    config was fixed properly in the subsequent release in commit
    8bd4ffd6b3a9 ("ARM: kvm: don't include drivers/virtio/Kconfig").
    So, drop this unneeded VIRTUALIZATION dependency from REMOTEPROC.

    Signed-off-by: Suman Anna
    Signed-off-by: Bjorn Andersson

    Suman Anna
     

27 Jun, 2017

2 commits

  • The DSPs are expected to be in reset when the driver probes a device.
    If the DSPs are out of reset in probe, the system may crash when the
    firmware is being loaded. So, add a check to make sure the DSP resets
    are asserted, and if not, throw a eye-catchy warning and assert the
    resets specifically.

    Signed-off-by: Andrew F. Davis
    [s-anna@ti.com: replace warning with a WARN]
    Signed-off-by: Suman Anna
    Acked-by: Santosh Shilimkar
    Signed-off-by: Bjorn Andersson

    Andrew F. Davis
     
  • The Texas Instrument's Keystone 2 family of SoCs has 1 or more
    TMS320C66x DSP Core Subsystems (C66x CorePacs). Each subsystem has
    a C66x Fixed/Floating-Point DSP Core, with 32KB of L1P and L1D SRAMs,
    that can be configured and partitioned as either RAM and/or Cache,
    and 1 MB of L2 SRAM. The CorePac also includes an Internal DMA (IDMA),
    External Memory Controller (EMC), Extended Memory Controller (XMC)
    with a Memory Protection and Address Extension (MPAX) unit, a Bandwidth
    Management (BWM) unit, an Interrupt Controller (INTC) and a Powerdown
    Controller (PDC).

    A new remoteproc module is added to perform the device management of
    these DSP devices. The driver expects the firmware names to be of the
    form "keystone-dsp-fw", where X is the corresponding DSP number, and
    uses the standard remoteproc core ELF loader. The support is limited
    to images only using the DSP internal memories at the moment. This
    remoteproc driver is also designed to work with virtio, and uses the
    IPC Generation registers for performing the virtio signalling and
    getting notified of exceptions.

    The driver currently supports the 66AK2H/66AK2K, 66AK2L and 66AK2E
    SoCs.

    Signed-off-by: Suman Anna
    Signed-off-by: Sam Nelson
    Signed-off-by: Andrew F. Davis
    Acked-by: Santosh Shilimkar
    Signed-off-by: Bjorn Andersson

    Suman Anna
     

26 Jun, 2017

3 commits

  • The davinci remoteproc driver is currently de-asserting the reset in
    its rproc .start() ops, but is not asserting the reset in its .stop()
    ops. This leaves the remote processor to not boot properly when using
    the sysfs 'state' variable between multiple start and stop operations.
    On the other hand, a reset is being asserted unconditionally in the
    driver remove function to alleviate some of these issues.

    Move this reset assertion logic into the .stop() ops implementation
    to fix the sysfs state-machine and the unbalanced reset. The logic
    from remove is still effective since .stop() ops will be invoked
    during the remove due to the enabled 'auto-boot' support. The probe
    already has support for asserting the reset in case the DSP is not
    in reset for some reason.

    Signed-off-by: Suman Anna
    Signed-off-by: Bjorn Andersson

    Suman Anna
     
  • The reset_assert() function is used to make sure the DSP remote
    processor is in a reset state regardless of its previous state.
    The driver relies on davinci_clk_reset_{assert,deassert}()
    functions for reset management which take in a clock parameter.
    The assert_reset() performs a clk_get()/clk_put() cycle to
    acquire the clock handle to use with this function. This is
    totally unnecessary and the code can be simplified to use
    the clock acquired during probe and directly use the reset
    functions, so simplify this logic.

    Signed-off-by: Suman Anna
    Signed-off-by: Bjorn Andersson

    Suman Anna
     
  • The davinci remoteproc driver requires a CMA pool for allocating
    memory for virtio vrings/buffers and other sections of the firmware
    image. The allocations are done using the DMA API. The CMA option is
    currently selected automatically on systems with MMU when davinci
    remoteproc is enabled, switch this to a saner depends on dependency
    convention. The dependency is also updated to use the DMA_CMA kconfig
    symbol that is used for CMA allocations using the DMA API, the CMA
    dependency is inherited implicitly.

    Cc: Arnd Bergmann
    Signed-off-by: Suman Anna
    Signed-off-by: Bjorn Andersson

    Suman Anna
     

31 May, 2017

1 commit


27 May, 2017

2 commits

  • Replace rproc_shutdown() by rproc_stop() and rproc_boot() by
    rproc_start() in the recovery path, in order to avoid remoteproc
    resources re-allocation overhead and to assist with extracting the
    coredumps after stopping the remote processor.

    Signed-off-by: Sarangdhar Joshi
    Signed-off-by: Bjorn Andersson

    Sarangdhar Joshi
     
  • In the context of recovering from crash, rproc_trigger_recovery() does
    rproc_shutdown() followed by rproc_boot(). The remoteproc resources are
    cleaned up in rproc_shutdown() and immediately reallocated in
    rproc_boot() which is an unnecessary overhead. Furthermore, we want the
    memory regions to be accessible after stopping the remote processor, to
    be able to extract the memory content for a coredump.

    This patch factors out the code in rproc_boot() and rproc_shutdown()
    path and introduces rproc_{start,stop}() in order to avoid resource
    allocation overhead.

    Signed-off-by: Sarangdhar Joshi
    Signed-off-by: Bjorn Andersson

    Sarangdhar Joshi
     

11 May, 2017

1 commit

  • Pull virtio updates from Michael Tsirkin:
    "Fixes, cleanups, performance

    A bunch of changes to virtio, most affecting virtio net. Also ptr_ring
    batched zeroing - first of batching enhancements that seems ready."

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    s390/virtio: change maintainership
    tools/virtio: fix spelling mistake: "wakeus" -> "wakeups"
    virtio_net: tidy a couple debug statements
    ptr_ring: support testing different batching sizes
    ringtest: support test specific parameters
    ptr_ring: batch ring zeroing
    virtio: virtio_driver doc
    virtio_net: don't reset twice on XDP on/off
    virtio_net: fix support for small rings
    virtio_net: reduce alignment for buffers
    virtio_net: rework mergeable buffer handling
    virtio_net: allow specifying context for rx
    virtio: allow extra context per descriptor
    tools/virtio: fix build breakage
    virtio: add context flag to find vqs
    virtio: wrap find_vqs
    ringtest: fix an assert statement

    Linus Torvalds
     

03 May, 2017

1 commit

  • Allows maintaining extra context per vq. For ease of use, passing in
    NULL is legal and disables the feature for all vqs.

    Includes fixes by Christian for s390, acked by Cornelia.

    Signed-off-by: Christian Borntraeger
    Acked-by: Cornelia Huck
    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     

29 Mar, 2017

1 commit

  • Remove the standalone SMD implementation as we have transitioned the
    client drivers to use the RPMSG based one.

    Also remove all dependencies on QCOM_SMD from Kconfig files, in order to
    keep them selectable in the absence of the removed symbol.

    Acked-by: Andy Gross
    Signed-off-by: Bjorn Andersson
    Signed-off-by: David S. Miller

    Bjorn Andersson
     

21 Mar, 2017

1 commit

  • qcom_smd_register_edge() is provided by either QCOM_SMD or RPMSG_QCOM_SMD,
    and if both of them are disabled, it does nothing.

    The check for the PIL drivers however only checks for QCOM_SMD, so it breaks
    with QCOM_SMD=n && RPMSG_QCOM_SMD=m:

    drivers/remoteproc/built-in.o: In function `smd_subdev_remove':
    qcom_wcnss_iris.c:(.text+0x231c): undefined reference to `qcom_smd_unregister_edge'
    drivers/remoteproc/built-in.o: In function `smd_subdev_probe':
    qcom_wcnss_iris.c:(.text+0x2344): undefined reference to `qcom_smd_register_edge'
    drivers/remoteproc/built-in.o: In function `smd_subdev_probe':
    qcom_q6v5_pil.c:(.text+0x3538): undefined reference to `qcom_smd_register_edge'
    qcom_q6v5_pil.c:(.text+0x3538): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `qcom_smd_register_edge'

    This clarifies the Kconfig dependency.

    Fixes: 4b48921a8f74 ("remoteproc: qcom: Use common SMD edge handler")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Bjorn Andersson

    Arnd Bergmann
     

03 Mar, 2017

1 commit

  • Pull vhost updates from Michael Tsirkin:
    "virtio, vhost: optimizations, fixes

    Looks like a quiet cycle for vhost/virtio, just a couple of minor
    tweaks. Most notable is automatic interrupt affinity for blk and scsi.
    Hopefully other devices are not far behind"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    virtio-console: avoid DMA from stack
    vhost: introduce O(1) vq metadata cache
    virtio_scsi: use virtio IRQ affinity
    virtio_blk: use virtio IRQ affinity
    blk-mq: provide a default queue mapping for virtio device
    virtio: provide a method to get the IRQ affinity mask for a virtqueue
    virtio: allow drivers to request IRQ affinity when creating VQs
    virtio_pci: simplify MSI-X setup
    virtio_pci: don't duplicate the msix_enable flag in struct pci_dev
    virtio_pci: use shared interrupts for virtqueues
    virtio_pci: remove struct virtio_pci_vq_info
    vhost: try avoiding avail index access when getting descriptor
    virtio_mmio: expose header to userspace

    Linus Torvalds
     

28 Feb, 2017

1 commit

  • Add a struct irq_affinity pointer to the find_vqs methods, which if set
    is used to tell the PCI layer to create the MSI-X vectors for our I/O
    virtqueues with the proper affinity from the start. Compared to after
    the fact affinity hints this gives us an instantly working setup and
    allows to allocate the irq descritors node-local and avoid interconnect
    traffic. Last but not least this will allow blk-mq queues are created
    based on the interrupt affinity for storage drivers.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Jason Wang
    Signed-off-by: Michael S. Tsirkin

    Christoph Hellwig