mirror of https://github.com/thesofproject/sof.git
uapi: xtensa: change ar to variable array
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit is contained in:
parent
0c30369f98
commit
b780605eaf
|
@ -26,6 +26,7 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
|
||||
* Janusz Jankowski <janusz.jankowski@linux.intel.com>
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -41,6 +42,10 @@
|
|||
/* architecture specific stack frames to dump */
|
||||
#define ARCH_STACK_DUMP_FRAMES 32
|
||||
|
||||
/* xtensa core specific oops size */
|
||||
#define ARCH_OOPS_SIZE (sizeof(struct sof_ipc_dsp_oops_xtensa) \
|
||||
+ (XCHAL_NUM_AREGS * sizeof(uint32_t)))
|
||||
|
||||
void arch_dump_regs_a(void *dump_buf, uint32_t ps);
|
||||
|
||||
static inline void *arch_get_stack_ptr(void)
|
||||
|
@ -60,7 +65,7 @@ static inline void fill_core_dump(struct sof_ipc_dsp_oops_xtensa *oops,
|
|||
uintptr_t *epc1)
|
||||
{
|
||||
oops->arch_hdr.arch = ARCHITECTURE_ID;
|
||||
oops->arch_hdr.totalsize = sizeof(*oops);
|
||||
oops->arch_hdr.totalsize = ARCH_OOPS_SIZE;
|
||||
#if XCHAL_HW_CONFIGID_RELIABLE
|
||||
oops->plat_hdr.configidhi = XCHAL_HW_CONFIGID0;
|
||||
oops->plat_hdr.configidlo = XCHAL_HW_CONFIGID1;
|
||||
|
@ -85,7 +90,7 @@ static inline void arch_dump_regs(uint32_t ps, uintptr_t stack_ptr,
|
|||
|
||||
fill_core_dump(buf, ps, stack_ptr, epc1);
|
||||
|
||||
dcache_writeback_region(buf, sizeof(struct sof_ipc_dsp_oops_xtensa));
|
||||
dcache_writeback_region(buf, ARCH_OOPS_SIZE);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -76,7 +76,7 @@ struct sof_ipc_dsp_oops_xtensa {
|
|||
uint32_t widnowbase;
|
||||
uint32_t windowstart;
|
||||
uint32_t excsave1;
|
||||
uint32_t ar[XCHAL_NUM_AREGS];
|
||||
uint32_t ar[];
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
|
|
@ -62,8 +62,7 @@ void panic_rewind(uint32_t p, uint32_t stack_rewind_frames,
|
|||
/* disable all IRQs */
|
||||
oldps = interrupt_global_disable();
|
||||
|
||||
ext_offset = (void *)mailbox_get_exception_base() +
|
||||
sizeof(struct sof_ipc_dsp_oops_xtensa);
|
||||
ext_offset = (void *)mailbox_get_exception_base() + ARCH_OOPS_SIZE;
|
||||
|
||||
/* dump panic info, filename ane linenum */
|
||||
dump_panicinfo(ext_offset, panic_info);
|
||||
|
|
Loading…
Reference in New Issue