Skip to content
Merged
Show file tree
Hide file tree
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
22 changes: 14 additions & 8 deletions posix/include/rtos/alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,28 @@
* @{
*/

/*
* for compatibility with the initial `flags` meaning
* SOF_MEM_FLAG_ should start at BIT(2)
* the first two positions are reserved for SOF_BUF_ flags
*/

Comment on lines +35 to +40
Copy link
Member

Choose a reason for hiding this comment

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

ok, looks like we need to split out the caps for buffers a tad more.
So @jsarha is working on removing rballoc() to align with a single low level allocator and we need some way for buffer API to handle.
@dbaluta btw - I dont think we have any users of the SOF_BUF_OVERRUN_PERMITTED and SOF_BUF_UNDERRUN_PERMITTED - at least from grepping the topologies - IIRC these were a legacy flag around DMA based scheduling of pipelines (where > 1 DMAs could trigger at the same time). I think we could remove.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@lgirdwood I think this is a slightly better PR: #10228

with less invasive modification.

/** \brief Indicates we should return DMA-able memory. */
#define SOF_MEM_FLAG_DMA BIT(0)
#define SOF_MEM_FLAG_DMA BIT(2)
/** \brief Indicates that original content should not be copied by realloc. */
#define SOF_MEM_FLAG_NO_COPY BIT(1)
#define SOF_MEM_FLAG_NO_COPY BIT(3)
/** \brief Indicates that if we should return uncached address. */
#define SOF_MEM_FLAG_COHERENT BIT(2)
#define SOF_MEM_FLAG_COHERENT BIT(4)
/** \brief Indicates that if we should return L3 address. */
#define SOF_MEM_FLAG_L3 BIT(3)
#define SOF_MEM_FLAG_L3 BIT(5)
/** \brief Indicates that if we should return Low power memory address. */
#define SOF_MEM_FLAG_LOW_POWER BIT(4)
#define SOF_MEM_FLAG_LOW_POWER BIT(6)
/** \brief Indicates that if we should return kernel memory address. */
#define SOF_MEM_FLAG_KERNEL BIT(5)
#define SOF_MEM_FLAG_KERNEL BIT(7)
/** \brief Indicates that if we should return user memory address. */
#define SOF_MEM_FLAG_USER BIT(6)
#define SOF_MEM_FLAG_USER BIT(8)
/** \brief Indicates that if we should return shared user memory address. */
#define SOF_MEM_FLAG_USER_SHARED_BUFFER BIT(7)
#define SOF_MEM_FLAG_USER_SHARED_BUFFER BIT(9)

/** @} */

Expand Down
22 changes: 14 additions & 8 deletions zephyr/include/rtos/alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,32 @@
* @{
*/

/*
* for compatibility with the initial `flags` meaning
* SOF_MEM_FLAG_ should start at BIT(2)
* the first two positions are reserved for SOF_BUF_ flags
*/

/** \name Heap zone flags
* @{
*/

/** \brief Indicates we should return DMA-able memory. */
#define SOF_MEM_FLAG_DMA BIT(0)
#define SOF_MEM_FLAG_DMA BIT(2)
/** \brief Indicates that original content should not be copied by realloc. */
#define SOF_MEM_FLAG_NO_COPY BIT(1)
#define SOF_MEM_FLAG_NO_COPY BIT(3)
/** \brief Indicates that if we should return uncached address. */
#define SOF_MEM_FLAG_COHERENT BIT(2)
#define SOF_MEM_FLAG_COHERENT BIT(4)
/** \brief Indicates that if we should return L3 address. */
#define SOF_MEM_FLAG_L3 BIT(3)
#define SOF_MEM_FLAG_L3 BIT(5)
/** \brief Indicates that if we should return Low power memory address. */
#define SOF_MEM_FLAG_LOW_POWER BIT(4)
#define SOF_MEM_FLAG_LOW_POWER BIT(6)
/** \brief Indicates that if we should return kernel memory address. */
#define SOF_MEM_FLAG_KERNEL BIT(5)
#define SOF_MEM_FLAG_KERNEL BIT(7)
/** \brief Indicates that if we should return user memory address. */
#define SOF_MEM_FLAG_USER BIT(6)
#define SOF_MEM_FLAG_USER BIT(8)
/** \brief Indicates that if we should return shared user memory address. */
#define SOF_MEM_FLAG_USER_SHARED_BUFFER BIT(7)
#define SOF_MEM_FLAG_USER_SHARED_BUFFER BIT(9)

/** @} */

Expand Down
Loading