• Nicholas Piggin's avatar
    powerpc: Don't write to DABR on >= Power8 if DAWR is disabled · 252988cb
    Nicholas Piggin authored
    flush_thread() calls __set_breakpoint() via set_debug_reg_defaults()
    without checking ppc_breakpoint_available(). On Power8 or later CPUs
    which have the DAWR feature disabled that will cause a write to the
    DABR which is incorrect as those CPUs don't have a DABR.
    
    Fix it two ways, by checking ppc_breakpoint_available() in
    set_debug_reg_defaults(), and also by reworking __set_breakpoint() to
    only write to DABR on Power7 or earlier.
    
    Fixes: 96541531 ("powerpc: Disable DAWR in the base POWER9 CPU features")
    Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
    [mpe: Rework the logic in __set_breakpoint()]
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    252988cb
process.c 56.7 KB