• David S. Miller's avatar
    sparc64: Fix bootup regressions on some Kconfig combinations. · 40fd3377
    David S. Miller authored
    [ Upstream commit 49fa5230 ]
    
    The system call tracing bug fix mentioned in the Fixes tag
    below increased the amount of assembler code in the sequence
    of assembler files included by head_64.S
    
    This caused to total set of code to exceed 0x4000 bytes in
    size, which overflows the expression in head_64.S that works
    to place swapper_tsb at address 0x408000.
    
    When this is violated, the TSB is not properly aligned, and
    also the trap table is not aligned properly either.  All of
    this together results in failed boots.
    
    So, do two things:
    
    1) Simplify some code by using ba,a instead of ba/nop to get
       those bytes back.
    
    2) Add a linker script assertion to make sure that if this
       happens again the build will fail.
    
    Fixes: 1a40b953 ("sparc: Fix system call tracing register handling.")
    Reported-by: default avatarMeelis Roos <mroos@linux.ee>
    Reported-by: default avatarJoerg Abraham <joerg.abraham@nokia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    40fd3377
cherrs.S 14.9 KB