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

target/riscv: avoid unnecessary dcsr.ebreak* update on reset #1154

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

en-sc
Copy link
Collaborator

@en-sc en-sc commented Oct 24, 2024

There is no need to change if dcsr.ebreak* fields after a reset if a user requested a configuration that will result dcsr.ebreak* field values equal to reset values.

Change-Id: I2844d30aef8f735c7b37394ee422e9b3f04a2e3b

@en-sc en-sc self-assigned this Oct 24, 2024
static bool dcsr_ebreak_config_equals_reset_value(const struct target *target)
{
RISCV_INFO(r);
return !(r->riscv_ebreakm || r->riscv_ebreaks || r->riscv_ebreaks);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate riscv_ebreaks, should be riscv_ebreaku.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huge thanks for the catch!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed.

There is no need to change if `dcsr.ebreak*` fields after a reset if a
user requested a configuration that will result `dcsr.ebreak*` field
values equal to reset values.

Change-Id: I2844d30aef8f735c7b37394ee422e9b3f04a2e3b
Signed-off-by: Evgeniy Naydanov <[email protected]>
@en-sc en-sc force-pushed the en-sc/dcsr-ebreak-halt-on-reset branch from 8b844f3 to 3fe20e7 Compare October 25, 2024 14:27
Copy link
Collaborator

@JanMatCodasip JanMatCodasip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you.

@en-sc en-sc merged commit f9a1292 into riscv-collab:riscv Oct 30, 2024
4 checks passed
@en-sc en-sc deleted the en-sc/dcsr-ebreak-halt-on-reset branch October 30, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants