-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
@zhuyanlinzyl do you have possibility to address comments this week? |
We are in Spring Festival and come back to work in the next week. |
@masayuki2009 @pkarashchenko I update a new patch, please review again. Use sub loop instead of add loop And it work well in sabrelite qemu. |
hi, pkarashchenko ,
`And` is right, as it is `&=`
`Add` is wrong, I fix it in new patch.
You can review in this PR
#5367
________________________________
From: Petro Karashchenko ***@***.***>
Sent: 07 February 2022 16:50
To: apache/incubator-nuttx
Cc: 朱琰琳; Mention
Subject: [External Mail]Re: [apache/incubator-nuttx] armv7-r/a: bugfix: save and restore a4 register in xxx_dcache_all.S (PR #5367)
*This message originated from outside of XIAOMI. Please treat this email with caution*
@pkarashchenko commented on this pull request.
________________________________
In arch/arm/src/armv7-a/cp15_clean_dcache_all.S<#5367 (comment)>:
ldr r3, =0x7fff /* Isolate the NumSets field (bits 13-27) */
and r0, r3, r0, lsr #13 /* r0=NumSets (number of sets - 1) */
ldr r3, =0x3ff /* Isolate the way field (bits 3-12) */
- add r4, r3, r0, lsr #3 /* r4=(number of ways - 1) */
+ add r4, r3, r4, lsr #3 /* r4=(number of ways - 1) */
I see that comment about and vs add is not answered. I would appreciate if author can write here the answer
―
Reply to this email directly, view it on GitHub<#5367 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AU6JSNI4BU6KATB5KL5K6CLUZ6BTZANCNFSM5NAJOP4A>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
|
Did you test with your board (I think Xiaomi uses dual Cortex-A7-based board) as well? |
@masayuki2009 Yes, I test in our smp a7 board, this patch can work |
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? */ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sub
and bne
only loop 3times.
I use subs
and bcs
, It should loop 4times.
I update the patch. please review agian.
2a98707
to
27ca8d3
Compare
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 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhuyanlinzyl
subs
?
There was a problem hiding this comment.
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]>
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