cmake: remove unused code

- SLOTS cannot be less than MAX_IRQ
- remove helper variable MAX_IRQ

Signed-off-by: Axel Heider <axelheider@gmx.de>
This commit is contained in:
Axel Heider
2022-03-12 09:46:50 +01:00
committed by Kent McLeod
parent 0c9952f90a
commit d14d6c2139

View File

@@ -48,10 +48,9 @@ set_property(
# These options are now set in seL4Config.cmake
if(DEFINED CALLED_declare_default_headers)
# calculate the irq cnode size based on MAX_IRQ
# calculate the irq cnode size based on MAX_NUM_IRQ
if("${KernelArch}" STREQUAL "riscv")
set(MAX_IRQ "${CONFIGURE_PLIC_MAX_NUM_INT}")
math(EXPR MAX_NUM_IRQ "${MAX_IRQ} + 2")
math(EXPR MAX_NUM_IRQ "${CONFIGURE_PLIC_MAX_NUM_INT} + 2")
else()
if(
DEFINED KernelMaxNumNodes
@@ -71,10 +70,6 @@ if(DEFINED CALLED_declare_default_headers)
math(EXPR BITS "${BITS} + 1")
math(EXPR MAX_NUM_IRQ "${MAX_NUM_IRQ} >> 1")
endwhile()
math(EXPR SLOTS "1 << ${BITS}")
if("${SLOTS}" LESS "${MAX_IRQ}")
math(EXPR BITS "${BITS} + 1")
endif()
set(CONFIGURE_IRQ_SLOT_BITS "${BITS}" CACHE INTERNAL "")
if(NOT DEFINED CONFIGURE_TIMER_PRECISION)
set(CONFIGURE_TIMER_PRECISION "0")