1. 18 3月, 2021 6 次提交
  2. 12 3月, 2021 2 次提交
  3. 11 12月, 2020 2 次提交
  4. 26 11月, 2020 1 次提交
    • S
      remoteproc: Add a rproc_set_firmware() API · 4c1ad562
      Suman Anna 提交于
      A new API, rproc_set_firmware() is added to allow the remoteproc platform
      drivers and remoteproc client drivers to be able to configure a custom
      firmware name that is different from the default name used during
      remoteproc registration. This function is being introduced to provide
      a kernel-level equivalent of the current sysfs interface to remoteproc
      client drivers, and can only change firmwares when the remoteproc is
      offline. This allows some remoteproc drivers to choose different firmwares
      at runtime based on the functionality the remote processor is providing.
      The TI PRU Ethernet driver will be an example of such usage as it
      requires to use different firmwares for different supported protocols.
      
      Also, update the firmware_store() function used by the sysfs interface
      to reuse this function to avoid code duplication.
      Reviewed-by: NRishabh Bhatnagar <rishabhb@codeaurora.org>
      Signed-off-by: NSuman Anna <s-anna@ti.com>
      Link: https://lore.kernel.org/r/20201121032042.6195-1-s-anna@ti.comSigned-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      4c1ad562
  5. 14 10月, 2020 1 次提交
  6. 05 8月, 2020 1 次提交
  7. 22 7月, 2020 2 次提交
  8. 18 7月, 2020 1 次提交
  9. 17 7月, 2020 3 次提交
  10. 13 5月, 2020 1 次提交
    • G
      remoteproc: Replace zero-length array with flexible-array · 529798ba
      Gustavo A. R. Silva 提交于
      The current codebase makes use of the zero-length array language
      extension to the C90 standard, but the preferred mechanism to declare
      variable-length types such as these ones is a flexible array member[1][2],
      introduced in C99:
      
      struct foo {
              int stuff;
              struct boo array[];
      };
      
      By making use of the mechanism above, we will get a compiler warning
      in case the flexible array does not occur last in the structure, which
      will help us prevent some kind of undefined behavior bugs from being
      inadvertently introduced[3] to the codebase from now on.
      
      Also, notice that, dynamic memory allocations won't be affected by
      this change:
      
      "Flexible array members have incomplete type, and so the sizeof operator
      may not be applied. As a quirk of the original implementation of
      zero-length arrays, sizeof evaluates to zero."[1]
      
      sizeof(flexible-array-member) triggers a warning because flexible array
      members have incomplete type[1]. There are some instances of code in
      which the sizeof operator is being incorrectly/erroneously applied to
      zero-length arrays and the result is zero. Such instances may be hiding
      some bugs. So, this work (flexible-array member conversions) will also
      help to get completely rid of those sorts of issues.
      
      This issue was found with the help of Coccinelle.
      
      [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
      [2] https://github.com/KSPP/linux/issues/21
      [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour")
      Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
      Link: https://lore.kernel.org/r/20200507191943.GA16033@embeddedorSigned-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      529798ba
  11. 23 4月, 2020 1 次提交
  12. 21 4月, 2020 2 次提交
  13. 20 4月, 2020 1 次提交
  14. 26 3月, 2020 5 次提交
  15. 30 6月, 2019 1 次提交
  16. 21 2月, 2019 2 次提交
    • L
      remoteproc: fix recovery procedure · d4c036fe
      Loic Pallardy 提交于
      Commit 7e83cab824a87e83cab824a8 ("remoteproc: Modify recovery path
      to use rproc_{start,stop}()") replaces rproc_{shutdown,boot}() with
      rproc_{stop,start}(), which skips destroy the virtio device at stop
      but re-initializes it again at start.
      
      Issue is that struct virtio_dev is not correctly reinitialized like done
      at initial allocation thanks to kzalloc() and kobject is considered as
      already initialized by kernel. That is due to the fact struct virtio_dev
      is allocated and released at vdev resource handling level managed and
      virtio device is registered and unregistered at rproc subdevices level.
      
      Moreover kernel documentation mentions that device struct must be
      zero initialized before calling device_initialize().
      
      This patch disentangles struct virtio_dev from struct rproc_vdev as
      the two struct don't have the same life-cycle.
      
      struct virtio_dev is now allocated on rproc_start() and released
      on rproc_stop().
      
      This patch applies on top of patch
      remoteproc: create vdev subdevice with specific dma memory pool [1]
      
      [1]: https://patchwork.kernel.org/patch/10755781/
      
      Fixes: 7e83cab8 ("remoteproc: Modify recovery path to use rproc_{start,stop}()")
      Reported-by: NXiang Xiao <xiaoxiang781216@gmail.com>
      Signed-off-by: NLoic Pallardy <loic.pallardy@st.com>
      Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      d4c036fe
    • L
      remoteproc: create vdev subdevice with specific dma memory pool · 086d0872
      Loic Pallardy 提交于
      This patch creates a dedicated vdev subdevice for each vdev declared
      in firmware resource table and associates carveout named "vdev%dbuffer"
      (with %d vdev index in resource table) if any as dma coherent memory pool.
      
      Then vdev subdevice is used as parent for virtio device.
      Signed-off-by: NLoic Pallardy <loic.pallardy@st.com>
      Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      086d0872
  17. 07 1月, 2019 1 次提交
  18. 20 10月, 2018 2 次提交
  19. 15 10月, 2018 1 次提交
    • L
      remoteproc: modify vring allocation to rely on centralized carveout allocator · c6aed238
      Loic Pallardy 提交于
      Current version of rproc_alloc_vring function supports only dynamic vring
      allocation.
      
      This patch allows to allocate vrings based on memory region declatation.
      Vrings are now manage like memory carveouts, to communize memory management
      code in rproc_alloc_registered_carveouts().
      
      Allocated buffer is retrieved in rp_find_vq() thanks to
      rproc_find_carveout_by_name() functions for.
      
      This patch sets vrings names to vdev"x"vring"y" with x vdev index in
      resource table and y vring index in vdev. This will be updated when
      name will be associated to vdev in firmware resource table.
      Signed-off-by: NLoic Pallardy <loic.pallardy@st.com>
      Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      c6aed238
  20. 10 10月, 2018 4 次提交