arch: Fix CPU on/off race condition and prevent device hang#7170
Open
ewoodev wants to merge 1 commit intoSamsung:masterfrom
Open
arch: Fix CPU on/off race condition and prevent device hang#7170ewoodev wants to merge 1 commit intoSamsung:masterfrom
ewoodev wants to merge 1 commit intoSamsung:masterfrom
Conversation
When up_cpu_die is called via SGI3 but up_cpu_on fails, the system currently returns an error. This causes the scheduler to perceive the CPU as alive when it is actually dead. If up_cpu_off is called again in this state, the CPU receiving SGI3 is in die state, resulting in a deadlock. Therefore, when up_cpu_down fails, up_cpu_on must be called again to reactivate the CPU. Additionally, calling up_cpu_on twice leads to psci_cpu_on being invoked twice, which can cause device hang. To prevent this, psci_affinity_info is now used to check CPU state before calling psci_cpu_on. Signed-off-by: eunwoo.nam <eunwoo.nam@samsung.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When up_cpu_die is called via SGI3 but up_cpu_on fails, the system currently returns an error. This causes the scheduler to perceive the CPU as alive when it is actually dead. If up_cpu_off is called again in this state, the CPU receiving SGI3 is in die state, resulting in a deadlock.
Therefore, when up_cpu_down fails, up_cpu_on must be called again to reactivate the CPU.
Additionally, calling up_cpu_on twice leads to psci_cpu_on being invoked twice, which can cause device hang. To prevent this, psci_affinity_info is now used to check CPU state before calling psci_cpu_on.