16 Nov, 2020

1 commit


11 Nov, 2020

1 commit


08 Oct, 2020

1 commit

  • * tag 'v5.4.70': (3051 commits)
    Linux 5.4.70
    netfilter: ctnetlink: add a range check for l3/l4 protonum
    ep_create_wakeup_source(): dentry name can change under you...
    ...

    Conflicts:
    arch/arm/mach-imx/pm-imx6.c
    arch/arm64/boot/dts/freescale/imx8mm-evk.dts
    arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dts
    drivers/crypto/caam/caamalg.c
    drivers/gpu/drm/imx/dw_hdmi-imx.c
    drivers/gpu/drm/imx/imx-ldb.c
    drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
    drivers/mmc/host/sdhci-esdhc-imx.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/net/ethernet/freescale/enetc/enetc.c
    drivers/net/ethernet/freescale/enetc/enetc_pf.c
    drivers/thermal/imx_thermal.c
    drivers/usb/cdns3/ep0.c
    drivers/xen/swiotlb-xen.c
    sound/soc/fsl/fsl_esai.c
    sound/soc/fsl/fsl_sai.c

    Signed-off-by: Jason Liu

    Jason Liu
     

21 Aug, 2020

3 commits

  • commit 135b9e8d1cd8ba5ac9ad9bcf24b464b7b052e5b8 upstream.

    The following mem abort is observed when one of the modem blob firmware
    size exceeds the allocated mpss region. Fix this by restricting the copy
    size to segment size using request_firmware_into_buf before load.

    Err Logs:
    Unable to handle kernel paging request at virtual address
    Mem abort info:
    ...
    Call trace:
    __memcpy+0x110/0x180
    rproc_start+0xd0/0x190
    rproc_boot+0x404/0x550
    state_store+0x54/0xf8
    dev_attr_store+0x44/0x60
    sysfs_kf_write+0x58/0x80
    kernfs_fop_write+0x140/0x230
    vfs_write+0xc4/0x208
    ksys_write+0x74/0xf8
    ...

    Reviewed-by: Bjorn Andersson
    Fixes: 051fb70fd4ea4 ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5")
    Cc: stable@vger.kernel.org
    Signed-off-by: Sibi Sankar
    Link: https://lore.kernel.org/r/20200722201047.12975-3-sibis@codeaurora.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Greg Kroah-Hartman

    Sibi Sankar
     
  • commit e013f455d95add874f310dc47c608e8c70692ae5 upstream.

    The following mem abort is observed when the mba firmware size exceeds
    the allocated mba region. MBA firmware size is restricted to a maximum
    size of 1M and remaining memory region is used by modem debug policy
    firmware when available. Hence verify whether the MBA firmware size lies
    within the allocated memory region and is not greater than 1M before
    loading.

    Err Logs:
    Unable to handle kernel paging request at virtual address
    Mem abort info:
    ...
    Call trace:
    __memcpy+0x110/0x180
    rproc_start+0x40/0x218
    rproc_boot+0x5b4/0x608
    state_store+0x54/0xf8
    dev_attr_store+0x44/0x60
    sysfs_kf_write+0x58/0x80
    kernfs_fop_write+0x140/0x230
    vfs_write+0xc4/0x208
    ksys_write+0x74/0xf8
    __arm64_sys_write+0x24/0x30
    ...

    Reviewed-by: Bjorn Andersson
    Fixes: 051fb70fd4ea4 ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5")
    Cc: stable@vger.kernel.org
    Signed-off-by: Sibi Sankar
    Link: https://lore.kernel.org/r/20200722201047.12975-2-sibis@codeaurora.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Greg Kroah-Hartman

    Sibi Sankar
     
  • commit 5b7be880074c73540948f8fc597e0407b98fabfa upstream.

    Sometimes the stop triggers a watchdog rather than a stop-ack. Update
    the running state to false on requesting stop to skip the watchdog
    instead.

    Error Logs:
    $ echo stop > /sys/class/remoteproc/remoteproc0/state
    ipa 1e40000.ipa: received modem stopping event
    remoteproc-modem: watchdog received: sys_m_smsm_mpss.c:291:APPS force stop
    qcom-q6v5-mss 4080000.remoteproc-modem: port failed halt
    ipa 1e40000.ipa: received modem offline event
    remoteproc0: stopped remote processor 4080000.remoteproc-modem

    Reviewed-by: Evan Green
    Fixes: 3b415c8fb263 ("remoteproc: q6v5: Extract common resource handling")
    Cc: stable@vger.kernel.org
    Signed-off-by: Sibi Sankar
    Link: https://lore.kernel.org/r/20200602163257.26978-1-sibis@codeaurora.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Greg Kroah-Hartman

    Sibi Sankar
     

24 Jun, 2020

2 commits

  • [ Upstream commit be050a3429f46ecf13eb2b80f299479f8bb823fb ]

    The application processor accessing the mpss region when the Q6 modem is
    running will lead to an XPU violation. Fix this by un-mapping the mpss
    segments post copy during mpss authentication and coredumps.

    Tested-by: Evan Green
    Signed-off-by: Sibi Sankar
    Link: https://lore.kernel.org/r/20200415071619.6052-1-sibis@codeaurora.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin

    Sibi Sankar
     
  • [ Upstream commit 6442df49400b466431979e7634849a464a5f1861 ]

    If ida_simple_get() returns an error when called in rproc_alloc(),
    put_device() is called to clean things up. By this time the rproc
    device type has been assigned, with rproc_type_release() as the
    release function.

    The first thing rproc_type_release() does is call:
    idr_destroy(&rproc->notifyids);

    But at the time the ida_simple_get() call is made, the notifyids
    field in the remoteproc structure has not been initialized.

    I'm not actually sure this case causes an observable problem, but
    it's incorrect. Fix this by initializing the notifyids field before
    calling ida_simple_get() in rproc_alloc().

    Fixes: b5ab5e24e960 ("remoteproc: maintain a generic child device for each rproc")
    Signed-off-by: Alex Elder
    Reviewed-by: Mathieu Poirier
    Reviewed-by: Suman Anna
    Reviewed-by: Bjorn Andersson
    Link: https://lore.kernel.org/r/20200415204858.2448-2-mathieu.poirier@linaro.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin

    Alex Elder
     

19 Jun, 2020

1 commit

  • * tag 'v5.4.47': (2193 commits)
    Linux 5.4.47
    KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
    KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception
    ...

    Conflicts:
    arch/arm/boot/dts/imx6qdl.dtsi
    arch/arm/mach-imx/Kconfig
    arch/arm/mach-imx/common.h
    arch/arm/mach-imx/suspend-imx6.S
    arch/arm64/boot/dts/freescale/imx8qxp-mek.dts
    arch/powerpc/include/asm/cacheflush.h
    drivers/cpufreq/imx6q-cpufreq.c
    drivers/dma/imx-sdma.c
    drivers/edac/synopsys_edac.c
    drivers/firmware/imx/imx-scu.c
    drivers/net/ethernet/freescale/fec.h
    drivers/net/ethernet/freescale/fec_main.c
    drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
    drivers/net/phy/phy_device.c
    drivers/perf/fsl_imx8_ddr_perf.c
    drivers/usb/cdns3/gadget.c
    drivers/usb/dwc3/gadget.c
    include/uapi/linux/dma-buf.h

    Signed-off-by: Jason Liu

    Jason Liu
     

17 Jun, 2020

2 commits

  • commit c774ad010873bb89dcc0cdcb1e96aef6664d8caf upstream.

    The commit 086d08725d34 ("remoteproc: create vdev subdevice with specific
    dma memory pool") has introduced a new vdev subdevice for each vdev
    declared in the firmware resource table and made it as the parent for the
    created virtio rpmsg devices instead of the previous remoteproc device.
    This changed the overall parenting hierarchy for the rpmsg devices, which
    were children of virtio devices, and does not allow the corresponding
    rpmsg drivers to retrieve the parent rproc device through the
    rproc_get_by_child() API.

    Fix this by restoring the remoteproc device as the parent. The new vdev
    subdevice can continue to inherit the DMA attributes from the remoteproc's
    parent device (actual platform device).

    Cc: stable@vger.kernel.org
    Fixes: 086d08725d34 ("remoteproc: create vdev subdevice with specific dma memory pool")
    Signed-off-by: Suman Anna
    Reviewed-by: Mathieu Poirier
    Acked-by: Arnaud Pouliquen
    Link: https://lore.kernel.org/r/20200420160600.10467-3-s-anna@ti.com
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Greg Kroah-Hartman

    Suman Anna
     
  • commit db9178a4f8c4e523f824892cb8bab00961b07385 upstream.

    In some cases, like with OMAP remoteproc, we are not creating dedicated
    memory pool for the virtio device. Instead, we use the same memory pool
    for all shared memories. The current virtio memory pool handling forces
    a split between these two, as a separate device is created for it,
    causing memory to be allocated from bad location if the dedicated pool
    is not available. Fix this by falling back to using the parent device
    memory pool if dedicated is not available.

    Cc: stable@vger.kernel.org
    Reviewed-by: Mathieu Poirier
    Acked-by: Arnaud Pouliquen
    Fixes: 086d08725d34 ("remoteproc: create vdev subdevice with specific dma memory pool")
    Signed-off-by: Tero Kristo
    Signed-off-by: Suman Anna
    Link: https://lore.kernel.org/r/20200420160600.10467-2-s-anna@ti.com
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Greg Kroah-Hartman

    Tero Kristo
     

16 Jun, 2020

1 commit


14 Jun, 2020

1 commit


10 May, 2020

1 commit

  • [ Upstream commit 13c060b50a341dd60303e5264d12108b5747f200 ]

    If looking up the DT "firmware-name" property fails in q6v6_probe(),
    the function returns without freeing the remoteproc structure
    that has been allocated. Fix this by jumping to the free_rproc
    label, which takes care of this.

    Signed-off-by: Alex Elder
    Link: https://lore.kernel.org/r/20200403175005.17130-3-elder@linaro.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sasha Levin

    Alex Elder
     

02 May, 2020

1 commit

  • commit 00a0eec59ddbb1ce966b19097d8a8d2f777e726a upstream.

    Index of rvring is computed using pointer arithmetic. However, since
    rvring->rvdev->vring is the base of the vring array, computation
    of rvring idx should be reversed. It previously lead to writing at negative
    indices in the resource table.

    Signed-off-by: Clement Leger
    Link: https://lore.kernel.org/r/20191004073736.8327-1-cleger@kalray.eu
    Signed-off-by: Bjorn Andersson
    Cc: Doug Anderson
    Signed-off-by: Greg Kroah-Hartman

    Clement Leger
     

30 Apr, 2020

1 commit


29 Apr, 2020

1 commit


17 Apr, 2020

3 commits

  • commit 791c13b709dd51eb37330f2a5837434e90c87c27 upstream.

    Undefined rproc_ops .kick method in remoteproc driver will result in
    "Unable to handle kernel NULL pointer dereference" in rproc_virtio_notify,
    after firmware loading if:

    1) .kick method wasn't defined in driver
    2) resource_table exists in firmware and has "Virtio device entry" defined

    Let's refuse to register an rproc-induced virtio device if no kick method was
    defined for rproc.

    [ 13.180049][ T415] 8] lr : [] psr: 60010113
    [ 13.272702][ T415] sp : b8d47c48 ip : 00000001 fp : bc04de00
    [ 13.278625][ T415] r10: bc04c000 r9 : 00000cc0 r8 : b8d46000
    [ 13.284548][ T415] r7 : 00000000 r6 : b898f200 r5 : 00000000 r4 : b8a29800
    [ 13.291773][ T415] r3 : 00000000 r2 : 990a3ad4 r1 : 00000000 r0 : b8a29800
    [ 13.299000][ T415] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
    [ 13.306833][ T415] Control: 10c5387d Table: b8b4806a DAC: 00000051
    [ 13.313278][ T415] Process unload-load.sh (pid: 415, stack limit = 0x(ptrval))
    [ 13.320591][ T415] Stack: (0xb8d47c48 to 0xb8d48000)
    [ 13.325651][ T415] 7c40: b895b680 00000001 b898f200 803c6430 b895bc80 7f00ae18
    [ 13.334531][ T415] 7c60: 00000035 00000000 00000000 b9393200 80b3ed80 00004000 b9393268 bbf5a9a2
    [ 13.343410][ T415] 7c80: 00000e00 00000200 00000000 7f00aff0 7f00a014 b895b680 b895b800 990a3ad4
    [ 13.352290][ T415] 7ca0: 00000001 b898f210 b898f200 00000000 00000000 7f00e000 00000001 00000000
    [ 13.361170][ T415] 7cc0: 00000000 803c62e0 80b2169c 802a0924 b898f210 00000000 00000000 b898f210
    [ 13.370049][ T415] 7ce0: 80b9ba44 00000000 80b9ba48 00000000 7f00e000 00000008 80b2169c 80400114
    [ 13.378929][ T415] 7d00: 80b2169c 8061fd64 b898f210 7f00e000 80400744 b8d46000 80b21634 80b21634
    [ 13.387809][ T415] 7d20: 80b2169c 80400614 80b21634 80400718 7f00e000 00000000 b8d47d7c 80400744
    [ 13.396689][ T415] 7d40: b8d46000 80b21634 80b21634 803fe338 b898f254 b80fe76c b8d32e38 990a3ad4
    [ 13.405569][ T415] 7d60: fffffff3 b898f210 b8d46000 00000001 b898f254 803ffe7c 80857a90 b898f210
    [ 13.414449][ T415] 7d80: 00000001 990a3ad4 b8d46000 b898f210 b898f210 80b17aec b8a29c20 803ff0a4
    [ 13.423328][ T415] 7da0: b898f210 00000000 b8d46000 803fb8e0 b898f200 00000000 80b17aec b898f210
    [ 13.432209][ T415] 7dc0: b8a29c20 990a3ad4 b895b900 b898f200 8050fb7c 80b17aec b898f210 b8a29c20
    [ 13.441088][ T415] 7de0: b8a29800 b895b900 b8a29a04 803c5ec0 b8a29c00 b898f200 b8a29a20 00000007
    [ 13.449968][ T415] 7e00: b8a29c20 8050fd78 b8a29800 00000000 b8a29a20 b8a29c04 b8a29820 b8a299d0
    [ 13.458848][ T415] 7e20: b895b900 8050e5a4 b8a29800 b8a299d8 b8d46000 b8a299e0 b8a29820 b8a299d0
    [ 13.467728][ T415] 7e40: b895b900 8050e008 000041ed 00000000 b8b8c440 b8a299d8 b8a299e0 b8a299d8
    [ 13.476608][ T415] 7e60: b8b8c440 990a3ad4 00000000 b8a29820 b8b8c400 00000006 b8a29800 b895b880
    [ 13.485487][ T415] 7e80: b8d47f78 00000000 00000000 8050f4b4 00000006 b895b890 b8b8c400 008fbea0
    [ 13.494367][ T415] 7ea0: b895b880 8029f530 00000000 00000000 b8d46000 00000006 b8d46000 008fbea0
    [ 13.503246][ T415] 7ec0: 8029f434 00000000 b8d46000 00000000 00000000 8021e2e4 0000000a 8061fd0c
    [ 13.512125][ T415] 7ee0: 0000000a b8af0c00 0000000a b8af0c40 00000001 b8af0c40 00000000 8061f910
    [ 13.521005][ T415] 7f00: 0000000a 80240af4 00000002 b8d46000 00000000 8061fd0c 00000002 80232d7c
    [ 13.529884][ T415] 7f20: 00000000 b8d46000 00000000 990a3ad4 00000000 00000006 b8a62d80 008fbea0
    [ 13.538764][ T415] 7f40: b8d47f78 00000000 b8d46000 00000000 00000000 802210c0 b88f2900 00000000
    [ 13.547644][ T415] 7f60: b8a62d80 b8a62d80 b8d46000 00000006 008fbea0 80221320 00000000 00000000
    [ 13.556524][ T415] 7f80: b8af0c00 990a3ad4 0000006c 008fbea0 76f1cda0 00000004 80101204 00000004
    [ 13.565403][ T415] 7fa0: 00000000 80101000 0000006c 008fbea0 00000001 008fbea0 00000006 00000000
    [ 13.574283][ T415] 7fc0: 0000006c 008fbea0 76f1cda0 00000004 00000006 00000006 00000000 00000000
    [ 13.583162][ T415] 7fe0: 00000004 7ebaf7d0 76eb4c0b 76e3f206 600d0030 00000001 00000000 00000000
    [ 13.592056][ T415] [] (rproc_virtio_notify) from [] (virtqueue_notify+0x1c/0x34)
    [ 13.601298][ T415] [] (virtqueue_notify) from [] (rpmsg_probe+0x280/0x380 [virtio_rpmsg_bus])
    [ 13.611663][ T415] [] (rpmsg_probe [virtio_rpmsg_bus]) from [] (virtio_dev_probe+0x1f8/0x2c4)
    [ 13.622022][ T415] [] (virtio_dev_probe) from [] (really_probe+0x200/0x450)
    [ 13.630817][ T415] [] (really_probe) from [] (driver_probe_device+0x16c/0x1ac)
    [ 13.639873][ T415] [] (driver_probe_device) from [] (bus_for_each_drv+0x84/0xc8)
    [ 13.649102][ T415] [] (bus_for_each_drv) from [] (__device_attach+0xd4/0x164)
    [ 13.658069][ T415] [] (__device_attach) from [] (bus_probe_device+0x84/0x8c)
    [ 13.666950][ T415] [] (bus_probe_device) from [] (device_add+0x444/0x768)
    [ 13.675572][ T415] [] (device_add) from [] (register_virtio_device+0xa4/0xfc)
    [ 13.684541][ T415] [] (register_virtio_device) from [] (rproc_add_virtio_dev+0xcc/0x1b8)
    [ 13.694466][ T415] [] (rproc_add_virtio_dev) from [] (rproc_start+0x148/0x200)
    [ 13.703521][ T415] [] (rproc_start) from [] (rproc_boot+0x384/0x5c0)
    [ 13.711708][ T415] [] (rproc_boot) from [] (state_store+0x3c/0xc8)
    [ 13.719723][ T415] [] (state_store) from [] (kernfs_fop_write+0xfc/0x214)
    [ 13.728348][ T415] [] (kernfs_fop_write) from [] (__vfs_write+0x30/0x1cc)
    [ 13.736971][ T415] [] (__vfs_write) from [] (vfs_write+0xac/0x17c)
    [ 13.744985][ T415] [] (vfs_write) from [] (ksys_write+0x64/0xe4)
    [ 13.752825][ T415] [] (ksys_write) from [] (ret_fast_syscall+0x0/0x54)
    [ 13.761178][ T415] Exception stack(0xb8d47fa8 to 0xb8d47ff0)
    [ 13.766932][ T415] 7fa0: 0000006c 008fbea0 00000001 008fbea0 00000006 00000000
    [ 13.775811][ T415] 7fc0: 0000006c 008fbea0 76f1cda0 00000004 00000006 00000006 00000000 00000000
    [ 13.784687][ T415] 7fe0: 00000004 7ebaf7d0 76eb4c0b 76e3f206
    [ 13.790442][ T415] Code: bad PC value
    [ 13.839214][ T415] ---[ end trace 1fe21ecfc9f28852 ]---

    Reviewed-by: Mathieu Poirier
    Signed-off-by: Nikita Shubin
    Fixes: 7a186941626d ("remoteproc: remove the single rpmsg vdev limitation")
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200306072452.24743-1-NShubin@topcon.com
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Greg Kroah-Hartman

    Nikita Shubin
     
  • commit d96f2571dc84d128cacf1944f4ecc87834c779a6 upstream.

    On secure devices after a wdog/fatal interrupt, the mba region has to be
    refreshed in order to prevent the following errors during mba load.

    Err Logs:
    remoteproc remoteproc2: stopped remote processor 4080000.remoteproc
    qcom-q6v5-mss 4080000.remoteproc: PBL returned unexpected status -284031232
    qcom-q6v5-mss 4080000.remoteproc: PBL returned unexpected status -284031232
    ....
    qcom-q6v5-mss 4080000.remoteproc: PBL returned unexpected status -284031232
    qcom-q6v5-mss 4080000.remoteproc: MBA booted, loading mpss

    Fixes: 7dd8ade24dc2a ("remoteproc: qcom: q6v5-mss: Add custom dump function for modem")
    Cc: stable@vger.kernel.org
    Signed-off-by: Sibi Sankar
    Tested-by: Bjorn Andersson
    Link: https://lore.kernel.org/r/20200304194729.27979-4-sibis@codeaurora.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Greg Kroah-Hartman

    Sibi Sankar
     
  • commit 900fc60df22748dbc28e4970838e8f7b8f1013ce upstream.

    Trying to reclaim mpss memory while the mba is not running causes the
    system to crash on devices with security fuses blown, so leave it
    assigned to the remote on shutdown and recover it on a subsequent boot.

    Fixes: 6c5a9dc2481b ("remoteproc: qcom: Make secure world call for mem ownership switch")
    Cc: stable@vger.kernel.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Sibi Sankar
    Tested-by: Bjorn Andersson
    Link: https://lore.kernel.org/r/20200304194729.27979-2-sibis@codeaurora.org
    Signed-off-by: Bjorn Andersson
    Signed-off-by: Greg Kroah-Hartman

    Bjorn Andersson
     

13 Apr, 2020

1 commit

  • Parse auto boot from dtb. Currently auto boot is default
    set. This will make non-m4 image suspend dump if the firmware loading
    workqueue not finished. So only enable auto boot for userspace loading
    when fsl,rproc-auto-boot available.

    Reviewed-by: Anson Huang
    Reported-by: Anson Huang
    Signed-off-by: Peng Fan

    Peng Fan
     

09 Apr, 2020

19 commits