04 Jan, 2021

1 commit

  • This is the 5.10.4 stable release

    * tag 'v5.10.4': (717 commits)
    Linux 5.10.4
    x86/CPU/AMD: Save AMD NodeId as cpu_die_id
    drm/edid: fix objtool warning in drm_cvt_modes()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    drivers/gpu/drm/imx/dcss/dcss-plane.c
    drivers/media/i2c/ov5640.c

    Jason Liu
     

30 Dec, 2020

9 commits

  • commit 138a6428ba9023ae29e103e87a223575fbc3d2b7 upstream.

    The reliance on the remoteproc's state for determining when to send
    sysmon notifications to a remote processor is racy with regard to
    concurrent remoteproc operations.

    Further more the advertisement of the state of other remote processor to
    a newly started remote processor might not only send the wrong state,
    but might result in a stream of state changes that are out of order.

    Address this by introducing state tracking within the sysmon instances
    themselves and extend the locking to ensure that the notifications are
    consistent with this state.

    Fixes: 1f36ab3f6e3b ("remoteproc: sysmon: Inform current rproc about all active rprocs")
    Fixes: 1877f54f75ad ("remoteproc: sysmon: Add notifications for events")
    Fixes: 1fb82ee806d1 ("remoteproc: qcom: Introduce sysmon")
    Cc: stable@vger.kernel.org
    Reviewed-by: Rishabh Bhatnagar
    Link: https://lore.kernel.org/r/20201122054135.802935-2-bjorn.andersson@linaro.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Greg Kroah-Hartman

    Bjorn Andersson
     
  • [ Upstream commit 22c3df6f5574c8d401ea431c7ce24e7c5c5e7ef3 ]

    Fixes the error handling to unprepare clk if scp_before_load fails.

    Reviewed-by: Mathieu Poirier
    Fixes: fd0b6c1ff85a ("remoteproc/mediatek: Add support for mt8192 SCP")
    Signed-off-by: Tzung-Bi Shih
    Link: https://lore.kernel.org/r/20201203155914.3844426-1-tzungbi@google.com
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin

    Tzung-Bi Shih
     
  • [ Upstream commit c3d4e5b12672bbdf63f4cc933e3169bc6bbec8da ]

    platform_get_resource() may fail and in this case a NULL dereference
    will occur.

    Fix it to use devm_platform_ioremap_resource() instead of calling
    platform_get_resource() and devm_ioremap().

    This is detected by Coccinelle semantic patch.

    @@
    expression pdev, res, n, t, e, e1, e2;
    @@

    res = \(platform_get_resource\|platform_get_resource_byname\)(pdev, t,
    n);
    + if (!res)
    + return -EINVAL;
    ... when != res == NULL
    e = devm_ioremap(e1, res->start, e2);

    Fixes: dc160e449122 ("remoteproc: qcom: Introduce Non-PAS ADSP PIL driver")
    Signed-off-by: Zhang Changzhong
    Link: https://lore.kernel.org/r/1607392460-20516-1-git-send-email-zhangchangzhong@huawei.com
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin

    Zhang Changzhong
     
  • [ Upstream commit 6dfdf6e4e7096fead7755d47d91d72e896bb4804 ]

    In case of error, the function devm_ioremap_wc() returns NULL pointer
    not ERR_PTR(). The IS_ERR() test in the return value check should be
    replaced with NULL test.

    Reviewed-by: Mathieu Poirier
    Fixes: 6edbe024ba17 ("remoteproc: k3-dsp: Add a remoteproc driver of K3 C66x DSPs")
    Signed-off-by: YueHaibing
    Acked-by: Suman Anna
    Link: https://lore.kernel.org/r/20200905122503.17352-1-yuehaibing@huawei.com
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin

    YueHaibing
     
  • [ Upstream commit c0a6e5ee1ecfe4c3a5799cfd30820748eff5dfab ]

    If the pm_runtime_get_sync failed in adsp_pds_enable when
    loop (i), The unroll_pd_votes will start from (i - 1), and
    it will resulted in following problems:

    1) pm_runtime_get_sync will increment pm usage counter even it
    failed. Forgetting to pm_runtime_put_noidle will result in
    reference leak.

    2) Have not reset pds[i] performance state.

    Then we fix it.

    Fixes: 17ee2fb4e8567 ("remoteproc: qcom: pas: Vote for active/proxy power domains")
    Signed-off-by: Zhang Qilong
    Link: https://lore.kernel.org/r/20201102143554.144707-1-zhangqilong3@huawei.com
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin

    Zhang Qilong
     
  • [ Upstream commit aa37448f597c09844942da87d042fc6793f989c2 ]

    pm_runtime_get_sync will increment pm usage counter even it
    failed. Forgetting to pm_runtime_put_noidle will result in
    reference leak in adsp_start, so we should fix it.

    Fixes: dc160e4491222 ("remoteproc: qcom: Introduce Non-PAS ADSP PIL driver")
    Signed-off-by: Zhang Qilong
    Link: https://lore.kernel.org/r/20201102143534.144484-1-zhangqilong3@huawei.com
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin

    Zhang Qilong
     
  • [ Upstream commit a24723050037303e4008b37f1f8dcc99c58901aa ]

    If the pm_runtime_get_sync failed in q6v5_pds_enable when
    loop (i), The unroll_pd_votes will start from (i - 1), and
    it will resulted in following problems:

    1) pm_runtime_get_sync will increment pm usage counter even it
    failed. Forgetting to pm_runtime_put_noidle will result in
    reference leak.

    2) Have not reset pds[i] performance state.

    Then we fix it.

    Fixes: 4760a896be88e ("remoteproc: q6v5-mss: Vote for rpmh power domains")
    Signed-off-by: Zhang Qilong
    Link: https://lore.kernel.org/r/20201102143433.143996-1-zhangqilong3@huawei.com
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin

    Zhang Qilong
     
  • [ Upstream commit e59aef4edc45133ccb10b8e962cb74dcf1e3240b ]

    Now that this driver can be compiled with COMPILE_TEST, we have no
    guarantee that CONFIG_OF will also be defined. When that happens, a
    warning about mtk_scp_of_match being defined but unused will be reported
    so make sure this variable is only defined if of_match_ptr() actually
    uses it.

    Fixes: cbd2dca74926c0e4610c40923cc786b732c9e8ef remoteproc: scp: add COMPILE_TEST dependency
    Reported-by: kernel test robot
    Signed-off-by: Alexandre Courbot
    Link: https://lore.kernel.org/r/20201102074007.299222-1-acourbot@chromium.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin

    Alexandre Courbot
     
  • [ Upstream commit 0a441514bc2b8a48ebe23c2dcb9feee6351d45b6 ]

    The correct MT8192 CFG register base is 0x20000 off. Changes the
    registers accordingly.

    Fixes: fd0b6c1ff85a ("remoteproc/mediatek: Add support for mt8192 SCP")
    Signed-off-by: Tzung-Bi Shih
    Link: https://lore.kernel.org/r/20201210054109.587795-1-tzungbi@google.com
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin

    Tzung-Bi Shih
     

14 Dec, 2020

22 commits


23 Oct, 2020

1 commit

  • Pull remoteproc updates from Bjorn Andersson:
    "This introduces support for the Mediatek MT9182 SCP and controlling
    the Cortex R5F processors found in TI K3 platforms. It clones the
    longstanding debugfs interface for controlling crash handling to
    sysfs. Lastly it solves a bug where after a warm reset of Qualcomm
    platforms the modem would crash upon first boot"

    * tag 'rproc-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc:
    remoteproc/mediatek: Remove non-standard dsb()
    remoteproc: Add recovery configuration to the sysfs interface
    remoteproc: Add coredump as part of sysfs interface
    remoteproc: Change default dump configuration to "disabled"
    remoteproc: k3-r5: Add loading support for on-chip SRAM regions
    remoteproc: k3-r5: Initialize TCM memories for ECC
    remoteproc: k3-r5: Add a remoteproc driver for R5F subsystem
    dt-bindings: remoteproc: Add bindings for R5F subsystem on TI K3 SoCs
    remoteproc/mediatek: Add support for mt8192 SCP
    remoteproc: Fixup coredump debugfs disable request
    remoteproc: qcom_q6v5: Assign mpss region to Q6 before MBA boot
    remoteproc/mediatek: fix null pointer dereference on null scp pointer
    remoteproc: stm32: Fix pointer assignement
    remoteproc: scp: add COMPILE_TEST dependency

    Linus Torvalds
     

16 Oct, 2020

2 commits

  • As reported by Stephen, dsb() is not declared on e.g. x86_64, preventing
    the mtp_scp from building. Simply remove the barrier (and the readback),
    suggested by Pi-Hsun to resolve this.

    Fixes: fd0b6c1ff85a ("remoteproc/mediatek: Add support for mt8192 SCP")
    Reported-by: Stephen Rothwell
    Suggested-by: Pi-Hsun Shih
    Signed-off-by: Bjorn Andersson

    Bjorn Andersson
     
  • Pull dma-mapping updates from Christoph Hellwig:

    - rework the non-coherent DMA allocator

    - move private definitions out of

    - lower CMA_ALIGNMENT (Paul Cercueil)

    - remove the omap1 dma address translation in favor of the common code

    - make dma-direct aware of multiple dma offset ranges (Jim Quinlan)

    - support per-node DMA CMA areas (Barry Song)

    - increase the default seg boundary limit (Nicolin Chen)

    - misc fixes (Robin Murphy, Thomas Tai, Xu Wang)

    - various cleanups

    * tag 'dma-mapping-5.10' of git://git.infradead.org/users/hch/dma-mapping: (63 commits)
    ARM/ixp4xx: add a missing include of dma-map-ops.h
    dma-direct: simplify the DMA_ATTR_NO_KERNEL_MAPPING handling
    dma-direct: factor out a dma_direct_alloc_from_pool helper
    dma-direct check for highmem pages in dma_direct_alloc_pages
    dma-mapping: merge into
    dma-mapping: move large parts of to kernel/dma
    dma-mapping: move dma-debug.h to kernel/dma/
    dma-mapping: remove
    dma-mapping: merge into
    dma-contiguous: remove dma_contiguous_set_default
    dma-contiguous: remove dev_set_cma_area
    dma-contiguous: remove dma_declare_contiguous
    dma-mapping: split
    cma: decrease CMA_ALIGNMENT lower limit to 2
    firewire-ohci: use dma_alloc_pages
    dma-iommu: implement ->alloc_noncoherent
    dma-mapping: add new {alloc,free}_noncoherent dma_map_ops methods
    dma-mapping: add a new dma_alloc_pages API
    dma-mapping: remove dma_cache_sync
    53c700: convert to dma_alloc_noncoherent
    ...

    Linus Torvalds
     

14 Oct, 2020

5 commits

  • Add recovery configuration to the sysfs interface. This will
    allow usage of this configuration feature in production
    devices where access to debugfs might be limited.

    Signed-off-by: Rishabh Bhatnagar
    Link: https://lore.kernel.org/r/1601662144-5964-4-git-send-email-rishabhb@codeaurora.org
    Signed-off-by: Bjorn Andersson

    Rishabh Bhatnagar
     
  • Add coredump as part of the sysfs interface. This will
    allow usage of this configuration feature in production
    devices where access to debugfs might be limited.

    Signed-off-by: Rishabh Bhatnagar
    Link: https://lore.kernel.org/r/1601662144-5964-3-git-send-email-rishabhb@codeaurora.org
    Signed-off-by: Bjorn Andersson

    Rishabh Bhatnagar
     
  • Currently "default" configuration option means coredumps are
    enabled. To avoid confusion rename the "default" configuration
    option to "enabled" and disable collection of dumps by default
    as doing so makes sense for production devices.

    Signed-off-by: Rishabh Bhatnagar
    Link: https://lore.kernel.org/r/1601662144-5964-2-git-send-email-rishabhb@codeaurora.org
    Signed-off-by: Bjorn Andersson

    Rishabh Bhatnagar
     
  • The K3 SoCs has various internal on-chip SRAM memories like the SRAM
    within the MCU domain or the shared MSMC RAM within NavSS that can be
    used for multiple purposes. One such purpose is to have the R5F cores
    use a portion of such on-chip SRAM for fast-access data or to directly
    execute code.

    Add support to the K3 R5 remoteproc driver to parse and support
    loading into such memories. The SRAM regions need to be mapped as
    normal non-cacheable memory to avoid kernel crashes when the remoteproc
    loader code uses the Arm64 memset library function (the "DC ZVA"
    instruction throws a alignment fault on device type memory).

    These SRAM regions are completely optional as not all firmware images
    require these memories, and any such memory has to be reserved as such
    in the DTS files.

    Signed-off-by: Suman Anna
    Reviewed-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20201002234234.20704-5-s-anna@ti.com
    Signed-off-by: Bjorn Andersson

    Suman Anna
     
  • The R5F processors on K3 SoCs all have two TCMs (ATCM and BTCM) that
    support 32-bit ECC. The TCMs are typically loaded with some boot-up
    code to initialize the R5 MPUs to further execute code out of DDR.
    The ECC for the TCMs is enabled by default on K3 SoCs due to internal
    default tie-off values, but the TCM memories are not initialized on
    device power up. Any read access without the corresponding TCM memory
    location initialized will generate an ECC error, and any such access
    from a A72 or A53 core will trigger a SError.

    So, zero initialize both the TCM memories before loading any firmware
    onto a R5F in remoteproc mode. Any R5F booted from U-Boot/SPL would
    require a similar initialization in the bootloader. Note that both
    the TCMs are initialized unconditionally as the TCM enable config bits
    only manage the access and visibility from R5.

    Signed-off-by: Suman Anna
    Reviewed-by: Mathieu Poirier
    Link: https://lore.kernel.org/r/20201002234234.20704-4-s-anna@ti.com
    Signed-off-by: Bjorn Andersson

    Suman Anna