• Ambroise Vincent's avatar
    arm: gicv3: Fix compiler dependent behavior · d0196911
    Ambroise Vincent authored
    
    
    C99 standard: "What constitutes an access to an object that has
    volatile-qualified type is implementation-defined".
    
    GCC is not considering the cast to void of volatile structures as an
    access and so is not actually issuing reads.
    
    Clang does read those structures by copying them on the stack, which in
    this case creates an overflow because of their large size.
    
    This patch removes the cast to void and instead uses the USED attribute
    to tell the compiler to retain the static variables.
    
    Change-Id: I952b5056e3f6e91841e7ef9558434352710ab80d
    Signed-off-by: default avatarAmbroise Vincent <ambroise.vincent@arm.com>
    	       Zelalem Aweke <zelalem.aweke@arm.com>
    d0196911
utils.h 2.95 KB