Repository navigation
Add panic info into panic dump and fix some issues to make code build - #423
Conversation
The register PS will always be changed due to the IRQ disable. Store the old PS and dump that value. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Include dma.h in alloc.h will cause some error, remove the unneeded dma.h and add some need header after remove it. Also move some helper function into alloc.c to avoid some warnings. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
clk will use timer function, add timer.h include for it. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
platform_panic is defined in platform/platform.h empty define in sof/platform.h is no use Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Use sof_ipc_panic_info to store panic info inclueded filename and line number. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Add filename and line number of the panic call into the panic info. Then dump this info to host. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
|
@lgirdwood |
| void free_heap(int zone); | ||
|
|
||
| /* flush block map from cache to sram */ | ||
| static inline void flush_block_map(struct block_map *map) |
There was a problem hiding this comment.
What error, please include error this fixes in commit message.
There was a problem hiding this comment.
That will be very long list.
Since I add
#include <sof/alloc.h>
in panic.h
I just fixed the related header to have these patches.
I will list the errors later.
There was a problem hiding this comment.
@xiulipan I dont need a list of errors, but just something similar to "fixes build error for target X caused by missing header Y" will do.
There was a problem hiding this comment.
@lgirdwood
So I need to modify the comments?
| #include <string.h> | ||
| #include <stdint.h> | ||
| #include <sof/bit.h> | ||
| #include <sof/dma.h> |
There was a problem hiding this comment.
- alloc: fix some build issues in alloc
In file included from ../../src/include/sof/alloc.h:38,
from ../../src/include/sof/panic.h:35,
from /home/pxl/work/sof/sof/src/arch/xtensa/include/arch/wait.h:33,
from ../../src/include/sof/wait.h:38,
from ../../src/include/sof/schedule.h:41,
from /home/pxl/work/sof/sof/src/arch/xtensa/include/arch/task.h:41,
from ../../src/include/sof/task.h:34,
from init.c:36:
../../src/include/sof/dma.h:291:2: error: unknown type name 'completion_t'
completion_t complete;
| #include <stdint.h> | ||
| #include <sof/bit.h> | ||
| #include <sof/dma.h> | ||
| #include <sof/platform.h> |
There was a problem hiding this comment.
../../src/include/sof/alloc.h:89:31: error: 'PLATFORM_DCACHE_ALIGN' undeclared here (not in a function); did you mean 'PLATFORM_HEAP_RUNTIME'?
} attribute ((aligned(PLATFORM_DCACHE_ALIGN)));
^~~~~~~~~~~~~~~~~~~~~
PLATFORM_HEAP_RUNTIME
PLATFORM_DCACHE_ALIGN is defined in sof/platform.h
| #include <sof/dma.h> | ||
| #include <sof/platform.h> | ||
| #include <platform/memory.h> | ||
| #include <arch/spinlock.h> |
There was a problem hiding this comment.
../../src/include/sof/alloc.h:113:2: error: unknown type name 'spinlock_t'
spinlock_t lock; /* all allocs and frees are atomic */
spinlock_t is defined in arch/spinlock.h
| /* flush block map from cache to sram */ | ||
| static inline void flush_block_map(struct block_map *map) | ||
| { | ||
| dcache_writeback_invalidate_region(map->block, |
There was a problem hiding this comment.
../../src/include/sof/alloc.h: In function 'flush_block_map':
../../src/include/sof/alloc.h:144:2: error: implicit declaration of function 'dcache_writeback_invalidate_region' [-Werror=implicit-function-declaration]
dcache_writeback_invalidate_region(map->block,
This function is only a helper function for alloc.c
No need to be in header.
| int platform_init(struct sof *sof); | ||
|
|
||
| /** | ||
| * \brief Called by the panic handler. |
There was a problem hiding this comment.
../../src/include/sof/platform.h:76:20: error: 'platform_panic' declared 'static' but never defined [-Werror=unused-function]
static inline void platform_panic(uint32_t p);
platform_panic is defined in platform/platform.h
Redeclared here
|
|
||
| #include <sof/lock.h> | ||
| #include <sof/trace.h> | ||
| #include <sof/wait.h> |
There was a problem hiding this comment.
/home/pxl/work/sof/sof/src/platform/intel/include/platform/cavs/pm_runtime.h:57:3: error: implicit declaration of function 'wait_delay'; did you mean 'init_heap'? [-Werror=implicit-function-declaration]
wait_delay(PLATFORM_FORCE_L1_EXIT_TIME);
wait_delay is defined in sof/wait.h
| #include <platform/timer.h> | ||
| #include <platform/platform.h> | ||
| #include <platform/clk.h> | ||
| #include <sof/drivers/timer.h> |
There was a problem hiding this comment.
agent.c:58:18: error: implicit declaration of function 'platform_timer_get'; did you mean 'platform_init'? [-Werror=implicit-function-declaration]
sa->last_idle = platform_timer_get(platform_timer);
platform_timer_get is defined in sof/drivers/timer.h
|
@lrgirdwo |
|
@xiulipan modifying one include that is included by others or included in a different order in other files may have some knock on effects if there are missing declaration or dependencies. It seem you have fixed one. |
Work with thesofproject/linux#162