-
Notifications
You must be signed in to change notification settings - Fork 349
Heap refinement Part2 -- Dw dma fixes #4664
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,11 +130,6 @@ | |
| #define DW_DMA_BUFFER_ALIGNMENT 0x4 | ||
| #define DW_DMA_COPY_ALIGNMENT 0x4 | ||
|
|
||
| /* LLI address alignment, in Bytes */ | ||
| #ifndef DW_DMA_LLI_ALIGN | ||
| #define DW_DMA_LLI_ALIGN 32 | ||
| #endif | ||
|
|
||
| /* TODO: add FIFO sizes */ | ||
| struct dw_chan_data { | ||
| uint16_t class; | ||
|
|
@@ -155,10 +150,10 @@ struct dw_lli { | |
| uint32_t sstat; | ||
| uint32_t dstat; | ||
|
|
||
| /* align to required bytes to make sure every item | ||
| * is aligned in case of more than two items | ||
| /* align to 32 bytes to not cross cache line | ||
| * in case of more than two items | ||
| */ | ||
| uint8_t reserved[DW_DMA_LLI_ALIGN - sizeof(uint32_t) * 7]; | ||
| uint32_t reserved; | ||
|
||
| } __packed; | ||
|
|
||
| extern const struct dma_ops dw_dma_ops; | ||
|
|
||
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.
why does it have to be zeroed? It wasn't zeroed before. If that was causing problems because we expect zeroes somewhere, then that should be fixed explicitly! Otherwise
rmalloc()should do just fine.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.
So you don't need alignment any longer? That seems very odd for hardware descriptors?
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.
@plbossart the rmalloc() internal guarantees the return pointer is PLATFORM_DCACHE_ALIGN aligned, please see the source here:
sof/src/lib/alloc.c
Line 718 in 8fc5247