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

riscv_percpu: Replace critical section with irqsave/irqrestore #15171

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

no1wudi
Copy link
Contributor

@no1wudi no1wudi commented Dec 13, 2024

Summary

Since the SCRATCH register is used to store the percpu pointer, which should not be accessed by other CPUs, we can replace the critical section with irqsave/irqrestore.

Impact

RISCV percpu

Testing

ostest

Since the SCRATCH register is used to store the percpu pointer,
which should not be accessed by other CPUs, we can replace the
critical section with irqsave/irqrestore.

Signed-off-by: Huang Qi <[email protected]>
@github-actions github-actions bot added Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: XS The size of the change in this PR is very small labels Dec 13, 2024
@xiaoxiang781216 xiaoxiang781216 merged commit de5151c into apache:master Dec 13, 2024
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Size: XS The size of the change in this PR is very small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants