kernel_optimize_test/arch/powerpc
Michael Ellerman a2ceff5e55 [POWERPC] Fix missed hardware breakpoints across multiple threads
There is a bug in the powerpc DABR (data access breakpoint) handling,
which can result in us missing breakpoints if several threads are trying
to break on the same address.

The circumstances are that do_page_fault() calls do_dabr(), this clears
the DABR (sets it to 0) and sets up the signal which will report to
userspace that the DABR was hit. The do_signal() code will restore the DABR
value on the way out to userspace.

If we reschedule before calling do_signal(), __switch_to() will check the
cached DABR value and compare it to the new thread's value, if they match
we don't set the DABR in hardware.

So if two threads have the same DABR value, and we schedule from one to
the other after taking the interrupt for the first thread hitting the DABR,
the second thread will run without the DABR set in hardware.

The cleanest fix is to move the cache update into set_dabr(), that way we
can't forget to do it.

Reported-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-28 22:51:02 +11:00
..
boot [POWERPC] mpc5200: Fix incorrect compatible string for the mdio node 2008-03-25 13:18:39 +11:00
configs [POWERPC] update pasemi_defconfig 2008-03-25 10:28:26 -05:00
kernel [POWERPC] Fix missed hardware breakpoints across multiple threads 2008-03-28 22:51:02 +11:00
lib [POWERPC] rheap: Changes config mechanism 2007-10-16 17:09:21 -06:00
math-emu [POWERPC] Fix carry bug in 128-bit unsigned integer adding 2008-01-23 19:34:21 -06:00
mm [POWERPC] Don't use 64k pages for ioremap on pSeries 2008-03-24 17:41:22 +11:00
oprofile [POWERPC] OProfile: enable callgraph support for Cell 2008-03-03 08:03:14 +01:00
platforms [POWERPC] Hide resources on Axon PCIE root complex nodes 2008-03-20 10:15:13 +11:00
sysdev [POWERPC] Fix Oops with TQM5200 on TQM5200 2008-03-24 17:55:51 +11:00
xmon [POWERPC] Make setjmp/longjmp code usable outside of xmon 2008-01-25 22:52:50 +11:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
Kconfig Kprobes: indicate kretprobe support in Kconfig 2008-03-04 16:35:11 -08:00
Kconfig.debug [POWERPC] 4xx: Base support for 440GX Taishan eval board 2007-12-23 13:13:33 -06:00
Makefile [POWERPC] Fix zImage-dtb.initrd build error 2008-03-13 10:09:26 +11:00