| 9b003e14 | 15-May-2024 |
Jay Buddhabhatti <jay.buddhabhatti@amd.com> |
drivers: soc: xilinx: check return status of get_api_version()
Currently return status is not getting checked for get_api_version and because of that for x86 arch we are getting below smatch error.
drivers: soc: xilinx: check return status of get_api_version()
Currently return status is not getting checked for get_api_version and because of that for x86 arch we are getting below smatch error.
CC drivers/soc/xilinx/zynqmp_power.o drivers/soc/xilinx/zynqmp_power.c: In function 'zynqmp_pm_probe': drivers/soc/xilinx/zynqmp_power.c:295:12: warning: 'pm_api_version' is used uninitialized [-Wuninitialized] 295 | if (pm_api_version < ZYNQMP_PM_VERSION) | ^ CHECK drivers/soc/xilinx/zynqmp_power.c drivers/soc/xilinx/zynqmp_power.c:295 zynqmp_pm_probe() error: uninitialized symbol 'pm_api_version'.
So, check return status of pm_get_api_version and return error in case of failure to avoid checking uninitialized pm_api_version variable.
Fixes: b9b3a8be28b3 ("firmware: xilinx: Remove eemi ops for get_api_version") Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240515112345.24673-1-jay.buddhabhatti@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
show more ...
|
| 494c55a1 | 25-Apr-2024 |
Ronak Jain <ronak.jain@amd.com> |
firmware: xilinx: Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h
Move FIRMWARE_VERSION_MASK macro to xlnx-zynqmp.h so that other drivers can use it for verifying the supported firmware version.
Signed
firmware: xilinx: Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h
Move FIRMWARE_VERSION_MASK macro to xlnx-zynqmp.h so that other drivers can use it for verifying the supported firmware version.
Signed-off-by: Ronak Jain <ronak.jain@amd.com> Signed-off-by: Anand Ashok Dumbre <anand.ashok.dumbre@amd.com> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> Link: https://lore.kernel.org/r/20240425095913.919390-1-ronak.jain@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
show more ...
|
| fcf544ac | 24-Apr-2024 |
Jay Buddhabhatti <jay.buddhabhatti@amd.com> |
soc: xilinx: Add cb event for subsystem restart
Add support to register subsystem restart events from firmware for Versal and Versal NET platforms. This event is received when firmware requests for
soc: xilinx: Add cb event for subsystem restart
Add support to register subsystem restart events from firmware for Versal and Versal NET platforms. This event is received when firmware requests for subsystem restart. After receiving this event, the kernel needs to be restarted.
Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com> Link: https://lore.kernel.org/r/20240424124900.29287-1-jay.buddhabhatti@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
show more ...
|
| 87fda1ac | 07-Dec-2023 |
Naman Trivedi Manojbhai <naman.trivedimanojbhai@amd.com> |
soc: xilinx: Add error message for invalid payload received from IPI callback.
payload[0] of response buffer of zynqmp_pm_get_callback_data() contains valid payload or error code in case of error.
soc: xilinx: Add error message for invalid payload received from IPI callback.
payload[0] of response buffer of zynqmp_pm_get_callback_data() contains valid payload or error code in case of error.
Added error message to inform user about the error code received in payload[0].
Signed-off-by: Naman Trivedi Manojbhai <naman.trivedimanojbhai@amd.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/85749bde3e71148533d31ea2092f4514ec347768.1701962639.git.michal.simek@amd.com
show more ...
|
| 8c016c80 | 29-Nov-2023 |
Jay Buddhabhatti <jay.buddhabhatti@amd.com> |
drivers: soc: xilinx: Fix error message on SGI registration failure
Failure to register SGI for firmware event notification is non-fatal error when feature is not supported by other modules such as
drivers: soc: xilinx: Fix error message on SGI registration failure
Failure to register SGI for firmware event notification is non-fatal error when feature is not supported by other modules such as Xen and TF-A. Add _info level log message for such special case.
Also add XST_PM_INVALID_VERSION error code and map it to -EOPNOSUPP Linux kernel error code. If feature is not supported or EEMI API version is mismatch, firmware can return XST_PM_INVALID_VERSION = 4 or XST_PM_NO_FEATURE = 19 error code.
Co-developed-by: Tanmay Shah <tanmay.shah@amd.com> Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com> Link: https://lore.kernel.org/r/20231129112713.22718-5-jay.buddhabhatti@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| 9c6724ab | 27-Oct-2023 |
Tanmay Shah <tanmay.shah@xilinx.com> |
soc: xilinx: fix unhandled SGI warning message
Xen broadcasts SGI to each VM when multiple VMs run on Xen hypervisor. In such case spurious SGI is expected if one event is registered by one VM and n
soc: xilinx: fix unhandled SGI warning message
Xen broadcasts SGI to each VM when multiple VMs run on Xen hypervisor. In such case spurious SGI is expected if one event is registered by one VM and not registered by another VM. We let users know that Unhandled SGI is not error and expected if kernel is running on Xen hypervisor.
Signed-off-by: Tanmay Shah <tanmay.shah@xilinx.com> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> Link: https://lore.kernel.org/r/1698431039-2734260-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
show more ...
|
| 4c0afac2 | 27-Oct-2023 |
Michal Simek <michal.simek@xilinx.com> |
soc: xilinx: fix quoted string split across lines
Fix checkpatch warning "quoted string split across lines". No functional change.
Signed-off-by: Michal Simek <michal.simek@amd.com> Signed-off-by:
soc: xilinx: fix quoted string split across lines
Fix checkpatch warning "quoted string split across lines". No functional change.
Signed-off-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> Link: https://lore.kernel.org/r/1698430295-2731040-1-git-send-email-radhey.shyam.pandey@amd.com
show more ...
|
| daed80ed | 27-Oct-2023 |
HariBabu Gattem <haribabu.gattem@xilinx.com> |
soc: xilinx: Fix for call trace due to the usage of smp_processor_id()
When preemption is enabled in kernel and if any task which can be preempted should not use smp_processor_id() directly, since C
soc: xilinx: Fix for call trace due to the usage of smp_processor_id()
When preemption is enabled in kernel and if any task which can be preempted should not use smp_processor_id() directly, since CPU switch can happen at any time, the previous value of cpu_id differs with current cpu_id. As a result we see the below call trace during xlnx_event_manager_probe.
[ 6.140197] dump_backtrace+0x0/0x190 [ 6.143884] show_stack+0x18/0x40 [ 6.147220] dump_stack_lvl+0x7c/0xa0 [ 6.150907] dump_stack+0x18/0x34 [ 6.154241] check_preemption_disabled+0x124/0x134 [ 6.159068] debug_smp_processor_id+0x20/0x2c [ 6.163453] xlnx_event_manager_probe+0x48/0x250
To protect cpu_id, It is recommended to use get_cpu()/put_cpu() to disable preemption, get the cpu_id and enable preemption respectively. (For Reference, Documentation/locking/preempt-locking.rst and Documentation/kernel-hacking/hacking.rst)
Use preempt_disable()/smp_processor_id()/preempt_enable() API's to achieve the same.
Signed-off-by: HariBabu Gattem <haribabu.gattem@xilinx.com> Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com> Link: https://lore.kernel.org/r/20231027055622.21544-1-jay.buddhabhatti@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
show more ...
|
| 746db5d0 | 03-Aug-2023 |
Ruan Jinjie <ruanjinjie@huawei.com> |
soc: xilinx: Do not check for 0 return after calling platform_get_irq()
There is no possible for platform_get_irq() to return 0. Use the return value from platform_get_irq().
Signed-off-by: Ruan Ji
soc: xilinx: Do not check for 0 return after calling platform_get_irq()
There is no possible for platform_get_irq() to return 0. Use the return value from platform_get_irq().
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> Link: https://lore.kernel.org/r/20230803104807.814005-3-ruanjinjie@huawei.com Signed-off-by: Michal Simek <michal.simek@amd.com>
show more ...
|
| c6cb31b9 | 04-Aug-2023 |
Rob Herring <robh@kernel.org> |
soc: xilinx: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of
soc: xilinx: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230803-dt-header-cleanups-for-soc-v2-22-d8de2cc88bff@kernel.org Signed-off-by: Michal Simek <michal.simek@amd.com>
show more ...
|