Skip to content

Commit

Permalink
tests: Add IPI_OPTIMIZE tests
Browse files Browse the repository at this point in the history
Adds several tests to verify that IPIs can be appropriately
targeted to specific CPUs.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
  • Loading branch information
peter-mitsis committed Jun 4, 2024
1 parent 4dd8ddd commit 23dc390
Show file tree
Hide file tree
Showing 6 changed files with 521 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/kernel/ipi_optimize/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(smp)

target_sources(app PRIVATE src/main.c)

target_include_directories(app PRIVATE
${ZEPHYR_BASE}/kernel/include
${ZEPHYR_BASE}/arch/${ARCH}/include
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2022 Carlo Caione <ccaione@baylibre.com>
# SPDX-License-Identifier: Apache-2.0

CONFIG_MP_MAX_NUM_CPUS=4
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Copyright 2022 Carlo Caione <ccaione@baylibre.com>
* SPDX-License-Identifier: Apache-2.0
*/

/ {
cpus {
cpu@2 {
device_type = "cpu";
compatible = "arm,cortex-a53";
reg = <2>;
};

cpu@3 {
device_type = "cpu";
compatible = "arm,cortex-a53";
reg = <3>;
};
};
};
5 changes: 5 additions & 0 deletions tests/kernel/ipi_optimize/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CONFIG_ZTEST=y
CONFIG_SMP=y
CONFIG_TRACE_SCHED_IPI=y
CONFIG_IPI_OPTIMIZE=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=50
Loading

0 comments on commit 23dc390

Please sign in to comment.