<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/powerpc/include, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-07-25T02:05:16+00:00</updated>
<entry>
<title>selftests/powerpc/ptrace: Do more of ptrace-gpr in asm</title>
<updated>2022-07-25T02:05:16+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-27T14:02:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=611e385087efc2cc3a7033aedd3f84ad0cf2a703'/>
<id>urn:sha1:611e385087efc2cc3a7033aedd3f84ad0cf2a703</id>
<content type='text'>
The ptrace-gpr test includes some inline asm to load GPR and FPR
registers. It then goes back to C to wait for the parent to trace it and
then checks register contents.

The split between inline asm and C is fragile, it relies on the compiler
not using any non-volatile GPRs after the inline asm block. It also
requires a very large and unwieldy inline asm block.

So convert the logic to set registers, wait, and store registers to a
single asm function, meaning there's no window for the compiler to
intervene.

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

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Convert to load/store doubles</title>
<updated>2022-07-25T02:05:16+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-27T14:02:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=53fa86e7ece54cbb1fae1443bd6b348088d8ce7e'/>
<id>urn:sha1:53fa86e7ece54cbb1fae1443bd6b348088d8ce7e</id>
<content type='text'>
Some of the ptrace tests check the contents of floating pointer
registers. Currently these use float, which is always 4 bytes, but the
ptrace API supports saving/restoring 8 bytes per register, so switch to
using doubles to exercise the code more fully.

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

</content>
</entry>
<entry>
<title>selftests/powerpc/ptrace: Drop unused load_fpr_single_precision()</title>
<updated>2022-07-25T02:05:16+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-27T14:02:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=af9f3f31f6cc8e3f637f19189e83d99f3fdd96ad'/>
<id>urn:sha1:af9f3f31f6cc8e3f637f19189e83d99f3fdd96ad</id>
<content type='text'>
This function is never called, drop it.

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

</content>
</entry>
<entry>
<title>selftests/powerpc: Add 32-bit support to asm helpers</title>
<updated>2022-07-25T02:05:16+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-27T14:02:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd4d3042e7570fc024b5ff15e895363e4bf5a78f'/>
<id>urn:sha1:bd4d3042e7570fc024b5ff15e895363e4bf5a78f</id>
<content type='text'>
Add support for 32-bit builds to the asm helpers.

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

</content>
</entry>
<entry>
<title>selftests/powerpc: Don't save TOC by default in asm helpers</title>
<updated>2022-07-25T02:05:15+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-27T14:02:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cfbc0723d18f5aeab4308c66d7d1992317eed7c9'/>
<id>urn:sha1:cfbc0723d18f5aeab4308c66d7d1992317eed7c9</id>
<content type='text'>
Thare are some asm helpers for creating/popping stack frames in
basic_asm.h. They always save/restore r2 (TOC pointer), but none of the
selftests change r2, so it's unnecessary to save it by default.

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

</content>
</entry>
<entry>
<title>selftests/powerpc: Don't save CR by default in asm helpers</title>
<updated>2022-07-25T02:05:15+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-27T14:02:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8f2e02394dc907f5e0140bfab80a9aa11e3449ed'/>
<id>urn:sha1:8f2e02394dc907f5e0140bfab80a9aa11e3449ed</id>
<content type='text'>
Thare are some asm helpers for creating/popping stack frames in
basic_asm.h. They always save/restore CR, but none of the selftests
tests touch non-volatile CR fields, so it's unnecessary to save them by
default.

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

</content>
</entry>
<entry>
<title>selftests/powerpc: Ensure 16-byte stack pointer alignment</title>
<updated>2022-07-25T02:05:15+00:00</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-06-27T14:02:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fd19a1f72aa7bf687609e0810e644fe5b3846342'/>
<id>urn:sha1:fd19a1f72aa7bf687609e0810e644fe5b3846342</id>
<content type='text'>
The PUSH/POP_BASIC_STACK helpers in basic_asm.h do not ensure that the
stack pointer is always 16-byte aligned, which is required per the ABI.

Fix the macros to do the alignment if the caller fails to.

Currently only one caller passes a non-aligned size, tm_signal_self(),
which hasn't been caught in testing, presumably because it's a leaf
function.

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

</content>
</entry>
<entry>
<title>selftests/powerpc/pmu: Refactor the platform check and add macros to find array size/PVR</title>
<updated>2022-06-28T22:57:39+00:00</updated>
<author>
<name>Athira Rajeev</name>
<email>atrajeev@linux.vnet.ibm.com</email>
</author>
<published>2022-06-10T13:40:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9cfd110a36649f9452120a648f15f32d1c82b99d'/>
<id>urn:sha1:9cfd110a36649f9452120a648f15f32d1c82b99d</id>
<content type='text'>
The platform check for selftest support "check_pvr_for_sampling_tests"
is specific to sampling tests which includes PVR check, presence of
PMU and extended regs support. Extended regs support is needed for
sampling tests which tests whether PMU registers are programmed
correctly. There could be other sampling tests which may not need
extended regs, example, bhrb filter tests which only needs validity
check via event open.

Hence refactor the platform check to have a common function
"platform_check_for_tests" that checks only for PVR check
and presence of PMU. The existing function
"check_pvr_for_sampling_tests" will invoke the common function
and also will include checks for extended regs specific for
sampling. The common function can also be used by tests other
than sampling like event code tests.

Add macro to find array size ("ARRAY_SIZE") to sampling
tests "misc.h" file. This can be used in next tests to
find event array size. Also update "include/reg.h" to
add macros to find minor and major version from PVR which
will be used in testcases.

Signed-off-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220610134113.62991-10-atrajeev@linux.vnet.ibm.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Add support to fetch "platform" and "base platform" from auxv to detect platform.</title>
<updated>2022-06-28T13:56:46+00:00</updated>
<author>
<name>Athira Rajeev</name>
<email>atrajeev@linux.vnet.ibm.com</email>
</author>
<published>2022-06-10T13:40:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a069b5f980e3b65b64b6322b71d5819f90dbb42b'/>
<id>urn:sha1:a069b5f980e3b65b64b6322b71d5819f90dbb42b</id>
<content type='text'>
The /proc/self/auxv contains information about "platform" on any system.
Also "base platform" which is an indication about platform string
corresponding to the real PVR. When systems are booted in compat mode,
say, power10 booted in power9 mode, "platform" will point to power9
whereas base platform will point to power10. Incase, if the distro
doesn't support platform indicated by real PVR, base platform will have
a default value.

The mismatch of platform/base platform is an indication of system booted
in compat mode. In such cases, distro will have a Generic Compat
registered which supports basic features for performance monitoring.

Some of the selftest needs to be handled differently ( ex: generic
events, alternative events, bhrb filter map) in Generic Compat PMU.
Hence selftest framework needs utility functions to identify such cases.
One way is make sure of auxv information. Below condition can be used to
detect if Generic Compat PMU is registered. ie:

  if ((AT_PLATFORM != AT_BASE_PLATFORM) &amp;&amp; (AT_BASE_PLATFORM != PVR))

this indicates Generic Compat PMU.

Add utility function in "include/utils.h" to return:
AT_PLATFORM and AT_BASE_PLATFORM from auxv. Also update misc.c in
"sampling_tests" folder to add function to use above check to determine
presence of generic compat pmu.

In other architecture ( like x86 ), pmu_name is exposed via
"/sys/bus/event_source/devices/cpu/caps". The same could be used in
powerpc in future. Since currently we don't have the "caps" support in
powerpc, patch uses auxv information to detect platform type and compat
mode. But as placeholder utility function is added considering
possiblity of getting "caps" information via sysfs. If that doesn't
exist, fallback to using auxv information.

Signed-off-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220610134113.62991-3-atrajeev@linux.vnet.ibm.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Add matrix multiply assist (MMA) test</title>
<updated>2022-04-27T06:32:42+00:00</updated>
<author>
<name>Alistair Popple</name>
<email>alistair@popple.id.au</email>
</author>
<published>2020-06-22T02:18:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3527e1ab9a7990530dfb0137ddcfa64bed2915be'/>
<id>urn:sha1:3527e1ab9a7990530dfb0137ddcfa64bed2915be</id>
<content type='text'>
Adds a simple test of some basic matrix multiply assist (MMA)
instructions.

Signed-off-by: Alistair Popple &lt;alistair@popple.id.au&gt;
Tested-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200622021832.15870-1-alistair@popple.id.au
</content>
</entry>
</feed>
