• Masahiro Yamada's avatar
    Use #ifdef for AARCH32 instead of #if · 6af03f9c
    Masahiro Yamada authored
    
    
    One nasty part of ATF is some of boolean macros are always defined
    as 1 or 0, and the rest of them are only defined under certain
    conditions.
    
    For the former group, "#if FOO" or "#if !FOO" must be used because
    "#ifdef FOO" is always true.  (Options passed by $(call add_define,)
    are the cases.)
    
    For the latter, "#ifdef FOO" or "#ifndef FOO" should be used because
    checking the value of an undefined macro is strange.
    
    For AARCH32/AARCH64, these macros are defined in the top-level
    Makefile as follows:
    
    ifeq (${ARCH},aarch32)
            $(eval $(call add_define,AARCH32))
    else
            $(eval $(call add_define,AARCH64))
    endif
    
    This means only one of the two is defined.  So, AARCH32/AARCH64
    belongs to the latter group where we should use #ifdef or #ifndef.
    The conditionals are mostly coded correctly, but I see some mistakes.
    Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    6af03f9c
arm_gicv3.c 5.04 KB