From 306d806d4a7f22804d848f79b09ce700588abc8d Mon Sep 17 00:00:00 2001 From: June Tate-Gans Date: Wed, 13 Apr 2022 18:19:36 +0000 Subject: [PATCH] Merge "handle additional condition syntax in generators" GitOrigin-RevId: f6b7f62233602191b02becd1d6873a1472b5831a --- .../kata-os-common/src/sel4-sys/tools/invocation_header_gen.py | 3 +++ .../kata-os-common/src/sel4-sys/tools/syscall_stub_gen.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/apps/system/components/kata-os-common/src/sel4-sys/tools/invocation_header_gen.py b/apps/system/components/kata-os-common/src/sel4-sys/tools/invocation_header_gen.py index 51b0303..ed37582 100755 --- a/apps/system/components/kata-os-common/src/sel4-sys/tools/invocation_header_gen.py +++ b/apps/system/components/kata-os-common/src/sel4-sys/tools/invocation_header_gen.py @@ -66,6 +66,9 @@ def parse_xml(xml_file): if condition == "(!defined CONFIG_KERNEL_MCS) && CONFIG_MAX_NUM_NODES > 1": # NB: CONFIG_MAX_NUM_NODES > 1 =>'s CONFIG_SMP_SUPPORT condition = 'all(not(feature = "CONFIG_KERNEL_MCS"), feature = "CONFIG_SMP_SUPPORT")' + elif condition == "!defined(CONFIG_KERNEL_MCS) && CONFIG_MAX_NUM_NODES > 1": + # NB: CONFIG_MAX_NUM_NODES > 1 =>'s CONFIG_SMP_SUPPORT + condition = 'all(not(feature = "CONFIG_KERNEL_MCS"), feature = "CONFIG_SMP_SUPPORT")' elif condition == "CONFIG_MAX_NUM_NODES > 1": condition = 'feature = "CONFIG_SMP_SUPPORT"' elif condition: diff --git a/apps/system/components/kata-os-common/src/sel4-sys/tools/syscall_stub_gen.py b/apps/system/components/kata-os-common/src/sel4-sys/tools/syscall_stub_gen.py index c410e93..8e9ac6f 100644 --- a/apps/system/components/kata-os-common/src/sel4-sys/tools/syscall_stub_gen.py +++ b/apps/system/components/kata-os-common/src/sel4-sys/tools/syscall_stub_gen.py @@ -1017,6 +1017,9 @@ def generate_stub_file(arch, wordsize, input_files, output_file, use_only_ipc_bu if condition == "(!defined CONFIG_KERNEL_MCS) && CONFIG_MAX_NUM_NODES > 1": # NB: CONFIG_MAX_NUM_NODES > 1 =>'s CONFIG_SMP_SUPPORT condition = 'all(not(feature = "CONFIG_KERNEL_MCS"), feature = "CONFIG_SMP_SUPPORT")' + elif condition == "!defined(CONFIG_KERNEL_MCS) && CONFIG_MAX_NUM_NODES > 1": + # NB: CONFIG_MAX_NUM_NODES > 1 =>'s CONFIG_SMP_SUPPORT + condition = 'all(not(feature = "CONFIG_KERNEL_MCS"), feature = "CONFIG_SMP_SUPPORT")' elif condition == "CONFIG_MAX_NUM_NODES > 1": condition = 'feature = "CONFIG_SMP_SUPPORT"' elif condition: