diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2018-07-24 08:53:22 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-10-20 05:26:47 +0300 |
commit | b7683fc66eba91674e52c30f4d8e596bfb5cbcf4 (patch) | |
tree | e724c8201aa93f0d70b86ed37ee47597afefb882 /tools/testing/selftests/powerpc/include/reg.h | |
parent | 0d923962ab69c27cca664a2d535e90ef655110ca (diff) | |
download | linux-b7683fc66eba91674e52c30f4d8e596bfb5cbcf4.tar.xz |
selftests/powerpc: Add a test of wild bctr
This tests that a bctr (Branch to counter and link), ie. a function
call, to a wildly out-of-bounds address is handled correctly.
Some old kernel versions didn't handle it correctly, see eg:
"powerpc/slb: Force a full SLB flush when we insert for a bad EA"
https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-April/157397.html
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing/selftests/powerpc/include/reg.h')
-rw-r--r-- | tools/testing/selftests/powerpc/include/reg.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/include/reg.h b/tools/testing/selftests/powerpc/include/reg.h index 7f348c059bc2..52b4710469d2 100644 --- a/tools/testing/selftests/powerpc/include/reg.h +++ b/tools/testing/selftests/powerpc/include/reg.h @@ -17,6 +17,7 @@ : "memory") #define mb() asm volatile("sync" : : : "memory"); +#define barrier() asm volatile("" : : : "memory"); #define SPRN_MMCR2 769 #define SPRN_MMCRA 770 |