On 16.09.2025 21:35, Dmytro Prokopchuk1 wrote: > > > On 9/16/25 17:27, Jan Beulich wrote: >> On 16.09.2025 14:45, Dmytro Prokopchuk1 wrote: >>> --- a/docs/misra/deviations.rst >>> +++ b/docs/misra/deviations.rst >>> @@ -98,6 +98,23 @@ Deviations related to MISRA C:2012 Rules: >>> even when debug-only assertions like `ASSERT_UNREACHABLE()` are >>> removed. >>> - ECLAIR has been configured to ignore those statements. >>> >>> + * - R2.1 >>> + - In the specific build configuration (when the config CONFIG_ACPI is >>> not >>> + defined) the 'BUG()' macro is intentionally used in the >>> 'prepare_acpi()' >>> + function in the header file >>> 'xen/arch/arm/include/asm/domain_build.h' >>> + defined as 'static inline' to trigger a runtime error if >>> ACPI-related >>> + features are used incorrectly. >>> + - Tagged as `deliberate` for ECLAIR. >> >> I response to me outlining a deviation-less alternative you tried it out >> and said it works. Then why is the deviation still being put in place? > > Yes, that's true. > I started with that prepare_acpi() function and I tried to move it into > xen/include/xen/acpi.h header file under appropriate #ifdef: > https://gitlab.com/xen-project/people/dimaprkp4k/xen/-/commit/d15cf91de92f1f8ec67911c51a13e7f095c1bcdd
But an important part of my proposal was to have no #ifdef around the declaration, iirc. With that, no violation should result. Whether (or why) moving would be required I don't know. Jan