OSDN Git Service

selftests/powerpc: Add {read,write}_{long,ulong}
authorBenjamin Gray <bgray@linux.ibm.com>
Fri, 3 Feb 2023 00:39:46 +0000 (11:39 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 9 Feb 2023 12:56:45 +0000 (23:56 +1100)
commit5c20de57888f0962e25a0eeec1a59c98056fc42e
tree94d8ed4b5dedaeb221761e8693ff1399f2fd7af7
parentd1bc05b7bf02f8635fe6c445f67d78f85234cbb7
selftests/powerpc: Add {read,write}_{long,ulong}

Add helper functions to read and write (unsigned) long values directly
from/to files. One of the kernel interfaces uses hex strings, so we need
to allow passing a base too.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230203003947.38033-5-bgray@linux.ibm.com
tools/testing/selftests/powerpc/dscr/dscr.h
tools/testing/selftests/powerpc/dscr/dscr_sysfs_test.c
tools/testing/selftests/powerpc/include/utils.h
tools/testing/selftests/powerpc/pmu/lib.c
tools/testing/selftests/powerpc/utils.c