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

intel-adsp: fix ACE power-off assembly #75706

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions soc/intel/intel_adsp/ace/asm_memory_management.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

/* These definitions should be placed elsewhere, but I can't find a good place for them. */
#define LSPGCTL 0x71D80
#define LSPGCTL_HIGH (LSPGCTL >> 12)
#define LSPGCTL_HIGH ((LSPGCTL >> 4) & 0xff00)
#define LSPGCTL_LOW ((LSPGCTL >> 4) & 0xff)
#define MAX_MEMORY_SEGMENTS 1
#define EBB_SEGMENT_SIZE 32
Expand All @@ -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
Copy link
Collaborator

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.

Copy link
Collaborator

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

Copy link
Collaborator Author

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


movi \au, i_end - 1 /* au = banks count in segment */
2 :
Expand Down
Loading