| cb1d0f57 | 23-Oct-2024 |
Umang Jain <[email protected]> |
staging: vchiq_arm: Track bulk user data pointer separately
A bulk callback transfer can be initiated from two places - inside kernel interface or from user interface. However, the callback data poi
staging: vchiq_arm: Track bulk user data pointer separately
A bulk callback transfer can be initiated from two places - inside kernel interface or from user interface. However, the callback data pointer 'cb_data' is used for tracking both sets of data pointer. This commit tracks the callback data pointer from user interface (named as 'cb_userdata') separately, in the bulk transfer service callback.
This is esentially done by adding a 'void __user *cb_userdata' for tracking __user pointers in vchiq_bulk and vchiq_completion_data structs. Furthermore, the 'cb_userdata' data pointer is appended to the vchiq_service's callback signature.
Separating the two callback data pointers ('cb_data' and 'cb_userdata') fixes the sparse warnings around mixing userspace and kernel space pointers.
As there are no additional sparse warnings left for vc04_services, drop the relevant entry from the TODO.
Signed-off-by: Umang Jain <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| f23f8a05 | 18-May-2022 |
Adrien Thierry <[email protected]> |
staging: vchiq_arm: pass vchiq instance to 'vchiq_get_service_userdata'
In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' fu
staging: vchiq_arm: pass vchiq instance to 'vchiq_get_service_userdata'
In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as well as to all functions that call 'handle_to_service'. This will allow accessing the vchiq state through the vchiq instance instead of through the global array.
'handle_to_service' is called by 'vchiq_get_service_userdata'. Therefore, pass the vchiq instance reference to it.
Tested-by: Stefan Wahren <[email protected]> Signed-off-by: Adrien Thierry <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| 14780bb1 | 18-May-2022 |
Adrien Thierry <[email protected]> |
staging: vchiq_arm: pass vchiq instance to 'find_service_by_handle'
In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' functi
staging: vchiq_arm: pass vchiq instance to 'find_service_by_handle'
In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as well as to all functions that call 'handle_to_service'. This will allow accessing the vchiq state through the vchiq instance instead of through the global array.
'handle_to_service' is called by 'find_service_by_handle'. Therefore, pass the vchiq instance reference to 'find_service_by_handle' and to its callers.
Tested-by: Stefan Wahren <[email protected]> Signed-off-by: Adrien Thierry <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| 726e79f8 | 18-May-2022 |
Adrien Thierry <[email protected]> |
staging: vchiq_arm: pass vchiq instance to service callbacks
In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as
staging: vchiq_arm: pass vchiq instance to service callbacks
In order to remove the 'vchiq_states' global array, we need to pass the vchiq_instance reference to the 'handle_to_service' function, as well as to all functions that call 'handle_to_service'. This will allow accessing the vchiq state through the vchiq instance instead of through the global array.
'handle_to_service' is called by 'service_callback'. Therefore, pass the vchiq instance reference to 'service_callback'. This also requires adding the vchiq instance reference to the service callbacks prototype, and update all other callbacks accordingly.
Tested-by: Stefan Wahren <[email protected]> Signed-off-by: Adrien Thierry <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|