Fixes previous change for ASYNC tasks.
By mistake it didn't take into account provided timeout.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
In dw_dma_start() .lli_current cannot be NULL. If it were NULL, lines
following the check, would cause a NULL-pointer dereference. Remove
the superfluous check.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Use different build folder for gcc and xcc build.
Will auto selected if ROM build is not supported for the platform,
thus make -a -r can work.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
The system-runtime zone on CAVS system is suitable for DMA, add the
capability to heap descriptors.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Currently only the runtime zone has several heaps with different
capabilities on some systems. So that if a memory allocation request
is made from that zone, a suitable heap is selected. Additionally,
if the request cannot be satisfied from the runtime heap, an attempt
is made to satisfy it from the buffer heap. The other two zones -
system and system-runtime - have per-core heaps with identical
capabilities. If the request to one of those zones cannot be
satisfied from it, no attempt is made to allocate memory from a
different zone. Supposedly because of this determinism no capability
check is performed. This is wrong, since if capabilities don't match
it should be assumed, that the obtained memory will not be suitable
for the designated purpose. This patch adds the missing checks.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The block allocation algorithm, as implemented in _balloc(), is first
trying to find a single free memory block to satisfy the request. If
that fails it is then trying to allocate several blocks in a
sequence. That part is implemented wrongly. It can end up allocating
multiple such block sequences, and not using but leaking them
instead. This patch first simplifies the search for a single suitable
buffer, then fixes the leakage.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
In _balloc() if no heap was found, no need to jump to a location in
the function, where a potentially successful allocation is still
being processed, jump directly to the unlock-and-return point.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
bzero() doesn't check its pointer argument for NULL, the caller has
to avoid such calls.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
If we found a busy block among the potential sequence of blocks, that
we were trying to allocate, no need to retry the attempt from the
next starting block, unless it was the first block, that was busy. It
is enough to resume searching from the next block after the busy one.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Enable checks to all supported platforms of QEMU now.
Check both IPC header regs and memory window IPC message header.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This is to prevent FW from getting stuck in case of anomalous
situations such as DMA taking too long to copy the data.
Signed-off-by: Slawomir Blauciak <slawomir.blauciak@linux.intel.com>
Trace show large blocks infrequently used. Decrease usage count so we
can increase buffer heap.
TODO: Large block could be completely removed and we could be allocated
from buffer heap instead.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>