arch/x86: (Intel64) add z_arch_curr_cpu() to enable CONFIG_SMP=y
And set qemu_x86_long board to build with CONFIG_SMP=y by default. Apparently two benchmark tests - latency_measure and sys_kernel - do not work with the SMP scheduler, so those tests are disabled. Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This commit is contained in:
parent
cc9be2e982
commit
8d97750eef
5 changed files with 18 additions and 0 deletions
|
@ -15,6 +15,17 @@ static inline void z_arch_kernel_init(void)
|
|||
/* nothing */;
|
||||
}
|
||||
|
||||
static inline struct _cpu *z_arch_curr_cpu(void)
|
||||
{
|
||||
struct _cpu *cpu;
|
||||
|
||||
__asm__ volatile("movq %%gs:(%c1), %0"
|
||||
: "=r" (cpu)
|
||||
: "i" (offsetof(x86_tss64_t, cpu)));
|
||||
|
||||
return cpu;
|
||||
}
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#endif /* ZEPHYR_ARCH_X86_INCLUDE_INTEL64_KERNEL_ARCH_FUNC_H_ */
|
||||
|
|
|
@ -12,7 +12,11 @@
|
|||
#include <ia32/kernel_arch_func.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#define z_arch_is_in_isr() (z_arch_curr_cpu()->nested != 0U)
|
||||
#else
|
||||
#define z_arch_is_in_isr() (_kernel.nested != 0U)
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
|
|
|
@ -14,3 +14,4 @@ CONFIG_UART_CONSOLE=y
|
|||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=25000000
|
||||
CONFIG_TEST_RANDOM_GENERATOR=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_SMP=y
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
tests:
|
||||
benchmark.latency:
|
||||
arch_whitelist: x86 arm posix
|
||||
platform_exclude: qemu_x86_long
|
||||
filter: CONFIG_PRINTK
|
||||
tags: benchmark
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
tests:
|
||||
benchmark.kernel:
|
||||
arch_exclude: nios2 riscv32 xtensa x86_64
|
||||
platform_exclude: qemu_x86_long
|
||||
min_ram: 32
|
||||
tags: benchmark
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue