]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Enable removal of memory for in memory tracing
authorRashmica Gupta <rashmica.g@gmail.com>
Thu, 1 Jun 2017 05:34:38 +0000 (15:34 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Aug 2017 12:14:38 +0000 (22:14 +1000)
commit8d1b3b7817b48c8524c77b82b1c6c99f2304712c
treed7b7336097434b19190e69dc1bf5cbef317c133b
parenta6a972ea16550afb67efc3140c82f940b532e2d0
powerpc/powernv: Enable removal of memory for in memory tracing

The hardware trace macro feature requires access to a chunk of real
memory. This patch provides a debugfs interface to do this. By
writing an integer containing the size of memory to be unplugged into
/sys/kernel/debug/powerpc/memtrace/enable, the code will attempt to
remove that much memory from the end of each NUMA node.

This patch also adds additional debugsfs files for each node that
allows the tracer to interact with the removed memory, as well as
a trace file that allows userspace to read the generated trace.

Note that this patch does not invoke the hardware trace macro, it
only allows memory to be removed during runtime for the trace macro
to utilise.

Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
[mpe: Minor formatting etc fixups]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/Kconfig
arch/powerpc/platforms/powernv/Makefile
arch/powerpc/platforms/powernv/memtrace.c [new file with mode: 0644]