<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/tools/testing/selftests/powerpc/mm, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>selftests/powerpc: Use PKEY_UNRESTRICTED macro</title>
<updated>2025-02-17T18:16:36+00:00</updated>
<author>
<name>Yury Khrustalev</name>
<email>yury.khrustalev@arm.com</email>
</author>
<published>2025-01-13T17:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=00894c3fc91791c742c7724de6b8db1d1e383c16'/>
<id>00894c3fc91791c742c7724de6b8db1d1e383c16</id>
<content type='text'>
Replace literal 0 with macro PKEY_UNRESTRICTED where pkey_*() functions
are used in mm selftests for memory protection keys for ppc target.

Signed-off-by: Yury Khrustalev &lt;yury.khrustalev@arm.com&gt;
Suggested-by: Kevin Brodsky &lt;kevin.brodsky@arm.com&gt;
Reviewed-by: Kevin Brodsky &lt;kevin.brodsky@arm.com&gt;
Link: https://lore.kernel.org/r/20250113170619.484698-4-yury.khrustalev@arm.com
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace literal 0 with macro PKEY_UNRESTRICTED where pkey_*() functions
are used in mm selftests for memory protection keys for ppc target.

Signed-off-by: Yury Khrustalev &lt;yury.khrustalev@arm.com&gt;
Suggested-by: Kevin Brodsky &lt;kevin.brodsky@arm.com&gt;
Reviewed-by: Kevin Brodsky &lt;kevin.brodsky@arm.com&gt;
Link: https://lore.kernel.org/r/20250113170619.484698-4-yury.khrustalev@arm.com
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Remove the path after initialization.</title>
<updated>2024-11-14T11:41:00+00:00</updated>
<author>
<name>zhang jiao</name>
<email>zhangjiao2@cmss.chinamobile.com</email>
</author>
<published>2024-09-30T01:27:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7ca93aa9204b706e4afcd4fae0dc8798500598d5'/>
<id>7ca93aa9204b706e4afcd4fae0dc8798500598d5</id>
<content type='text'>
If there were no anamolies noted, then we can simply remove the log file
and return, but only after the path variable has been initialized.

Signed-off-by: zhang jiao &lt;zhangjiao2@cmss.chinamobile.com&gt;
Reviewed-by: Ritesh Harjani (IBM) &lt;ritesh.list@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20240930012757.2395-1-zhangjiao2@cmss.chinamobile.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there were no anamolies noted, then we can simply remove the log file
and return, but only after the path variable has been initialized.

Signed-off-by: zhang jiao &lt;zhangjiao2@cmss.chinamobile.com&gt;
Reviewed-by: Ritesh Harjani (IBM) &lt;ritesh.list@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20240930012757.2395-1-zhangjiao2@cmss.chinamobile.com
</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Fix 32-bit BE build errors on Ubuntu 24.04</title>
<updated>2024-11-07T11:36:30+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2024-11-06T13:04:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d5f578f90a34d85f1cabd4c27af1b2d9fbffe64b'/>
<id>d5f578f90a34d85f1cabd4c27af1b2d9fbffe64b</id>
<content type='text'>
Starting with Ubuntu 24.04, building the selftests with the big endian
compiler (which defaults to 32-bit) fails with errors:

  stack_expansion_ldst.c:178:37: error: format '%lx' expects argument
  of type 'long unsigned int', but argument 2 has type 'rlim_t' {aka 'long long unsigned int'}
  subpage_prot.c:214:38: error: format '%lx' expects argument of type
  'long unsigned int', but argument 3 has type 'off_t' {aka 'long long int'}

Prior to 24.04 rlim_t was long unsigned int, and off_t was long int.

Cast to unsigned long long and long long before passing to printf to
avoid the errors.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-3-mpe@ellerman.id.au

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Starting with Ubuntu 24.04, building the selftests with the big endian
compiler (which defaults to 32-bit) fails with errors:

  stack_expansion_ldst.c:178:37: error: format '%lx' expects argument
  of type 'long unsigned int', but argument 2 has type 'rlim_t' {aka 'long long unsigned int'}
  subpage_prot.c:214:38: error: format '%lx' expects argument of type
  'long unsigned int', but argument 3 has type 'off_t' {aka 'long long int'}

Prior to 24.04 rlim_t was long unsigned int, and off_t was long int.

Cast to unsigned long long and long long before passing to printf to
avoid the errors.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-3-mpe@ellerman.id.au

</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Give all tests 2 minutes timeout</title>
<updated>2024-11-07T11:36:30+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2024-11-06T13:04:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5543d595954eefb3a6faa18a6dc7b1b3d6022052'/>
<id>5543d595954eefb3a6faa18a6dc7b1b3d6022052</id>
<content type='text'>
Each of the powerpc selftests runs with a timeout of 2 minutes by
default (see tools/testing/selftests/powerpc/harness.c).

But when tests are run with run_kselftest.sh it uses a timeout of 45
seconds, meaning some tests run OK standalone but fail when run with the
test runner.

So tell run_kselftest.sh to give each test 130 seconds, that should
allow the tests to complete, or be killed by the powerpc test harness
after 2 minutes. If for some reason the harness fails, or for the few
tests that don't use the harness, the 130 second timeout should catch
them if they get stuck.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-2-mpe@ellerman.id.au

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Each of the powerpc selftests runs with a timeout of 2 minutes by
default (see tools/testing/selftests/powerpc/harness.c).

But when tests are run with run_kselftest.sh it uses a timeout of 45
seconds, meaning some tests run OK standalone but fail when run with the
test runner.

So tell run_kselftest.sh to give each test 130 seconds, that should
allow the tests to complete, or be killed by the powerpc test harness
after 2 minutes. If for some reason the harness fails, or for the few
tests that don't use the harness, the 130 second timeout should catch
them if they get stuck.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://patch.msgid.link/20241106130453.1741013-2-mpe@ellerman.id.au

</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: make sub-folders buildable on their own</title>
<updated>2024-04-29T13:54:42+00:00</updated>
<author>
<name>Madhavan Srinivasan</name>
<email>maddy@linux.ibm.com</email>
</author>
<published>2024-02-29T09:37:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=108e5e683333615023265a9a73a29d4c2fa16c70'/>
<id>108e5e683333615023265a9a73a29d4c2fa16c70</id>
<content type='text'>
Build breaks when executing make with run_tests for sub-folders
under powerpc. This is because, CFLAGS and GIT_VERSION macros are
defined in Makefile of toplevel powerpc folder.

  make: Entering directory '/home/maddy/linux/tools/testing/selftests/powerpc/mm'
  gcc     hugetlb_vs_thp_test.c ../harness.c ../utils.c  -o /home/maddy/selftest_output//hugetlb_vs_thp_test
  hugetlb_vs_thp_test.c:6:10: fatal error: utils.h: No such file or directory
      6 | #include "utils.h"
        |          ^~~~~~~~~
  compilation terminated.

Fix this by adding the flags.mk in each sub-folder Makefile. Also remove
the CFLAGS and GIT_VERSION macros from powerpc/ folder Makefile since
the same is definied in flags.mk

Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20240229093711.581230-3-maddy@linux.ibm.com

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Build breaks when executing make with run_tests for sub-folders
under powerpc. This is because, CFLAGS and GIT_VERSION macros are
defined in Makefile of toplevel powerpc folder.

  make: Entering directory '/home/maddy/linux/tools/testing/selftests/powerpc/mm'
  gcc     hugetlb_vs_thp_test.c ../harness.c ../utils.c  -o /home/maddy/selftest_output//hugetlb_vs_thp_test
  hugetlb_vs_thp_test.c:6:10: fatal error: utils.h: No such file or directory
      6 | #include "utils.h"
        |          ^~~~~~~~~
  compilation terminated.

Fix this by adding the flags.mk in each sub-folder Makefile. Also remove
the CFLAGS and GIT_VERSION macros from powerpc/ folder Makefile since
the same is definied in flags.mk

Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20240229093711.581230-3-maddy@linux.ibm.com

</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc/selftests: sort mm/.gitignore, add exec_prot</title>
<updated>2023-08-18T07:03:15+00:00</updated>
<author>
<name>Nathan Lynch</name>
<email>nathanl@linux.ibm.com</email>
</author>
<published>2023-08-17T16:21:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ae3a8cc292d01a1558dff837bb485712dfaeb9c6'/>
<id>ae3a8cc292d01a1558dff837bb485712dfaeb9c6</id>
<content type='text'>
Add exec_prot to to mm/.gitignore and sort the result.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230817-powerpc-selftest-misc-v1-1-a84cc1ef78b2@linux.ibm.com

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add exec_prot to to mm/.gitignore and sort the result.

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20230817-powerpc-selftest-misc-v1-1-a84cc1ef78b2@linux.ibm.com

</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Make dd output quiet</title>
<updated>2023-03-30T12:35:43+00:00</updated>
<author>
<name>Benjamin Gray</name>
<email>bgray@linux.ibm.com</email>
</author>
<published>2023-02-28T00:07:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d3cf1662b665f20444a08bff52b6daae912e0d1d'/>
<id>d3cf1662b665f20444a08bff52b6daae912e0d1d</id>
<content type='text'>
dd logs info to stderr by default. This info is pointless in the
selftests and makes legitimate issues harder to spot.

Pass the option to silence the info logs. Actual errors would still be
printed.

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/20230228000709.124727-4-bgray@linux.ibm.com

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dd logs info to stderr by default. This info is pointless in the
selftests and makes legitimate issues harder to spot.

Pass the option to silence the info logs. Actual errors would still be
printed.

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/20230228000709.124727-4-bgray@linux.ibm.com

</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Skip 4PB test on 4K PAGE_SIZE systems</title>
<updated>2022-09-04T12:39:59+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-09-01T02:02:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=501fe299826ead2cfa2046b5c244e36de254ec6a'/>
<id>501fe299826ead2cfa2046b5c244e36de254ec6a</id>
<content type='text'>
Systems using the hash MMU with a 4K page size don't support 4PB address
space, so skip the test because the bug it tests for can't be triggered.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220901020215.254097-1-mpe@ellerman.id.au

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Systems using the hash MMU with a 4K page size don't support 4PB address
space, so skip the test because the bug it tests for can't be triggered.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220901020215.254097-1-mpe@ellerman.id.au

</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Add a test for execute-only memory</title>
<updated>2022-08-26T01:02:21+00:00</updated>
<author>
<name>Nicholas Miehlbradt</name>
<email>nicholas@linux.ibm.com</email>
</author>
<published>2022-08-17T05:06:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=98acee3f8db451eaab9fbd422e523c228aacf08c'/>
<id>98acee3f8db451eaab9fbd422e523c228aacf08c</id>
<content type='text'>
This selftest is designed to cover execute-only protections
on the Radix MMU but will also work with Hash.

The tests are based on those found in pkey_exec_test with modifications
to use the generic mprotect() instead of the pkey variants.

Signed-off-by: Nicholas Miehlbradt &lt;nicholas@linux.ibm.com&gt;
Signed-off-by: Russell Currey &lt;ruscur@russell.cc&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220817050640.406017-2-ruscur@russell.cc

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This selftest is designed to cover execute-only protections
on the Radix MMU but will also work with Hash.

The tests are based on those found in pkey_exec_test with modifications
to use the generic mprotect() instead of the pkey variants.

Signed-off-by: Nicholas Miehlbradt &lt;nicholas@linux.ibm.com&gt;
Signed-off-by: Russell Currey &lt;ruscur@russell.cc&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220817050640.406017-2-ruscur@russell.cc

</pre>
</div>
</content>
</entry>
<entry>
<title>selftests/powerpc: Add a test of 4PB SLB handling</title>
<updated>2022-04-29T03:43:22+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-03-17T14:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e96a76ee5283d509f2bf45133d147e77f73a1b15'/>
<id>e96a76ee5283d509f2bf45133d147e77f73a1b15</id>
<content type='text'>
Add a test for a bug we had in the 4PB address space SLB handling. It
was fixed in commit 4c2de74cc869 ("powerpc/64: Interrupts save PPR on
stack rather than thread_struct").

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220317143925.1030447-1-mpe@ellerman.id.au
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a test for a bug we had in the 4PB address space SLB handling. It
was fixed in commit 4c2de74cc869 ("powerpc/64: Interrupts save PPR on
stack rather than thread_struct").

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