Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/powerpc: Suggest memtrace instead of /dev/mem for ci memory

The suggested alternative for getting cache-inhibited memory with 'mem='
and /dev/mem is pretty hacky. Also, PAPR guests do not allow system
memory to be mapped cache-inhibited so despite /dev/mem being available
this will not work which can cause confusion. Instead recommend using
the memtrace buffers. memtrace is only available on powernv so there
will not be any chance of trying to do this in a guest.

Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210225032108.1458352-2-jniethe5@gmail.com

authored by

Jordan Niethe and committed by
Michael Ellerman
812aa68e 08a022ad

+1 -10
+1 -10
tools/testing/selftests/powerpc/alignment/alignment_handler.c
··· 10 10 * 11 11 * We create two sets of source and destination buffers, one in regular memory, 12 12 * the other cache-inhibited (by default we use /dev/fb0 for this, but an 13 - * alterative path for cache-inhibited memory may be provided). 14 - * 15 - * One way to get cache-inhibited memory is to use the "mem" kernel parameter 16 - * to limit the kernel to less memory than actually exists. Addresses above 17 - * the limit may still be accessed but will be treated as cache-inhibited. For 18 - * example, if there is actually 4GB of memory and the parameter "mem=3GB" is 19 - * used, memory from address 0xC0000000 onwards is treated as cache-inhibited. 20 - * To access this region /dev/mem is used. The kernel should be configured 21 - * without CONFIG_STRICT_DEVMEM. In this case use: 22 - * ./alignment_handler /dev/mem 0xc0000000 13 + * alterative path for cache-inhibited memory may be provided, e.g. memtrace). 23 14 * 24 15 * We initialise the source buffers, then use whichever set of load/store 25 16 * instructions is under test to copy bytes from the source buffers to the