Skip to content
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

[TEST] zephyr cache API change 68140 + SMP restore revert 68366 #8824

Closed
wants to merge 4 commits into from

Conversation

dcpleung and others added 3 commits January 31, 2024 21:02
This uses arch_cpu_start() instead of arch_start_cpu() as it has
been renamed to align with the CPU namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
(cherry picked from commit b22ce6d)
This changes the seconday core power up routine to use the newly
introduced k_smp_cpu_start() and k_smp_cpu_resume(). This removes
the need to mirror part of the SMP start up code from Zephyr, and
no longer need to call into Zephyr private kernel code.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
(cherry picked from commit 11c251a)
Use system cache API instead of soc specific calls.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit 0606152)
@marc-hb marc-hb changed the title [TEST] zephyr cache API change 68140 + SMP restore revert 68366 [SKIP SOF-TEST] zephyr cache API change 68140 + SMP restore revert 68366 Jan 31, 2024
@marc-hb marc-hb force-pushed the test-zephyr-cache-68140 branch from 7984437 to 98d036f Compare January 31, 2024 21:27
@marc-hb marc-hb changed the title [SKIP SOF-TEST] zephyr cache API change 68140 + SMP restore revert 68366 zephyr cache API change 68140 + SMP restore revert 68366 Jan 31, 2024
@marc-hb marc-hb changed the title zephyr cache API change 68140 + SMP restore revert 68366 [TEST] zephyr cache API change 68140 + SMP restore revert 68366 Jan 31, 2024
@marc-hb
Copy link
Collaborator Author

marc-hb commented Jan 31, 2024

sparse fails like this:
https://github.com/thesofproject/sof/actions/runs/7732598763/job/21082874053?pr=8824
https://github.com/thesofproject/sof/actions/runs/7732850057/job/21083702745?pr=8824

include/zephyr/arch/cache.h:345:6: error: symbol 'arch_cache_cached_ptr_get' redeclared with different type (different address spaces):
include/zephyr/arch/cache.h:348:6: error: symbol 'arch_cache_uncached_ptr_get' redeclared with different type (incompatible argument 1 (different address spaces)):
include/zephyr/arch/cache.h:345:6: error: symbol 'arch_cache_cached_ptr_get' redeclared with different type (different address spaces):
include/zephyr/arch/cache.h:348:6: error: symbol 'arch_cache_uncached_ptr_get' redeclared with different type (incompatible argument 1 (different address spaces)):
include/zephyr/arch/cache.h:345:6: error: symbol 'arch_cache_cached_ptr_get' redeclared with different type (different address spaces):
include/zephyr/arch/cache.h:348:6: error: symbol 'arch_cache_uncached_ptr_get' redeclared with different type (incompatible argument 1 (different address spaces)):
include/zephyr/arch/cache.h:345:6: error: symbol 'arch_cache_cached_ptr_get' redeclared with different type (different address spaces):
include/zephyr/arch/cache.h:348:6: error: symbol 'arch_cache_uncached_ptr_get' redeclared with different type (incompatible argument 1 (different address spaces)):

@marc-hb
Copy link
Collaborator Author

marc-hb commented Jan 31, 2024

SOFCI TEST

west.yml Outdated
# DNM: testing cache API change
# https://github.com/zephyrproject-rtos/zephyr/pull/68140
# + revert / fix 68366
revision: 5a9866b1f7bc08f8aa7eb4cec4cf46ddf91448ba
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@marc-hb
Copy link
Collaborator Author

marc-hb commented Jan 31, 2024

panic in https://sof-ci.01.org/sofpr/PR8824/build2489/devicetest/index.html?model=MTLP_RVP_NOCODEC&testcase=check-playback-10sec

Simpler "CODEC" configurations are fine.

[  225.338151] <inf> ll_schedule: zephyr_domain_thread_fn: ll core 0 timer avg 1670, max 2843, overruns 0
[  226.362151] <inf> ll_schedule: zephyr_domain_thread_fn: ll core 0 timer avg 1669, max 2838, overruns 0
[  227.380251] <inf> ipc: ipc_cmd: rx	: 0x48000000|0x12
[  227.386156] <inf> ll_schedule: zephyr_domain_thread_fn: ll core 0 timer avg 1670, max 2856, overruns 0
ASSERTION FAIL [!z_smp_cpu_mobile()] @ ZEPHYR_BASE/subsys/pm/pm.c:133
[  227.452223] <err> os: print_fatal_exception:  ** FATAL EXCEPTION
[  227.452231] <err> os: print_fatal_exception:  ** CPU 0 EXCCAUSE 63 (zephyr exception)
[  227.452248] <err> os: print_fatal_exception:  **  PC 0xa00659bf VADDR (nil)
[  227.452255] <err> os: print_fatal_exception:  **  PS 0x60020
[  227.452260] <err> os: print_fatal_exception:  **    (INTLEVEL:0 EXCM: 0 UM:1 RING:0 WOE:1 OWB:0 CALLINC:2)
[  227.452265] <err> os: xtensa_dump_stack:  **  A0 0xa0063fdc  SP 0xa0108710  A2 0x4  A3 0xa0108720
[  227.452271] <err> os: xtensa_dump_stack:  **  A4 0xa0108700  A5 0x4  A6 0xfffbfff0  A7 0x4
[  227.452276] <err> os: xtensa_dump_stack:  **  A8 0xa0063f26  A9 0xa01086a0 A10 0xa00d609b A11 0xa0108720
[  227.452283] <err> os: xtensa_dump_stack:  ** A12 0xa0108700 A13 0x4 A14 (nil) A15 0xffffffff
[  227.452288] <err> os: xtensa_dump_stack:  ** LBEG 0xa00365e5 LEND 0xa00365f4 LCOUNT 0xa006482b
[  227.452293] <err> os: xtensa_dump_stack:  ** SAR 0x1e

Backtrace:0xa00659bc:0xa0108710 0xa0063fd9:0xa0108720 0xa0036c5c:0xa0108740 0xa00370f7:0xa0108770 0xa0083527:0xa0108790 0xa0063faf:0xa01087b0 


[  227.452370] <err> os: z_fatal_error: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
[  227.452378] <err> os: z_fatal_error: Current thread: 0x4010c030 (unknown)
[  227.454586] <err> coredump_error: coredump_mem_window_backend_start: #CD:BEGIN#
[  227.454750] <err> coredump_error: coredump_mem_window_backend_end: #CD:END#
[  227.454865] <err> zephyr: k_sys_fatal_error_handler: Halting system

NOCODEC configurations also failing in https://sof-ci.01.org/sofpr/PR8824/build2490/devicetest/index.html?model=TGLU_RVP_NOCODEC-ipc4&testcase=check-playback-3times, same looking panic.

@marc-hb
Copy link
Collaborator Author

marc-hb commented Jan 31, 2024

The pattern of HW tests that failed is very similar to the results of this other, slightly different test PR:
#8823 (comment)

However this one has a panic backtrace, the other one has not.

The other one does not have the cache API change. It has other fixes.

Test Zephyr cache API 68140 + pick SMP revert 68366

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb marc-hb force-pushed the test-zephyr-cache-68140 branch from 1cd6dbe to 42d39f1 Compare January 31, 2024 23:51
Copy link
Collaborator Author

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

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

Much fewer sparse warnings with new commit 42d39f1 but still quite a few:

https://github.com/thesofproject/sof/actions/runs/7733940349/job/21086994035?pr=8824

...
include/zephyr/cache.h:511:16: warning: incorrect type in return expression (different address spaces)
include/zephyr/cache.h:511:16: warning: incorrect type in return expression (different address spaces)
include/zephyr/cache.h:511:16: warning: incorrect type in return expression (different address spaces)
include/zephyr/cache.h:511:16: warning: incorrect type in return expression (different address spaces)
include/zephyr/cache.h:511:16: warning: incorrect type in return expression (different address spaces)
include/zephyr/cache.h:535:16: warning: incorrect type in argument 1 (different address spaces)
soc/xtensa/intel_adsp/common/boot_complete.c:25:43: warning: incorrect type in argument 1 (different address spaces)
include/zephyr/cache.h:535:16: warning: incorrect type in argument 1 (different address spaces)
subsys/debug/coredump/coredump_backend_intel_adsp_mem_window.c:27:9: warning: incorrect type in argument 1 (different address spaces)
subsys/debug/coredump/coredump_backend_intel_adsp_mem_window.c:48:55: warning: incorrect type in argument 1 (different address spaces)
subsys/debug/coredump/coredump_backend_intel_adsp_mem_window.c:49:48: warning: incorrect type in argument 1 (different address spaces)
include/zephyr/cache.h:535:16: warning: incorrect type in argument 1 (different address spaces)
include/zephyr/cache.h:535:16: warning: incorrect type in argument 1 (different address spaces)
include/zephyr/cache.h:535:16: warning: incorrect type in argument 1 (different address spaces)
drivers/console/winstream_console.c:81:45: warning: incorrect type in argument 1 (different address spaces)
include/zephyr/cache.h:535:16: warning: incorrect type in argument 1 (different address spaces)
...

# DNM: testing cache API change
# https://github.com/zephyrproject-rtos/zephyr/pull/68140
# + revert / fix 68366
revision: 5daaa64245d6b226efd2ef2571c409a689a958e2
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@marc-hb marc-hb mentioned this pull request Feb 1, 2024
@marc-hb
Copy link
Collaborator Author

marc-hb commented Feb 1, 2024

Similar panics with newer commit 42d39f1 in CAVS https://sof-ci.01.org/sofpr/PR8824/build2497/devicetest/index.html and ACE https://sof-ci.01.org/sofpr/PR8824/build2496/devicetest/index.html. This time one soundwire configuration paniced too.

@marc-hb marc-hb closed this Feb 13, 2024
@marc-hb marc-hb deleted the test-zephyr-cache-68140 branch February 13, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants