Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick in-kernel pd-mapper patches and enable it #28

Merged
merged 7 commits into from
Apr 27, 2024

Conversation

minlexx
Copy link
Member

@minlexx minlexx commented Apr 26, 2024

Testing for issue #27

lumag and others added 7 commits April 26, 2024 14:28
If the service locator server is restarted fast enough, the PDR can
rewrite locator_addr fields concurrently. Protect them by placing
modification of those fields under the main pdr->lock.

Fixes: fbe639b ("soc: qcom: Introduce Protection Domain Restart helpers")
Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD
Signed-off-by: Dmitry Baryshkov <[email protected]>
While parsing the domains list, start offsets from 0 rather than from
domains_read. The domains_read is equal to the total count of the
domains we have seen, while the domains list in the message starts from
offset 0.

Fixes: fbe639b ("soc: qcom: Introduce Protection Domain Restart helpers")
Signed-off-by: Dmitry Baryshkov <[email protected]>
The in-kernel PD mapper is going to use same message structures as the
QCOM_PDR_HELPERS module. Extract message marshalling data to separate
module that can be used by both PDR helpers and by PD mapper.

Reviewed-by: Bryan O'Donoghue <[email protected]>
Signed-off-by: Dmitry Baryshkov <[email protected]>
Add qmi_del_server(), a pair to qmi_add_server(), a way to remove
running server from the QMI socket. This is e.g. necessary for
pd-mapper, which needs to readd a server each time the DSP is started or
stopped.

Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD
Signed-off-by: Dmitry Baryshkov <[email protected]>
Existing userspace protection domain mapper implementation has several
issue. It doesn't play well with CONFIG_EXTRA_FIRMWARE, it doesn't
reread JSON files if firmware location is changed (or if firmware was
not available at the time pd-mapper was started but the corresponding
directory is mounted later), etc.

Provide in-kernel service implementing protection domain mapping
required to work with several services, which are provided by the DSP
firmware.

This module is loaded automatically by the remoteproc drivers when
necessary via the symbol dependency. It uses a root node to match a
protection domains map for a particular board. It is not possible to
implement it as a 'driver' as there is no corresponding device.

Signed-off-by: Dmitry Baryshkov <[email protected]>
Request in-kernel protection domain mapper to be started before starting
Qualcomm DSP and release it once DSP is stopped. Once all DSPs are
stopped, the PD mapper will be stopped too.

Signed-off-by: Dmitry Baryshkov <[email protected]>
@minlexx
Copy link
Member Author

minlexx commented Apr 26, 2024

@minlexx minlexx force-pushed the qcom-sdm660-6.8.y-pdmapper branch from 0ad6fbc to f5c0663 Compare April 27, 2024 18:13
@minlexx minlexx merged commit 6dcfb16 into qcom-sdm660-6.8.y Apr 27, 2024
1 check passed
@minlexx minlexx deleted the qcom-sdm660-6.8.y-pdmapper branch April 27, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants