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
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 -
[ 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 -
[ 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 -
[ 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 -
[ 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 -
[ 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 -
[ 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 -
[ 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 -
[ 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
14 Dec, 2020
22 commits
-
With rpmsg.dtb, but when M core not kicked by U-Boot, we need set auto_boot
as false. For early boot case, we need set auto_boot as true.Tested-by: Shengjiu Wang
Reviewed-by: Richard Zhu
Reviewed-by: Shengjiu Wang
Signed-off-by: Peng Fan -
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 -
Merge contiguous TCML/U regions into one to avoid load elf files which
has large sections failure.Reviewed-by: Ye Li
Signed-off-by: Peng Fan -
The DDR Alias address should be 0x40000000 according to RM, so correct
Reviewed-by: Fugang Duan
Reported-by: Terry Lv
Signed-off-by: Peng Fan -
Address i.MX8QM dual M4 core case
Reviewed-by: Richard Zhu
Signed-off-by: Peng Fan -
Misc fix to elf load and export rsc_va always.
Reviewed-by: Richard Zhu
Signed-off-by: Peng Fan -
To i.MX7ULP, we have no vdevbuffer, so no need to bypass the
1st one.Reviewed-by: Richard Zhu
Signed-off-by: Peng Fan -
Add i.MX8QM/8QXP support
Acked-by: Richard Zhu
Signed-off-by: Peng Fan -
To i.MX8QM/QXP partitioned M4 case, M4 will do self recovery when
crashed. It not need Linux to reload firmware. So add a flag to indicate
there is no need to request firmware when recovery.Acked-by: Richard Zhu
Signed-off-by: Peng Fan -
In i.MX7ULP dual boot mode, M4 controls everything including A7,
if M4 crashes, we assume A7 will also crash. So we only have IPC
between M4 and A7 here.Acked-by: Richard Zhu
Signed-off-by: Peng Fan -
Add doorbell support. The RX doorbell will be used to check
whether remote processor is ready. The TX doorbell will used
to notify remote processor when stop.Acked-by: Richard Zhu
Signed-off-by: Peng Fan -
To i.MX7ULP, M4 is the master to control everything, so it not need
clk from A7.Reviewed-by: Richard Zhu
Signed-off-by: Peng Fan -
i.MX8MN/P use ARM SIP call to let ATF handle M4 start/stop.
So we add a new method named IMX_ARM_SMCCC
Acked-by: Richard Zhu
Signed-off-by: Peng Fan -
Introduce IMX_DIRECT_MMIO for regmap usage. This is to restructure
code for adding SCFW API and SMCCC call.Acked-by: Richard Zhu
Signed-off-by: Peng Fan -
Detect Coproc booted or not and Parse resource table
Set remoteproc state to RPROC_DETACHED when M4 is booted early
Add attach hookAcked-by: Richard Zhu
Signed-off-by: Peng Fan -
Use virtio/mailbox to build connection between Remote Proccessors
and Linux. Add delayed work to handle incoming messages.Reviewed-by: Richard Zhu
Signed-off-by: Peng Fan -
Add i.MX8MQ dev/sys addr map and configuration data structure
i.MX8MM share i.MX8MQ settings.Reviewed-by: Richard Zhu
Signed-off-by: Peng Fan -
The hook is used to parse memory-regions and load resource table
from the address the remote processor published.Acked-by: Richard Zhu
Signed-off-by: Peng Fan -
We might need to map an region multiple times, becaue the region might
be shared between remote processors, such i.MX8QM with dual M4 cores.
So use devm_ioremap, not devm_ioremap_resource.Reviewed-by: Oleksij Rempel
Reviewed-by: Richard Zhu
Signed-off-by: Peng Fan -
It is using devm_ioremap, so not devm_ioremap_resource. Correct
the error message and print out sa/size.Acked-by: Richard Zhu
Reviewed-by: Mathieu Poirier
Signed-off-by: Peng Fan -
Add elf memory hooks according to elf_mem_hook setting in the platform
configuration dcfg.Acked-by: Richard Zhu
Signed-off-by: Peng Fan -
To arm64, "dc zva, dst" is used in memset.
Per ARM DDI 0487A.j, chapter C5.3.8 DC ZVA, Data Cache Zero by VA,"If the memory region being zeroed is any type of Device memory,
this instruction can give an alignment fault which is prioritized
in the same way as other alignment faults that are determined
by the memory type."On i.MX platforms, when elf is loaded to onchip TCM area, the region
is ioremapped, so "dc zva, dst" will trigger abort. And ioremap_wc()
on i.MX not able to write correct data to TCM area.So we need to use io helpers, and extend the elf loader to support
platform specific memory functions.Acked-by: Richard Zhu
Signed-off-by: Peng Fan
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
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 -
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
...
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 -
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 -
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 -
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 -
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