• Vineet Gupta's avatar
    ARC: entry: Add more common chores to EXCEPTION_PROLOGUE · 13347c10
    Vineet Gupta authored
    THe high level structure of most ARC exception handlers is
     1. save regfile with EXCEPTION_PROLOGUE
     2. setup r0: EFA (not part of pt_regs)
     3. setup r1: pointer to pt_regs (SP)
     4. drop down to pure kernel mode (from exception)
     5. call the Linux "C" handler
    
    Remove the boiler plate code by moving #2, #3, #4 into #1.
    
    The exceptions to most exceptions are syscall Trap and Machine check
    which don't do some of above for various reasons, so call a newly
    introduced variant EXCEPTION_PROLOGUE_KEEP_AE (same as original
    EXCEPTION_PROLOGUE)
    Tested-by: default avatarPavel Kozlov <Pavel.Kozlov@synopsys.com>
    Signed-off-by: default avatarVineet Gupta <vgupta@kernel.org>
    13347c10
entry-arcv2.S 6.92 KB