Nicholas Piggin 252988cbf0 powerpc: Don't write to DABR on >= Power8 if DAWR is disabled
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: 9654153158d3 ("powerpc: Disable DAWR in the base POWER9 CPU features")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Rework the logic in __set_breakpoint()]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-04-03 21:50:08 +10:00
..
2017-11-16 12:47:46 -08:00
2018-04-01 00:47:50 +11:00
2018-01-15 09:35:26 +01:00
2016-08-07 23:50:09 -04:00
2016-08-07 23:50:09 -04:00
2018-02-02 10:01:04 -08:00
2016-08-07 23:50:09 -04:00
2018-02-02 10:01:04 -08:00
2018-03-31 09:09:36 +11:00
2017-12-11 13:03:35 +11:00
2018-02-06 09:59:40 -08:00
2018-02-10 14:08:26 -08:00
2018-04-01 00:47:50 +11:00
2018-03-31 09:09:36 +11:00
2018-03-31 09:09:36 +11:00
2018-03-30 23:34:26 +11:00
2018-03-31 09:09:36 +11:00
2017-11-16 12:47:46 -08:00
2015-04-07 17:15:13 +10:00
2018-02-02 10:01:04 -08:00