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

armv7-r/a: bugfix: fix a4 register use but not store in xxx_invalidate/flush/clean_all.S #5367

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

zhuyanlinzyl
Copy link
Contributor

@zhuyanlinzyl zhuyanlinzyl commented Jan 28, 2022

fix a4 register use but not store in xxx_invalidate/flush/clean_all.S

Signed-off-by: zhuyanlin [email protected]

Summary

fix a4 register use but not store in xxx_invalidate/flush/clean_all.S

Impact

Testing

@pkarashchenko
Copy link
Contributor

@zhuyanlinzyl do you have possibility to address comments this week?

@xiaoxiang781216
Copy link
Contributor

We are in Spring Festival and come back to work in the next week.

@zhuyanlinzyl
Copy link
Contributor Author

zhuyanlinzyl commented Feb 7, 2022

@masayuki2009 @pkarashchenko I update a new patch, please review again.

Use sub loop instead of add loop

And it work well in sabrelite qemu.

@zhuyanlinzyl
Copy link
Contributor Author

zhuyanlinzyl commented Feb 7, 2022 via email

@masayuki2009
Copy link
Contributor

@masayuki2009 @pkarashchenko I update a new patch, please review again.

Use sub loop instead of add loop
And it work well in sabrelite qemu.

@zhuyanlinzyl

Did you test with your board (I think Xiaomi uses dual Cortex-A7-based board) as well?

@zhuyanlinzyl
Copy link
Contributor Author

@masayuki2009 Yes, I test in our smp a7 board, this patch can work

@zhuyanlinzyl zhuyanlinzyl changed the title armv7-r/a: bugfix: save and restore a4 register in xxx_dcache_all.S armv7-r/a: bugfix: fix a4 register use but not store in xxx_invalidate/flush/clean_all.S Feb 8, 2022
add r1, r1, #1 /* Increment the way counter */
cmp r4, r1 /* Last way */
sub r1, r1, #1 /* Subtraction the way counter */
cmp r1, #0 /* Last way? */
Copy link
Contributor

Choose a reason for hiding this comment

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

@zhuyanlinzyl
Is this condition correct?
If the number of ways equals 4 (i.e. r1 = 3), it hits only 3times.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@masayuki2009

Yes, sub and bne only loop 3times.
I use subs and bcs , It should loop 4times.

I update the patch. please review agian.

add r1, r1, #1 /* Increment the way counter */
cmp r4, r1 /* Last way */
bne way_loop /* Keep looping if not */
sub r1, r1, #1 /* Subtraction the way counter */
Copy link
Contributor

@masayuki2009 masayuki2009 Feb 8, 2022

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a typ mistake. I fix and update the patch @masayuki2009 .

Use sub loop instead of add loop

Signed-off-by: zhuyanlin <[email protected]>
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.

4 participants