• Arnd Bergmann's avatar
    ARM: 8455/1: define __BUG as asm(BUG_INSTR) without CONFIG_BUG · e9c38ceb
    Arnd Bergmann authored
    Following (a long time after) a4b5d580 ("bug: Make BUG() always stop
    the machine"), this adapts the ARM architecture to no longer rely
    on the sub-optimal BUG() definition that has a silent endless loop
    but instead use the same trapping instruction that we have for
    the full BUG() support.
    
    This avoids hundreds of warnings like
    
    arch/arm/include/asm/xen/page.h: In function 'arbitrary_virt_to_machine':
    arch/arm/include/asm/xen/page.h:85:1: warning: no return statement in function returning non-void [-Wreturn-type]
    
    and also makes the code size slightly smaller. The behavior changes
    from silently stopping the kernel to an oops, and follows what x86
    does these days.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    e9c38ceb
bug.h 2.42 KB