linux/arch/powerpc
Naveen N. Rao 8eaa481dfb powerpc/64s: Handle data breakpoints in Radix mode
commit d89ba5353f upstream.

On Power9, trying to use data breakpoints throws the splat shown
below. This is because the check for a data breakpoint in DSISR is in
do_hash_page(), which is not called when in Radix mode.

  Unable to handle kernel paging request for data at address 0xc000000000e19218
  Faulting instruction address: 0xc0000000001155e8
  cpu 0x0: Vector: 300 (Data Access) at [c0000000ef1e7b20]
  pc: c0000000001155e8: find_pid_ns+0x48/0xe0
  lr: c000000000116ac4: find_task_by_vpid+0x44/0x90
  sp: c0000000ef1e7da0
  msr: 9000000000009033
  dar: c000000000e19218
  dsisr: 400000

Move the check to handle_page_fault() so as to catch data breakpoints
in both Hash and Radix MMU modes.

We have to change the check in do_hash_page() against 0xa410 to use
0xa450, so as to include the value of (DSISR_DABRMATCH << 16).

There are two sites that call handle_page_fault() when in Radix, both
already pass DSISR in r4.

Fixes: caca285e5a ("powerpc/mm/radix: Use STD_MMU_64 to properly isolate hash related code")
Reported-by: Shriya R. Kulkarni <shriykul@in.ibm.com>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
[mpe: Fix the fall-through case on hash, we need to reload DSISR]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-06-29 13:00:29 +02:00
..
boot powerpc/boot: Fix zImage TOC alignment 2017-03-26 13:05:57 +02:00
configs Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next 2016-10-11 20:07:56 +11:00
crypto powerpc/crypto/crc32c-vpmsum: Fix missing preempt_disable() 2017-04-12 12:41:13 +02:00
include powerpc/numa: Fix percpu allocations to be NUMA aware 2017-06-14 15:06:03 +02:00
kernel powerpc/64s: Handle data breakpoints in Radix mode 2017-06-29 13:00:29 +02:00
kvm KVM: PPC: Book3S HV: Context-switch EBB registers properly 2017-06-29 13:00:28 +02:00
lib powerpc: Emulation support for load/store instructions on LE 2017-03-18 19:14:30 +08:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm mm: larger stack guard gap, between vmas 2017-06-24 07:11:18 +02:00
net powerpc/bpf: Add support for bpf constant blinding 2016-10-04 20:33:20 +11:00
oprofile powerpc/sparse: Make a bunch of things static 2016-09-13 17:35:47 +10:00
perf powerpc/perf: Fix oops when kthread execs user process 2017-06-29 13:00:28 +02:00
platforms powerpc/hotplug-mem: Fix missing endian conversion of aa_index 2017-06-14 15:06:03 +02:00
scripts powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel 2016-03-07 14:53:56 +11:00
sysdev powerpc/powernv: Properly set "host-ipi" on IPIs 2017-06-17 06:41:50 +02:00
xmon powerpc/xmon: Don't use ld on 32-bit 2016-09-13 17:37:02 +10:00
Kconfig powerpc/ftrace: Fix confusing help text for DISABLE_MPROFILE_KERNEL 2017-05-14 14:00:14 +02:00
Kconfig.debug powerpc/mm: Catch usage of cpu/mmu_has_feature() before jump label init 2016-08-01 11:15:06 +10:00
Makefile arch/powerpc: Add CONFIG_FSL_DPAA to corenetXX_smp_defconfig 2016-09-25 02:39:01 -05:00
relocs_check.sh powerpc/64: whitelist unresolved modversions CRCs 2016-09-22 14:46:31 +02:00