aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/scripts/python/exported-sql-viewer.py (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2025-05-20remoteproc: k3: Refactor of_get_memories() functions into common driverBeleswar Padhi5-146/+66
The of_get_memories() implementations in the TI K3 R5, DSP and M4 remoteproc drivers initialize and assign memory regions used by the remote processor in the same way. Refactor these implementations into ti_k3_common.c driver as k3_rproc_of_get_memories() use this common function for mem initialization in R5, DSP and M4 drivers. Note: The TCM addresses for R5 core are configurable based on the 'loczrama' setting. Therefore, override the bus_addr assignment done by the common function for TCMs of R5 remote processors by reading the 'loczrama' DT property in k3_r5_core_of_get_internal_memories(). Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-34-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor .da_to_va rproc ops into common driverBeleswar Padhi5-154/+65
The .da_to_va rproc ops implementations in TI K3 R5, DSP and M4 remoteproc drivers return the Kernel virtual address for a corresponding rproc device address. Refactor the implementations into the ti_k3_common.c driver as k3_rproc_da_to_va and use this common function for address translation of DDR and internal memory regions in R5, DSP and M4 drivers. Note: The R5 SRAM memory translations are still handled in the .da_to_va ops of the R5 remoteproc driver. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-33-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor .get_loaded_rsc_table ops into common driverBeleswar Padhi5-99/+38
The .get_loaded_rsc_table rproc ops implementations in TI K3 R5, DSP and M4 remoteproc drivers return a pointer to the resource table that was pre-loaded at the base address of the DDR region reserved for firmware usage. Refactor the implementations into ti_k3_common.c driver as k3_get_loaded_rsc_table() and register this common function as .get_loaded_rsc_table ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-32-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor .detach rproc ops into common driverBeleswar Padhi5-33/+14
The .detach rproc ops implementations in TI K3 R5, DSP and M4 remoteproc drivers are NOPs. Refactor the implementations into ti_k3_common.c driver as k3_rproc_detach() and register this common function as .detach ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-31-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor .attach rproc ops into common driverBeleswar Padhi5-37/+16
The .attach rproc ops implementations in TI K3 R5, DSP and M4 drivers are NOPs. Refactor the implementations into ti_k3_common.c driver as k3_rproc_attach() and register this common function as .attach ops in R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-30-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor .stop rproc ops into common driverBeleswar Padhi4-30/+17
The .stop rproc ops implementations in TI K3 DSP and M4 remoteproc drivers put the remote processor into reset. Refactor the implementations into ti_k3_common.c driver as k3_rproc_stop() and register this common function as .stop ops in DSP and M4 drivers. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-29-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor .start rproc ops into common driverBeleswar Padhi4-16/+19
The k3_dsp_rproc_start() function sets the boot vector and releases the reset on the remote processor. Whereas, the k3_m4_rproc_start() function only needs to release the reset. Refactor the k3_m4_rproc_start() into ti_k3_common.c as k3_rproc_start() and align the DSP and M4 drivers to invoke this common function when releasing the reset on the remote processor. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-28-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor .unprepare rproc ops into common driverBeleswar Padhi4-58/+33
The .unprepare rproc ops implementations in TI K3 DSP and M4 remoteproc drivers assert the module reset on the remote processor. Refactor the implementations into ti_k3_common.c driver as k3_rproc_unprepare() and register this common function as .unprepare ops in DSP and M4 drivers. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-27-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor .prepare rproc ops into common driverBeleswar Padhi4-90/+49
The .prepare rproc ops implementations in TI K3 DSP and M4 remoteproc drivers deasserts the local and module reset of the processor to allow firmware loading into internal memory. Refactor the implementations into the ti_k3_common.c driver as k3_rproc_prepare() and register this common function as .prepare ops in the DSP and M4 drivers. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-26-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-dsp: Assert local reset during .prepare callbackBeleswar Padhi1-14/+16
The ti_k3_dsp_remoteproc.c driver asserts the local reset in probe and releases the module reset in .prepare callback. This is done to ensure the core does not execute bogus code when module reset is deasserted. Put both of these operations together in .prepare callback, which is more suitable as it ensures local reset is asserted for subsequent core start operations from sysfs. This is done to align the .prepare callback of DSP with the M4 driver which can be factored out at a later stage. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-25-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-dsp: Don't override rproc ops in IPC-only modeBeleswar Padhi1-12/+15
Currently, the driver overrides the rproc ops when booting in IPC-only mode. Remove these overrides and register the ops unconditionally. This requires to have IPC-only mode checks in the .prepare and .unprepare ops and returning early. The other rproc ops are invoked when booting either in IPC-only mode or in remoteproc mode but not both. This is done to align the rproc ops implementations of DSP driver with M4 driver and can be factored out at a later stage. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-24-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor rproc_request_mbox() implementations into common driverBeleswar Padhi5-107/+40
The rproc_request_mbox() implementations in TI K3 R5, DSP and M4 remoteproc drivers acquire the mailbox channel and send the same message through the acquired channel. Refactor the above function into the ti_k3_common.c driver as k3_rproc_request_mbox() and use it throughout R5, DSP and M4 drivers. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-23-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-m4: Ping the mbox while acquiring the channelBeleswar Padhi1-25/+19
The TI K3 M4 remoteproc driver acquires the mailbox channel in probe but sends a message through the acquired channel later in .attach()/.start() callbacks. Put both the things together in the form of 'k3_m4_rproc_request_mbox()' function and invoke that in the probe routine. This is done to align the rproc_request_mbox() implementation with R5 and DSP drivers which can be factored out at a later stage. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-22-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor rproc_release() implementation into common driverBeleswar Padhi4-50/+28
The rproc_release() implementations in TI K3 DSP and M4 remoteproc drivers deassert reset in the same way. Refactor the above function into the ti_k3_common.c driver as k3_rproc_release() and use it throughout DSP and M4 drivers for releasing the reset from the remote processor. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-21-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-m4: Introduce central function to release rproc from resetBeleswar Padhi1-7/+26
Currently, the TI K3 M4 remoteproc driver assumes all of the M4 devices have local resets. Even though its true for all existing M4 devices, keep room for future devices which possibly may not have local resets and only have a module reset. Therefore introduce a central function, k3_m4_rproc_release() which handles both type of devices (with and without local resets), and use it throughout the driver to release the remote processor from reset. Also, for devices with local reset, Assert the module reset back in case the local reset deassert operation failed. This is done to align the reset release implementation with DSP remoteproc driver and can be factored out later. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-20-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-dsp: Correct Reset deassert logic for devices w/o lresetsBeleswar Padhi1-17/+13
The k3_dsp_rproc_release() function erroneously deasserts the local reset even for devices which do not support it. Even though it results in a no-operation, Update the logic to explicitly deassert only the global reset for devices that do not have a local reset. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-19-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor rproc_reset() implementation into common driverBeleswar Padhi4-44/+26
The rproc_reset() implementations in TI K3 DSP and M4 remoteproc drivers assert reset in the same way. Refactor the above function into the ti_k3_common.c driver as k3_rproc_reset() and use it throughout DSP and M4 drivers for resetting the remote processor. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-18-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-m4: Introduce central function to put rproc into resetBeleswar Padhi1-13/+23
Currently, the TI K3 M4 remoteproc driver assumes all of the M4 devices have local resets. Even though its true for all existing M4 devices, keep room for future devices which possibly may not have local resets and only have a module reset. Therefore introduce a central function, k3_m4_rproc_reset() which handles both type of devices (with and without local resets), and use it throughout the driver to put the remote processor into reset. This is done to align the reset implementation with DSP remoteproc driver and can be factored out later. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-17-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-dsp: Correct Reset logic for devices without lresetsBeleswar Padhi1-15/+9
The k3_dsp_rproc_reset() function erroneously asserts the local reset even for devices which do not support it. Even though it results in a no-operation, Update the logic to explicitly assert the local reset for devices that support it and only the global reset for those that do not. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-16-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor .kick rproc ops into common driverBeleswar Padhi5-62/+29
The .kick rproc ops implementations in TI K3 R5, DSP and M4 remoteproc drivers sends a mailbox message to the remote processor in the same way. Refactor the implementations into a common function 'k3_rproc_kick()' in the ti_k3_common.c driver. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Acked-by: Andrew Davis <afd@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-15-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor mailbox rx_callback functions into common driverBeleswar Padhi6-149/+95
The mailbox .rx_callback implementations in TI K3 R5, DSP and M4 remoteproc drivers handle inbound mailbox messages in the same way. Introduce a common driver 'ti_k3_common.c' and refactor the implementations into a common function 'k3_rproc_mbox_callback'() in it. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-14-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3: Refactor shared data structuresBeleswar Padhi4-287/+166
The TI K3 R5, DSP and M4 remoteproc drivers share the same data structure definitions. Refactor the shared data structures into a new common header file, 'ti_k3_common.h', and update the drivers to use the unified data structures. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-13-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-m4: Use k3_rproc_mem_data structure for memory infoBeleswar Padhi1-15/+45
The ti_k3_m4_remoteproc.c driver previously hardcoded device memory region addresses and names. Change this to use the k3_rproc_mem_data structure to store memory information. This aligns with DSP and R5 drivers, and can be refactored out later. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-12-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-m4: Add pointer to rproc struct within k3_m4_rprocBeleswar Padhi1-0/+3
Add a pointer to the rproc struct within k3_m4_rproc internal struct. This is done to align the M4 internal rproc data structure with R5 driver which can be factored out at a later stage. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-11-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-{m4/dsp}: Add a void ptr member in rproc internal structBeleswar Padhi2-0/+4
Introduce a void pointer in the k3_{m4/dsp}_rproc internal data structure which can be used to point to any private data needed by the driver. Currently, the M4/DSP drivers do not have any private data, so the pointer can be left pointing to NULL. This is done to align the data structures with R5 driver which can be factored out at a later stage. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-10-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-r5: Use k3_r5_rproc_mem_data structure for memory infoBeleswar Padhi1-9/+56
The ti_k3_r5_remoteproc.c driver previously hardcoded device memory region addresses and names. Change this to use the k3_r5_rproc_mem_data structure to store memory information. This aligns with K3 DSP and M4 drivers, and can be refactored out later. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Tested-by: Judith Mendez <jm@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-9-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-r5: Refactor Data Structures to Align with DSP and M4Beleswar Padhi1-180/+195
Currently, struct members such as mem, num_mems, reset, tsp, ti_sci and ti_sci_id are part of the k3_r5_core structure. To align the rproc->priv data structure of the R5 remote processor with that of the DSP and M4, move the above members from k3_r5_core to k3_r5_rproc struct. Additionally, introduce a void *priv pointer in k3_r5_rproc that can be typecasted to point to the k3_r5_core structure. This abstraction is done to ensure common functionalities across R5, DSP and M4 drivers can be refactored at a later stage. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-8-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-r5: Re-order k3_r5_release_tsp() functionBeleswar Padhi1-7/+7
The TI-SCI processor control handle, 'tsp', will be refactored from k3_r5_core struct into k3_r5_rproc struct in a future commit. So, the 'tsp' pointer will be initialized inside k3_r5_cluster_rproc_init() now. Move the k3_r5_release_tsp() function, which releases the tsp handle, above k3_r5_cluster_rproc_init(), so that the later can register the former as a devm action. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-7-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-r5: Re-order internal memory initialization functionsBeleswar Padhi1-129/+129
The internal memory struct pointer, 'mem', will be refactored from k3_r5_core struct into k3_r5_rproc struct in a future commit. Therefore, move the internal memory initialization function, k3_r5_core_of_get_internal_memories() above k3_r5_cluster_rproc_init() so that the former can be invoked by the later. While at it, also re-order the k3_r5_core_of_get_sram_memories() to keep all the internal memory initialization functions at one place. Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-6-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-m4: Don't assert reset in detach routineBeleswar Padhi1-1/+1
The rproc_detach() function invokes __rproc_detach() before rproc_unprepare_device(). The __rproc_detach() function sets the rproc->state to "RPROC_DETACHED". However, the TI K3 M4 driver erroneously looks for "RPROC_ATTACHED" state in its .unprepare ops to identify IPC-only mode; which leads to resetting the rproc in detach routine. Therefore, correct the IPC-only mode detection logic to look for "RPROC_DETACHED" in k3_m4_rproc_unprepare() function. Fixes: ebcf9008a895 ("remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem") Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Reviewed-by: Hari Nagalla <hnagalla@ti.com> Reviewed-by: Martyn Welch <martyn.welch@collabora.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250513054510.3439842-5-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-r5: Refactor sequential core power up/down operationsBeleswar Padhi1-47/+63
The existing implementation of the waiting mechanism in "k3_r5_cluster_rproc_init()" waits for the "released_from_reset" flag to be set as part of the firmware boot process in "k3_r5_rproc_start()". The "k3_r5_cluster_rproc_init()" function is invoked in the probe routine which causes unexpected failures in cases where the firmware is unavailable at boot time, resulting in probe failure and removal of the remoteproc handles in the sysfs paths. To address this, the waiting mechanism is refactored out of the probe routine into the appropriate "k3_r5_rproc_{prepare/unprepare}()" functions. This allows the probe routine to complete without depending on firmware booting, while still maintaining the required power-synchronization between cores. Further, this wait mechanism is dropped from "k3_r5_rproc_{start/stop}()" functions as they deal with Core Run/Halt operations, and as such, there is no constraint in Running or Halting the cores of a cluster in order. Fixes: 61f6f68447ab ("remoteproc: k3-r5: Wait for core0 power-up before powering up core1") Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-4-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-dsp: Drop check performed in k3_dsp_rproc_{mbox_callback/kick}Siddharth Vadapalli1-8/+0
Commit ea1d6fb5b571 ("remoteproc: k3-dsp: Acquire mailbox handle during probe routine") introduced a check in the "k3_dsp_rproc_mbox_callback()" and "k3_dsp_rproc_kick()" callbacks, causing them to exit if the remote core's state is "RPROC_DETACHED". However, the "__rproc_attach()" function that is responsible for attaching to a remote core, updates the state of the remote core to "RPROC_ATTACHED" only after invoking "rproc_start_subdevices()". The "rproc_start_subdevices()" function triggers the probe of the Virtio RPMsg devices associated with the remote core, which require that the "k3_dsp_rproc_kick()" and "k3_dsp_rproc_mbox_callback()" callbacks are functional. Hence, drop the check in the callbacks. Fixes: ea1d6fb5b571 ("remoteproc: k3-dsp: Acquire mailbox handle during probe routine") Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-3-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-20remoteproc: k3-r5: Drop check performed in k3_r5_rproc_{mbox_callback/kick}Siddharth Vadapalli1-8/+0
Commit f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during probe routine") introduced a check in the "k3_r5_rproc_mbox_callback()" and "k3_r5_rproc_kick()" callbacks, causing them to exit if the remote core's state is "RPROC_DETACHED". However, the "__rproc_attach()" function that is responsible for attaching to a remote core, updates the state of the remote core to "RPROC_ATTACHED" only after invoking "rproc_start_subdevices()". The "rproc_start_subdevices()" function triggers the probe of the Virtio RPMsg devices associated with the remote core, which require that the "k3_r5_rproc_kick()" and "k3_r5_rproc_mbox_callback()" callbacks are functional. Hence, drop the check in the callbacks. Fixes: f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during probe routine") Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Signed-off-by: Beleswar Padhi <b-padhi@ti.com> Tested-by: Judith Mendez <jm@ti.com> Reviewed-by: Andrew Davis <afd@ti.com> Link: https://lore.kernel.org/r/20250513054510.3439842-2-b-padhi@ti.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-15Revert "remoteproc: core: Clear table_sz when rproc_shutdown"Bjorn Andersson1-1/+0
Clearing the table_sz on cleanup seemed reasonable, but further discussions concluded that this merely working around the issue and that the fix is incomplete. As such, revert commit efdde3d73ab2 ("remoteproc: core: Clear table_sz when rproc_shutdown") to avoid carrying a partial fix. Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20250513-revert-rproc-table-sz-v1-1-a8c6b5d6f8a7@kernel.org Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-13dt-bindings: remoteproc: qcom,sm8150-pas: Add missing SC8180X compatibleKrzysztof Kozlowski1-0/+3
Commit 4b4ab93ddc5f ("dt-bindings: remoteproc: Consolidate SC8180X and SM8150 PAS files") moved SC8180X bindings from separate file into this one, but it forgot to add actual compatibles in top-level properties section making the entire binding un-selectable (no-op) for SC8180X PAS. Fixes: 4b4ab93ddc5f ("dt-bindings: remoteproc: Consolidate SC8180X and SM8150 PAS files") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20250428075243.44256-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-05-13dt-bindings: remoteproc: qcom,sm8350-pas: Add SC8280XPKonrad Dybcio1-24/+30
From the software POV, it matches the SM8350's implementation. Describe it as such, with a fallback. Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> # Lenovo X13s Link: https://lore.kernel.org/r/20250503-topic-8280_slpi-v1-1-9400a35574f7@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-05-13remoteproc: qcom_wcnss_iris: Add missing put_device() on error in probeDan Carpenter1-0/+2
The device_del() call matches with the device_add() but we also need to call put_device() to trigger the qcom_iris_release(). Fixes: 1fcef985c8bd ("remoteproc: qcom: wcnss: Fix race with iris probe") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/4604f7e0-3217-4095-b28a-3ff8b5afad3a@stanley.mountain Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-05-12remoteproc: xlnx: Avoid RPU force power downTanmay Shah1-1/+33
Powering off RPU using force_pwrdwn call results in system failure if there are multiple users of that RPU node. Better mechanism is to use request_node and release_node EEMI calls. With use of these EEMI calls, platform management controller will take-care of powering off RPU when there is no user. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> Link: https://lore.kernel.org/r/20250506165944.1109534-1-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-06remoteproc: core: Release rproc->clean_table after rproc_attach() failsXiaolei Wang1-0/+1
When rproc->state = RPROC_DETACHED is attached to remote processor through rproc_attach(), if rproc_handle_resources() returns failure, then the clean table should be released, otherwise the following memory leak will occur. unreferenced object 0xffff000086a99800 (size 1024): comm "kworker/u12:3", pid 59, jiffies 4294893670 (age 121.140s) hex dump (first 32 bytes): 00 00 00 00 00 80 00 00 00 00 00 00 00 00 10 00 ............ 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 ............ backtrace: [<000000008bbe4ca8>] slab_post_alloc_hook+0x98/0x3fc [<000000003b8a272b>] __kmem_cache_alloc_node+0x13c/0x230 [<000000007a507c51>] __kmalloc_node_track_caller+0x5c/0x260 [<0000000037818dae>] kmemdup+0x34/0x60 [<00000000610f7f57>] rproc_boot+0x35c/0x56c [<0000000065f8871a>] rproc_add+0x124/0x17c [<00000000497416ee>] imx_rproc_probe+0x4ec/0x5d4 [<000000003bcaa37d>] platform_probe+0x68/0xd8 [<00000000771577f9>] really_probe+0x110/0x27c [<00000000531fea59>] __driver_probe_device+0x78/0x12c [<0000000080036a04>] driver_probe_device+0x3c/0x118 [<000000007e0bddcb>] __device_attach_driver+0xb8/0xf8 [<000000000cf1fa33>] bus_for_each_drv+0x84/0xe4 [<000000001a53b53e>] __device_attach+0xfc/0x18c [<00000000d1a2a32c>] device_initial_probe+0x14/0x20 [<00000000d8f8b7ae>] bus_probe_device+0xb0/0xb4 unreferenced object 0xffff0000864c9690 (size 16): Fixes: 9dc9507f1880 ("remoteproc: Properly deal with the resource table when detaching") Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250430092043.1819308-3-xiaolei.wang@windriver.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-05-06remoteproc: core: Cleanup acquired resources when rproc_handle_resources() fails in rproc_attach()Xiaolei Wang1-3/+2
When rproc->state = RPROC_DETACHED and rproc_attach() is used to attach to the remote processor, if rproc_handle_resources() returns a failure, the resources allocated by imx_rproc_prepare() should be released, otherwise the following memory leak will occur. Since almost the same thing is done in imx_rproc_prepare() and rproc_resource_cleanup(), Function rproc_resource_cleanup() is able to deal with empty lists so it is better to fix the "goto" statements in rproc_attach(). replace the "unprepare_device" goto statement with "clean_up_resources" and get rid of the "unprepare_device" label. unreferenced object 0xffff0000861c5d00 (size 128): comm "kworker/u12:3", pid 59, jiffies 4294893509 (age 149.220s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 02 88 00 00 00 00 00 00 10 00 00 00 00 00 ............ backtrace: [<00000000f949fe18>] slab_post_alloc_hook+0x98/0x37c [<00000000adbfb3e7>] __kmem_cache_alloc_node+0x138/0x2e0 [<00000000521c0345>] kmalloc_trace+0x40/0x158 [<000000004e330a49>] rproc_mem_entry_init+0x60/0xf8 [<000000002815755e>] imx_rproc_prepare+0xe0/0x180 [<0000000003f61b4e>] rproc_boot+0x2ec/0x528 [<00000000e7e994ac>] rproc_add+0x124/0x17c [<0000000048594076>] imx_rproc_probe+0x4ec/0x5d4 [<00000000efc298a1>] platform_probe+0x68/0xd8 [<00000000110be6fe>] really_probe+0x110/0x27c [<00000000e245c0ae>] __driver_probe_device+0x78/0x12c [<00000000f61f6f5e>] driver_probe_device+0x3c/0x118 [<00000000a7874938>] __device_attach_driver+0xb8/0xf8 [<0000000065319e69>] bus_for_each_drv+0x84/0xe4 [<00000000db3eb243>] __device_attach+0xfc/0x18c [<0000000072e4e1a4>] device_initial_probe+0x14/0x20 Fixes: 10a3d4079eae ("remoteproc: imx_rproc: move memory parsing to rproc_ops") Suggested-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250430092043.1819308-2-xiaolei.wang@windriver.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-04-22remoteproc: imx_dsp_rproc: Add support for DSP-specific featuresIuliana Prodan1-2/+96
Some DSP firmware requires a FW_READY signal before proceeding, while others do not. Therefore, add support to handle i.MX DSP-specific features. Implement handle_rsc callback to handle resource table parsing and to process DSP-specific resource, to determine if waiting is needed. Update imx_dsp_rproc_start() to handle this condition accordingly. Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com> Link: https://lore.kernel.org/r/20250416075613.2116792-1-iuliana.prodan@oss.nxp.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-04-07remoteproc: stm32_rproc: Allow to specify firmware default nameArnaud Pouliquen1-1/+7
Enhance the stm32_rproc driver to allow enabling the configuration of the firmware name based on the 'firmware-name' property in the device tree, offering flexibility compared to using the remote proc device node name. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Link: https://lore.kernel.org/r/20250327082721.641278-3-arnaud.pouliquen@foss.st.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-04-07dt-bindings: remoteproc: stm32-rproc: Add firmware-name propertyArnaud Pouliquen1-0/+4
Add the 'firmware-name' property to the remote processor binding to allow specifying the default firmware name in the device tree. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20250327082721.641278-2-arnaud.pouliquen@foss.st.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2025-04-06Linux 6.15-rc1Linus Torvalds1-2/+2
2025-04-06tools/include: make uapi/linux/types.h usable from assemblyThomas Weißschuh1-0/+3
The "real" linux/types.h UAPI header gracefully degrades to a NOOP when included from assembly code. Mirror this behaviour in the tools/ variant. Test for __ASSEMBLER__ over __ASSEMBLY__ as the former is provided by the toolchain automatically. Reported-by: Mark Brown <broonie@kernel.org> Closes: https://lore.kernel.org/lkml/af553c62-ca2f-4956-932c-dd6e3a126f58@sirena.org.uk/ Fixes: c9fbaa879508 ("selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Link: https://patch.msgid.link/20250321-uapi-consistency-v1-1-439070118dc0@linutronix.de Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-04-06tools/power turbostat: v2025.05.06Len Brown1-1/+1
Support up to 8192 processors Add cpuidle governor debug telemetry, disabled by default Update default output to exclude cpuidle invocation counts Bug fixes Signed-off-by: Len Brown <len.brown@intel.com>
2025-04-06tools/power turbostat: disable "cpuidle" invocation counters, by defaultLen Brown2-13/+33
Create "pct_idle" counter group, the sofware notion of residency so it can now be singled out, independent of other counter groups. Create "cpuidle" group, the cpuidle invocation counts. Disable "cpuidle", by default. Create "swidle" = "cpuidle" + "pct_idle". Undocument "sysfs", the old name for "swidle", but keep it working for backwards compatibilty. Create "hwidle", all the HW idle counters Modify "idle", enabled by default "idle" = "hwidle" + "pct_idle" (and now excludes "cpuidle") Signed-off-by: Len Brown <len.brown@intel.com>
2025-04-06Disable SLUB_TINY for build testingLinus Torvalds2-2/+2
... and don't error out so hard on missing module descriptions. Before commit 6c6c1fc09de3 ("modpost: require a MODULE_DESCRIPTION()") we used to warn about missing module descriptions, but only when building with extra warnigns (ie 'W=1'). After that commit the warning became an unconditional hard error. And it turns out not all modules have been converted despite the claims to the contrary. As reported by Damian Tometzki, the slub KUnit test didn't have a module description, and apparently nobody ever really noticed. The reason nobody noticed seems to be that the slub KUnit tests get disabled by SLUB_TINY, which also ends up disabling a lot of other code, both in tests and in slub itself. And so anybody doing full build tests didn't actually see this failre. So let's disable SLUB_TINY for build-only tests, since it clearly ends up limiting build coverage. Also turn the missing module descriptions error back into a warning, but let's keep it around for non-'W=1' builds. Reported-by: Damian Tometzki <damian@riscv-rocks.de> Link: https://lore.kernel.org/all/01070196099fd059-e8463438-7b1b-4ec8-816d-173874be9966-000000@eu-central-1.amazonses.com/ Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Fixes: 6c6c1fc09de3 ("modpost: require a MODULE_DESCRIPTION()") Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-04-06tools/power turbostat: re-factor sysfs codeLen Brown1-10/+21
Probe cpuidle "sysfs" residency and counts separately, since soon we will make one disabled on, and the other disabled off. Clarify that some BIC (build-in-counters) are actually "groups". since we're about to re-name some of those groups. no functional change. Signed-off-by: Len Brown <len.brown@intel.com>
2025-04-06tools/power turbostat: Restore GFX sysfs fflush() callZhang Rui1-0/+1
Do fflush() to discard the buffered data, before each read of the graphics sysfs knobs. Fixes: ba99a4fc8c24 ("tools/power turbostat: Remove unnecessary fflush() call") Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>