<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/powerpc/utils.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-06-19T07:36:28+00:00</updated>
<entry>
<title>selftests/powerpc/dexcr: Add hashst/hashchk test</title>
<updated>2023-06-19T07:36:28+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-06-19T07:36:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bdb07f35a52f40c461c7da06ddcbaca1950fb9e0'/>
<id>urn:sha1:bdb07f35a52f40c461c7da06ddcbaca1950fb9e0</id>
<content type='text'>
Test the kernel DEXCR[NPHIE] interface and hashchk exception handling.

Introduces with it a DEXCR utils library for common DEXCR operations.

Volatile is used to prevent the compiler optimising away the signal
tests.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230616034846.311705-11-bgray@linux.ibm.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Allow bind_to_cpu() to automatically pick CPU</title>
<updated>2023-04-20T03:21:45+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-04-06T04:33:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ff4dc25483f3f49d1db48af28d4c485fc77bd21'/>
<id>urn:sha1:6ff4dc25483f3f49d1db48af28d4c485fc77bd21</id>
<content type='text'>
All current users of bind_to_cpu() don't care _which_ CPU they get, just
that they are bound to a single free one. So alter the interface to

	1. Accept a BIND_CPU_ANY value that tells it to automatically
	   pick a CPU
	2. Return the picked CPU

And convert all these users to bind_to_cpu(BIND_CPU_ANY).

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230406043320.125138-4-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Move bind_to_cpu() to utils.h</title>
<updated>2023-04-20T03:21:45+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-04-06T04:33:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c97b2fc6627e1c26a3a84633e135322918a1e592'/>
<id>urn:sha1:c97b2fc6627e1c26a3a84633e135322918a1e592</id>
<content type='text'>
This function will be useful in the DSCR test patches later in this
series, so promote it to be shared by all powerpc selftests.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230406043320.125138-3-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Add automatically allocating read_file</title>
<updated>2023-02-09T12:56:45+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-02-03T00:39:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8d7253dc447473dfcf3f09fb0fa2bd6f7d05b43b'/>
<id>urn:sha1:8d7253dc447473dfcf3f09fb0fa2bd6f7d05b43b</id>
<content type='text'>
A couple of tests roll their own auto-allocating file read logic.

Add a generic implementation and convert them to use it.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20230203003947.38033-6-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Add {read,write}_{long,ulong}</title>
<updated>2023-02-09T12:56:45+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-02-03T00:39:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c20de57888f0962e25a0eeec1a59c98056fc42e'/>
<id>urn:sha1:5c20de57888f0962e25a0eeec1a59c98056fc42e</id>
<content type='text'>
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 &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20230203003947.38033-5-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Parse long/unsigned long value safely</title>
<updated>2023-02-09T12:56:45+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-02-03T00:39:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d1bc05b7bf02f8635fe6c445f67d78f85234cbb7'/>
<id>urn:sha1:d1bc05b7bf02f8635fe6c445f67d78f85234cbb7</id>
<content type='text'>
Often a file is expected to hold an integral value. Existing functions
will use a C stdlib function like atoi or strtol to parse the file.
These operations are error prone, with complicated error conditions
(atoi returns 0 if not a number, and is undefined behaviour if not in
range. strtol returns 0 if not a number, and LONG_MIN/MAX if not in
range + sets errno to ERANGE).

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20230203003947.38033-4-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Add read/write debugfs file, int</title>
<updated>2023-02-09T12:56:45+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-02-03T00:39:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=121d340be9a17ed89d523c56203908c01e09a306'/>
<id>urn:sha1:121d340be9a17ed89d523c56203908c01e09a306</id>
<content type='text'>
Debugfs files are not always integers, so make *_file return/write a
byte buffer, and *_int deal with int values specifically. This increases
consistency with the other file read/write helpers.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Reviewed-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20230203003947.38033-3-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Add generic read/write file util</title>
<updated>2023-02-09T12:56:45+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-02-03T00:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a974f0c131891027fe8490e654a220151b4caa82'/>
<id>urn:sha1:a974f0c131891027fe8490e654a220151b4caa82</id>
<content type='text'>
File read/write is reimplemented in about 5 different ways in the
various PowerPC selftests. This indicates it should be a common util.

Add a common read_file / write_file implementation and convert users
to it where (easily) possible.

Signed-off-by: Benjamin Gray &lt;bgray@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20230203003947.38033-2-bgray@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Move set_dscr() into rfi_flush.c</title>
<updated>2020-09-08T12:23:57+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2020-08-19T01:57:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d89002397cfb2b65267d6688fe671ee1cf7c5f0d'/>
<id>urn:sha1:d89002397cfb2b65267d6688fe671ee1cf7c5f0d</id>
<content type='text'>
This version of set_dscr() was added for the RFI flush test, and is
fairly specific to it. It also clashes with the version of set_dscr()
in dscr/dscr.h. So move it into the RFI flush test where it's used.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200819015727.1977134-3-mpe@ellerman.id.au
</content>
</entry>
<entry>
<title>selftests/powerpc: Make using_hash_mmu() work on Cell &amp; PowerMac</title>
<updated>2020-09-08T12:23:51+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2020-08-19T01:57:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=34c103342be3f9397e656da7c5cc86e97b91f514'/>
<id>urn:sha1:34c103342be3f9397e656da7c5cc86e97b91f514</id>
<content type='text'>
These platforms don't show the MMU in /proc/cpuinfo, but they always
use hash, so teach using_hash_mmu() that.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200819015727.1977134-1-mpe@ellerman.id.au
</content>
</entry>
</feed>
