aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-07-28remoteproc: k3: Add TI-SCI processor control helper functionsSuman Anna1-0/+104
Texas Instruments' K3 generation SoCs have specific modules/register spaces used for configuring the various aspects of a remote processor. These include power, reset, boot vector and other configuration features specific to each compute processor present on the SoC. These registers are managed by the System Controller such as DMSC on K3 AM65x SoCs. The Texas Instrument's System Control Interface (TI-SCI) Message Protocol is used to communicate to the System Controller from various compute processors to invoke specific services provided by the firmware running on the System Controller. Add a common processor control interface header file that can be used by multiple remoteproc drivers. The helper functions within this header file abstract the various TI SCI protocol ops for the remoteproc drivers, and allow them to request the System Controller to be able to program and manage various remote processors on the SoC. The remoteproc drivers are expected to manage the life-cycle of their ti_sci_proc_dev local structures. Signed-off-by: Suman Anna <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-28remoteproc: Introduce rproc_of_parse_firmware() helperSuman Anna2-0/+25
Add a new helper function rproc_of_parse_firmware() to the remoteproc core that can be used by various remoteproc drivers to look up the the "firmware-name" property from a rproc device node. This property is already being used by multiple drivers, so this helper can avoid repeating equivalent code in remoteproc drivers. Signed-off-by: Suman Anna <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-28dt-bindings: arm: keystone: Add common TI SCI bindingsSuman Anna2-0/+45
Add a bindings document that defines the common TI SCI properties used by various K3 device management nodes such as clock controllers, interrupt controllers, reset controllers or remoteproc devices. The required properties for each device management node shall be specified in the respective binding document. Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Suman Anna <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-27remoteproc: qcom_q6v5_mss: Remove redundant running stateSibi Sankar1-5/+0
Remove the redundant running state, as an equivalent is maintained in the common q6v5 resource handling helpers. Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Evan Green <[email protected]> Signed-off-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-27remoteproc: qcom: q6v5: Update running state before requesting stopSibi Sankar1-0/+2
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 <[email protected]> Fixes: 3b415c8fb263 ("remoteproc: q6v5: Extract common resource handling") Cc: [email protected] Signed-off-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-27remoteproc: qcom_q6v5_mss: Add modem debug policy supportSibi Sankar1-1/+24
Add modem debug policy support which will enable coredumps and live debug support when the msadp firmware is present on secure devices. Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-27remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before loadSibi Sankar1-3/+2
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 <[email protected]> Fixes: 051fb70fd4ea4 ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5") Cc: [email protected] Signed-off-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-27remoteproc: qcom_q6v5_mss: Validate MBA firmware size before loadSibi Sankar1-0/+6
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 <[email protected]> Fixes: 051fb70fd4ea4 ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5") Cc: [email protected] Signed-off-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-22rpmsg: update documentationGuennadi Liakhovetski1-3/+3
rpmsg_create_ept() takes struct rpmsg_channel_info chinfo as its last argument, not a u32 value. The first two arguments are also updated. Signed-off-by: Guennadi Liakhovetski <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-21remoteproc: qcom_q6v5_mss: Add MBA log extraction supportSibi Sankar1-1/+37
On SC7180 the MBA firmware stores the bootup text logs in a 4K segment at the beginning of the MBA region. Add support to extract the logs which will be useful to debug mba boot/authentication issues. Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-21remoteproc: Add coredump debugfs entryRishabh Bhatnagar1-0/+90
Add coredump debugfs entry to configure the type of dump that will be collected during recovery. User can select between default or inline coredump functionality. Also coredump collection can be disabled through this interface. This functionality can be configured differently for different remote processors. Signed-off-by: Rishabh Bhatnagar <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Tested-by: Sibi Sankar <[email protected]> Reviewed-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-21remoteproc: Add inline coredump functionalityRishabh Bhatnagar2-18/+154
The current coredump implementation uses vmalloc area to copy all the segments. But this might put strain on low memory targets as the firmware size sometimes is in tens of MBs. The situation becomes worse if there are multiple remote processors undergoing recovery at the same time. This patch adds inline coredump functionality that avoids extra memory usage. This requires recovery to be halted until data is read by userspace and free function is called. Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Sibi Sankar <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Signed-off-by: Rishabh Bhatnagar <[email protected]> Tested-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-21remoteproc: Pass size and offset as arguments to segment dump functionRishabh Bhatnagar3-9/+11
Change the segment dump API signature to include size and offset arguments. Refactor the qcom_q6v5_mss driver to use these arguments while copying the segment. Doing this lays the ground work for "inline" coredump functionality being added in the next patch. Tested-by: Sibi Sankar <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Sibi Sankar <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Signed-off-by: Rishabh Bhatnagar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-21remoteproc: qcom_q6v5_mss: Replace mask based tracking with sizeSibi Sankar1-9/+8
In order to land inline coredump support for mss, the dump_segment function would need to support granularities less than the segment size. This is achieved by replacing mask based tracking with size. Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Sibi Sankar <[email protected]> Signed-off-by: Rishabh Bhatnagar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-21remoteproc: Move coredump functionality to a new fileRishabh Bhatnagar4-191/+209
Move all coredump functionality to an individual file. This is being done so that the current functionality can be extended in future patchsets. Signed-off-by: Rishabh Bhatnagar <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Reviewed-by: Mathieu Poirier <[email protected]> Reviewed-by: Sibi Sankar <[email protected]> Tested-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-17remoteproc: stm32: Update M4 state in stm32_rproc_stop()Mathieu Poirier1-0/+12
Update the co-processor state in function stm32_rproc_stop() so that it can be used in scenarios where the remoteproc core is attaching to the M4. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-17remoteproc: stm32: Introduce new attach() operationMathieu Poirier1-0/+8
Introduce new attach function to be used when attaching to a remote processor. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-17remoteproc: stm32: Properly handle the resource table when attachingMathieu Poirier1-0/+76
Properly set the remote processor's resource table based on where it was loaded by the external entity when attaching to a remote processor. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-17remoteproc: stm32: Parse memory regions when attaching to M4Mathieu Poirier1-3/+20
Split function stm32_rproc_parse_fw() in two parts, the first one to parse the memory regions and the second one to load the resource table. That way parsing of the memory regions can be done without having do deal with the resource table when attaching to a remote processor. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-17remoteproc: Make function rproc_resource_cleanup() publicMathieu Poirier2-1/+3
Make function rproc_resource_cleanup() public so that it can be used by platform drivers when allocating resources to be used by a detached remote processor. Acked-by: Arnaud Pouliquen <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-17remoteproc: stm32: Properly set co-processor state when attachingMathieu Poirier1-0/+31
Introduce the required mechanic to set the state of the M4 in order to properly deal with scenarios where the co-processor has been started by another entity. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-17remoteproc: stm32: Parse syscon that will manage M4 synchronisationMathieu Poirier1-0/+26
Get from the DT the syncon to probe the state of the remote processor and the location of the resource table. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Loic Pallardy <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-17remoteproc: stm32: Remove memory translation from DT parsingMathieu Poirier1-1/+5
Other than one has to be done after the other, there is no correlation between memory translation and DT parsing. As such move function stm32_rproc_of_memory_translations() to stm32_rproc_probe() so that stm32_rproc_parse_dt() can be extended to look for attach bindings in a clean way. Acked-by: Arnaud Pouliquen <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Loic Pallardy <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-17remoteproc: stm32: Decouple rproc from DT parsingMathieu Poirier1-11/+12
Remove the remote processor from the process of parsing the device tree since (1) there is no correlation between them and (2) to use the information that was gathered to make a decision on whether to synchronise with the M4 or not. Acked-by: Arnaud Pouliquen <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-17remoteproc: stm32: Request IRQ with platform deviceMathieu Poirier1-2/+3
Request IRQ with platform device rather than remote proc in order to call stm32_rproc_parse_dt() before rproc_alloc(). That way we can know whether we need to synchronise with the MCU or not. Acked-by: Arnaud Pouliquen <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Loic Pallardy <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-17remoteproc: stm32: Decouple rproc from memory translationMathieu Poirier1-4/+4
Remove the remote processor from the process of parsing the memory ranges since there is no correlation between them. Acked-by: Arnaud Pouliquen <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Loic Pallardy <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-16remoteproc: Properly handle firmware name when attachingMathieu Poirier3-2/+34
This patch prevents the firmware image name from being displayed when the remoteproc core is attaching to a remote processor. This is needed needed since there is no guarantee about the nature of the firmware image that is loaded by the external entity. Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Arnaud Pouliquen <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Tested-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-16remoteproc: Refactor function rproc_free_vring()Mathieu Poirier1-4/+16
When function rproc_free_vring() clears the virtio device section it does so on the cached resource table rather than the one installed in the remote processor memory. When a remote processor has been booted by another entity there is no need to use a cached table and as such, no need to clear the virtio device section in it. Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Tested-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-16remoteproc: Refactor function rproc_trigger_auto_boot()Mathieu Poirier1-0/+9
Refactor function rproc_trigger_auto_boot() to properly deal with scenarios where the remoteproc core needs to attach with a remote processor that has already been booted by an external entity. Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Tested-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-16remoteproc: Refactor function rproc_boot()Mathieu Poirier1-11/+17
Refactor function rproc_boot() to properly deal with scenarios where the remoteproc core needs to attach with a remote processor that has already been booted by an external entity. Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Tested-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-16remoteproc: Introducing function rproc_validate()Mathieu Poirier1-0/+41
Add a new function to assert the general health of the remote processor before handing it to the remoteproc core. Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Arnaud Pouliquen <[email protected]> Tested-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-16remoteproc: Introducing function rproc_actuate()Mathieu Poirier1-1/+58
Introduce function rproc_actuate() that provides the same functionatlity as rproc_fw_boot(), but without the steps that involve interaction with the firmware image. That way we can deal with scenarios where the remoteproc core is attaching to a remote processor that has already been started by another entity. Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Arnaud Pouliquen <[email protected]> Tested-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-16remoteproc: Introducing function rproc_attach()Mathieu Poirier1-0/+42
Introducing function rproc_attach() to enact the same actions as rproc_start(), but without the steps related to the handling of a firmware image. That way we can properly deal with scenarios where the remoteproc core needs to attach with a remote processsor that has been booted by another entity. Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Tested-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-16remoteproc: Add new attach() remoteproc operationMathieu Poirier2-0/+10
Add an new attach() operation in order to properly deal with scenarios where the remoteproc core needs to attach to a remote processor that has been booted by another entity. Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Tested-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-16remoteproc: Add new RPROC_DETACHED stateMathieu Poirier2-1/+5
Add a new RPROC_DETACHED state to take into account scenarios where the remoteproc core needs to attach to a remote processor that is booted by another entity. Signed-off-by: Mathieu Poirier <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Tested-by: Arnaud Pouliquen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-16remoteproc: qcom_q6v5_mss: Monitor MSS_STATUS for boot completionSibi Sankar1-6/+6
On secure devices there exists a race condition which could lock the MSS CONFIG AHB bus thus preventing access to BOOT_STATUS register during SSR. Switch to polling the MSS_STATUS register with an additional 10 us delay to reliably track boot completion. Signed-off-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-16remoteproc: qcom: pil-info: Fix shift overflowBjorn Andersson1-1/+1
On platforms with 32-bit phys_addr_t the shift to get the upper word of the base address of the memory region is invalid. Cast the base to 64 bit to resolv this. Fixes: 549b67da660d ("remoteproc: qcom: Introduce helper to store pil info in IMEM") Tested-by: Nathan Chancellor <[email protected]> # build Reported-by: Lee Jones <[email protected]> Reported-by: Nathan Chancellor <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-15remoteproc: qcom_sysmon: Solve function header bitrot issuesLee Jones1-2/+2
Looks as though 'name' has now been moved into 'struct sysmod_event' which is passed in instead. However, the parameter descriptions were not updated at the same time. Let's do that now. Fixes the following W=1 kernel build warning(s): drivers/remoteproc/qcom_sysmon.c:78: warning: Function parameter or member 'event' not described in 'sysmon_send_event' drivers/remoteproc/qcom_sysmon.c:78: warning: Excess function parameter 'name' description in 'sysmon_send_event' drivers/remoteproc/qcom_sysmon.c:350: warning: Function parameter or member 'event' not described in 'ssctl_send_event' drivers/remoteproc/qcom_sysmon.c:350: warning: Excess function parameter 'name' description in 'ssctl_send_event' Cc: Andy Gross <[email protected]> Cc: [email protected] Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-15remoteproc: remoteproc_core: Use 'gnu_printf' format notationLee Jones1-0/+3
Fixes the following W=1 kernel build warning(s): drivers/remoteproc/remoteproc_core.c: In function ‘rproc_find_carveout_by_name’: drivers/remoteproc/remoteproc_core.c:257:2: warning: function ‘rproc_find_carveout_by_name’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 257 | vsnprintf(_name, sizeof(_name), name, args); | ^~~~~~~~~ drivers/remoteproc/remoteproc_core.c: In function ‘rproc_mem_entry_init’: drivers/remoteproc/remoteproc_core.c:993:2: warning: function ‘rproc_mem_entry_init’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 993 | vsnprintf(mem->name, sizeof(mem->name), name, args); | ^~~~~~~~~ drivers/remoteproc/remoteproc_core.c: In function ‘rproc_of_resm_mem_entry_init’: drivers/remoteproc/remoteproc_core.c:1029:2: warning: function ‘rproc_of_resm_mem_entry_init’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 1029 | vsnprintf(mem->name, sizeof(mem->name), name, args); | ^~~~~~~~~ Cc: Brian Swetland <[email protected]> Cc: Mark Grosen <[email protected]> Cc: Guzman Lugo <[email protected]> Cc: Suman Anna <[email protected]> Cc: Robert Tivy <[email protected]> Cc: De Leon <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-13remoteproc: qcom: Add missing slab.hKefeng Wang1-0/+1
drivers/remoteproc/qcom_common.c: In function 'qcom_ssr_get_subsys': drivers/remoteproc/qcom_common.c:210:9: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration] info = kzalloc(sizeof(*info), GFP_KERNEL); ^~~~~~~ vzalloc kzalloc() is declared in linux/slab.h, add include to fix build issue. Tested-by: Alex Elder <[email protected]> Reported-by: Hulk Robot <[email protected]> Signed-off-by: Kefeng Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-08remoteproc: qcom: Add notification types to SSRRishabh Bhatnagar2-1/+59
The SSR subdevice only adds callback for the unprepare event. Add callbacks for prepare, start and prepare events. The client driver for a particular remoteproc might be interested in knowing the status of the remoteproc while undergoing SSR, not just when the remoteproc has finished shutting down. Reviewed-by: Alex Elder <[email protected]> Signed-off-by: Siddharth Gupta <[email protected]> Signed-off-by: Rishabh Bhatnagar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-08remoteproc: qcom: Add per subsystem SSR notificationRishabh Bhatnagar3-20/+95
Currently there is a single notification chain which is called whenever any remoteproc shuts down. This leads to all the listeners being notified, and is not an optimal design as kernel drivers might only be interested in listening to notifications from a particular remoteproc. Create a global list of remoteproc notification info data structures. This will hold the name and notifier_list information for a particular remoteproc. The API to register for notifications will use name argument to retrieve the notification info data structure and the notifier block will be added to that data structure's notification chain. Also move from blocking notifier to srcu notifer based implementation to support dynamic notifier head creation. Reviewed-by: Alex Elder <[email protected]> Co-developed-by: Siddharth Gupta <[email protected]> Signed-off-by: Siddharth Gupta <[email protected]> Signed-off-by: Rishabh Bhatnagar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-01remoteproc: qcom: Update PIL relocation info on loadBjorn Andersson6-12/+55
Update the PIL relocation information in IMEM with information about where the firmware for various remoteprocs are loaded. Reviewed-by: Vinod Koul <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-01remoteproc: qcom: Introduce helper to store pil info in IMEMBjorn Andersson4-0/+142
A region in IMEM is used to communicate load addresses of remoteproc to post mortem debug tools. Implement a helper function that can be used to store this information in order to enable these tools to process collected ramdumps. Reviewed-by: Mathieu Poirier <[email protected]> Reviewed-by: Vinod Koul <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-01dt-bindings: remoteproc: Add Qualcomm PIL info bindingBjorn Andersson1-0/+44
Add a devicetree binding for the Qualcomm peripheral image loader relocation information region found in the IMEM. Reviewed-by: Mathieu Poirier <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Reviewed-by: Vinod Koul <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-01Revert "remoteproc: Add support for runtime PM"Mathieu Poirier1-16/+1
This reverts commit a99a37f6cd5a74d5b22c08544aa6c5890813c8ba. Removing PM runtime operations from the remoteproc core in order to: 1) Keep all power management operations in platform drivers. That way we do not loose flexibility in an area that is very HW specific. 2) Avoid making the support for remote processor managed by external entities more complex that it already is. 3) Fix regression introduced for the Omap remoteproc driver. Acked-by: Suman Anna <[email protected]> Tested-by: Suman Anna <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-07-01remoteproc: ingenic: Move clock handling to prepare/unprepare callbacksMathieu Poirier1-58/+26
This patch moves clock related operations to the remoteproc prepare() and unprepare() callbacks so that the PM runtime framework doesn't have to be involved needlessly. This provides a simpler approach and requires less code. Based on the work from Paul Cercueil published here: https://lore.kernel.org/linux-remoteproc/[email protected]/ Reviewed-by: Suman Anna <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2020-06-14Linux 5.8-rc1Linus Torvalds1-2/+2
2020-06-14Merge tag 'LSM-add-setgid-hook-5.8-author-fix' of ↵Linus Torvalds5-1/+40
git://github.com/micah-morton/linux Pull SafeSetID update from Micah Morton: "Add additional LSM hooks for SafeSetID SafeSetID is capable of making allow/deny decisions for set*uid calls on a system, and we want to add similar functionality for set*gid calls. The work to do that is not yet complete, so probably won't make it in for v5.8, but we are looking to get this simple patch in for v5.8 since we have it ready. We are planning on the rest of the work for extending the SafeSetID LSM being merged during the v5.9 merge window" * tag 'LSM-add-setgid-hook-5.8-author-fix' of git://github.com/micah-morton/linux: security: Add LSM hooks to set*gid syscalls
2020-06-14security: Add LSM hooks to set*gid syscallsThomas Cedeno5-1/+40
The SafeSetID LSM uses the security_task_fix_setuid hook to filter set*uid() syscalls according to its configured security policy. In preparation for adding analagous support in the LSM for set*gid() syscalls, we add the requisite hook here. Tested by putting print statements in the security_task_fix_setgid hook and seeing them get hit during kernel boot. Signed-off-by: Thomas Cedeno <[email protected]> Signed-off-by: Micah Morton <[email protected]>