• Yue Hu's avatar
    arm64: traps: Add str of description to panic() in die() · b4c97124
    Yue Hu authored
    Currently, there are different description strings in die() such as
    die("Oops",,), die("Oops - BUG",,). And panic() called by die() will
    always show "Fatal exception" or "Fatal exception in interrupt".
    
    Note that panic() will run any panic handler via panic_notifier_list.
    And the string above will be formatted and placed in static buf[]
    which will be passed to handler.
    
    So panic handler can not distinguish which Oops it is from the buf if
    we want to do some things like reserve the string in memory or panic
    statistics. It's not benefit to debug. We need to add more codes to
    troubleshoot. Let's utilize existing resource to make debug much simpler.
    Signed-off-by: default avatarYue Hu <huyue2@yulong.com>
    Link: https://lore.kernel.org/r/20200804085347.10720-1-zbestahu@gmail.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
    b4c97124
traps.c 26.1 KB