Skip to content

tests: gpio: it8xxx2_v2: include arch_interface.h in cpu.h shim - #117392

Merged
nashif merged 1 commit into
zephyrproject-rtos:mainfrom
nashif:topic/tests/it8xxx2_gpio_cpu_shim
Aug 26, 2026
Merged

tests: gpio: it8xxx2_v2: include arch_interface.h in cpu.h shim#117392
nashif merged 1 commit into
zephyrproject-rtos:mainfrom
nashif:topic/tests/it8xxx2_gpio_cpu_shim

Conversation

@nashif

@nashif nashif commented Aug 26, 2026

Copy link
Copy Markdown
Member

The test replaces zephyr/arch/cpu.h with a shim that includes
posix/arch.h directly. Since irq.h gained the inline k_irq_* wrappers
that call arch_irq_lock() and friends, the shim breaks the build: the
posix arch header pulls in irq.h before it defines those functions,
and the real cpu.h only avoids this by including arch_interface.h,
which declares the arch_irq_* prototypes, ahead of the arch header.

Mirror the real cpu.h in the shim: include arch_interface.h first and
add the matching include guard, which is needed because
arch_interface.h includes cpu.h back. The hand-written dynamic
interrupt prototypes are provided by arch_interface.h, so drop them.

Signed-off-by: Anas Nashif anas.nashif@intel.com

The test replaces zephyr/arch/cpu.h with a shim that includes
posix/arch.h directly. Since irq.h gained the inline k_irq_* wrappers
that call arch_irq_lock() and friends, the shim breaks the build: the
posix arch header pulls in irq.h before it defines those functions,
and the real cpu.h only avoids this by including arch_interface.h,
which declares the arch_irq_* prototypes, ahead of the arch header.

Mirror the real cpu.h in the shim: include arch_interface.h first and
add the matching include guard, which is needed because
arch_interface.h includes cpu.h back. The hand-written dynamic
interrupt prototypes are provided by arch_interface.h, so drop them.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
@nashif nashif added the Hotfix Fix for issues blocking development, i.e. upstream CI issues, tests failing in upstream CI , etc. label Aug 26, 2026
@zephyrbot zephyrbot added area: GPIO area: Tests Issues related to a particular existing or missing test labels Aug 26, 2026
@nashif
nashif requested a review from a team August 26, 2026 09:45
@nashif
nashif merged commit 64100f6 into zephyrproject-rtos:main Aug 26, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: GPIO area: Tests Issues related to a particular existing or missing test Hotfix Fix for issues blocking development, i.e. upstream CI issues, tests failing in upstream CI , etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants