-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
intel-adsp: fix ACE power-off assembly #75706
Conversation
A recent commit fb53d2e ("ace: power: replace pseudo-assembly movi") contained a bug: the Xtensa "movi" assembly instruction must be written with the immediate argument already shifted left by 8, the compiler doesn't do that automatically. This still somehow worked on MTL but failed on LNL. Fix both occurrences. Fixes: zephyrproject-rtos#75700 Signed-off-by: Guennadi Liakhovetski <[email protected]>
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.
Test in thesofproject/sof#9294 seems good, so this is better than the revert. Thanks @lyakh !
@@ -38,7 +38,7 @@ | |||
movi \az, 0x2f5 | |||
slli \az, \az, 0xb | |||
/* 8 * (\segment_index << 5) == (\segment_index << 5) << 3 == \segment_index << 8 */ | |||
addmi \az, \az, \segment_index | |||
addmi \az, \az, \segment_index << 8 |
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.
For ACE MAX_MEMORY_SEGMENTS == 1, so segment_index is always 0. And so this shift cannot affect the problem.
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.
@serhiy-katsyuba-intel Ack, the patch affects via LSPGCTL_HIGH which is also passed to addmi. So this change is to just correct all uses of addmi. @lyakh to confirm, but that's how I understood it
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.
correct. This is just a correctness fix, the real fix is the LSPGCTL_HIGH
part
Still not completely fixed? |
A recent commit fb53d2e ("ace: power: replace pseudo-assembly movi") contained a bug: the Xtensa "movi" assembly instruction must be written with the immediate argument already shifted left by 8, the compiler doesn't do that automatically. This still somehow worked on MTL but failed on LNL. Fix both occurrences.
Fixes: #75700
This is an alternative to reverting the offending commit as submitted in #75689