<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/powerpc/pmu/event_code_tests, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-02-11T06:03:51Z</updated>
<entry>
<title>tools/testing/selftests/powerpc/pmu: Update comment description to mention ISA v3.1 for power10 and above</title>
<updated>2025-02-11T06:03:51Z</updated>
<author>
<name>Athira Rajeev</name>
<email>atrajeev@linux.vnet.ibm.com</email>
</author>
<published>2025-01-13T07:58:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=43751c3ce276afc475fea769ae2abf690d5f4b91'/>
<id>urn:sha1:43751c3ce276afc475fea769ae2abf690d5f4b91</id>
<content type='text'>
Updated the comments in the pmu selftests to include
power11/ISA v3.1 where ever required.

Signed-off-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20250113075858.45137-3-atrajeev@linux.vnet.ibm.com

</content>
</entry>
<entry>
<title>tools/testing/selftests/powerpc: Add check for power11 pvr for pmu selfests</title>
<updated>2025-02-11T06:03:51Z</updated>
<author>
<name>Athira Rajeev</name>
<email>atrajeev@linux.vnet.ibm.com</email>
</author>
<published>2025-01-13T07:58:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=520ee327c59d37c5520b177404f57c974cc098cc'/>
<id>urn:sha1:520ee327c59d37c5520b177404f57c974cc098cc</id>
<content type='text'>
Some of the tests depends on pvr value to choose
the event. Example:
- event_alternatives_tests_p10: alternative event depends
  on registered PMU driver which is based on pvr
- generic_events_valid_test varies based on platform
- bhrb_filter_map_test: again its dependent on pmu to
  decide which bhrb filter to use
- reserved_bits_mmcra_sample_elig_mode: randome sampling
  mode reserved bits is also varies based on platform

Signed-off-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;
Tested-by: Disha Goel &lt;disgoel@linux.ibm.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Link: https://patch.msgid.link/20250113075858.45137-2-atrajeev@linux.vnet.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Add flags.mk to support pmu buildable</title>
<updated>2024-04-29T13:53:01Z</updated>
<author>
<name>Madhavan Srinivasan</name>
<email>maddy@linux.ibm.com</email>
</author>
<published>2024-02-29T09:37:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5553a79387e92ffd812a49fdcf679f392281f6a9'/>
<id>urn:sha1:5553a79387e92ffd812a49fdcf679f392281f6a9</id>
<content type='text'>
When running `make -C powerpc/pmu run_tests` from top level selftests
directory, currently this error is being reported:

  make: Entering directory '/home/maddy/linux/tools/testing/selftests/powerpc/pmu'
  Makefile:40: warning: overriding recipe for target 'emit_tests'
  ../../lib.mk:111: warning: ignoring old recipe for target 'emit_tests'
  gcc -m64    count_instructions.c ../harness.c event.c lib.c ../utils.c loop.S  -o /home/maddy/selftest_output//count_instructions
  In file included from count_instructions.c:13:
  event.h:12:10: fatal error: utils.h: No such file or directory
  12 | #include "utils.h"
    |          ^~~~~~~~~
  compilation terminated.

This is due to missing of include path in CFLAGS. That is, CFLAGS and
GIT_VERSION macros are defined in the powerpc/ folder Makefile which
in this case is not involved.

To address the failure in case of executing specific sub-folder test
directly, a new rule file has been addded by the patch called "flags.mk"
under selftest/powerpc/ folder and is linked to all the Makefile of
powerpc/pmu sub-folders.

Reported-by: Sachin Sant &lt;sachinp@linux.ibm.com&gt;
Signed-off-by: Madhavan Srinivasan &lt;maddy@linux.ibm.com&gt;
Tested-by: Sachin Sant &lt;sachinp@linux.ibm.com&gt;
[mpe: Fixup ifeq, make GIT_VERSION simply expanded to avoid re-executing git describe]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20240229093711.581230-2-maddy@linux.ibm.com
</content>
</entry>
<entry>
<title>selftests/powerpc: Re-order *FLAGS to follow lib.mk</title>
<updated>2024-04-29T13:51:16Z</updated>
<author>
<name>Madhavan Srinivasan</name>
<email>maddy@linux.ibm.com</email>
</author>
<published>2024-02-29T09:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37496845c812db2a470d51088a59ee38156e8058'/>
<id>urn:sha1:37496845c812db2a470d51088a59ee38156e8058</id>
<content type='text'>
In some powerpc/ sub-folder Makefiles, CFLAGS are defined before lib.mk
include. Clean it up by re-ordering the flags to follow after the mk
include. This is needed to support sub-folders in powerpc/ buildable on
its own.

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-1-maddy@linux.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc: Add missing PMU selftests to .gitignores</title>
<updated>2022-08-15T10:59:17Z</updated>
<author>
<name>Russell Currey</name>
<email>ruscur@russell.cc</email>
</author>
<published>2022-08-12T07:16:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f889a2e89ea5b4db5cf09765ee5e310be43c7b6f'/>
<id>urn:sha1:f889a2e89ea5b4db5cf09765ee5e310be43c7b6f</id>
<content type='text'>
Some recently added selftests don't have their binaries in .gitignores,
so add them.

I also alphabetically sorted sampling_tests/.gitignore while I was in
there.

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/20220812071632.56095-1-ruscur@russell.cc

</content>
</entry>
<entry>
<title>selftests/powerpc/pmu: Add test for hardware cache events</title>
<updated>2022-06-28T22:57:45Z</updated>
<author>
<name>Kajol Jain</name>
<email>kjain@linux.ibm.com</email>
</author>
<published>2022-06-10T13:41:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab8bca92aebcb59d81dc95ddebe241052f2bb411'/>
<id>urn:sha1:ab8bca92aebcb59d81dc95ddebe241052f2bb411</id>
<content type='text'>
The testcase checks if the transalation of a generic hardware cache
event is done properly via perf interface. The hardware cache events has
type as PERF_TYPE_HW_CACHE and each event points to raw event code id.

Testcase checks different combination of cache level, cache event
operation type and cache event result type and verify for a given event
code, whether transalation matches with the current cache event mappings
via perf interface.

Signed-off-by: Kajol Jain &lt;kjain@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220610134113.62991-36-atrajeev@linux.vnet.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc/pmu: Add selftest for group constraint check for MMCRA thresh_sel field</title>
<updated>2022-06-28T22:57:45Z</updated>
<author>
<name>Kajol Jain</name>
<email>kjain@linux.ibm.com</email>
</author>
<published>2022-06-10T13:41:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ac92fecd1dbfcabd64925571b94151d7a814878'/>
<id>urn:sha1:9ac92fecd1dbfcabd64925571b94151d7a814878</id>
<content type='text'>
Thresh select bits in the event code is used to program thresh_sel field
in Monitor Mode Control Register A (MMCRA: 45-47). When scheduling
events as a group, all events in that group should match value in these
bits. Otherwise event open for the sibling events will fail.

Testcase uses event code PM_MRK_INST_CMPL (0x401e0) as leader and
another event PM_THRESH_MET (0x101ec) as sibling event, and checks if
group constraint checks for thresh_sel field added correctly via perf
interface.

Signed-off-by: Kajol Jain &lt;kjain@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220610134113.62991-35-atrajeev@linux.vnet.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc/pmu: Add selftest for group constraint check for MMCRA thresh_ctl field</title>
<updated>2022-06-28T22:57:45Z</updated>
<author>
<name>Kajol Jain</name>
<email>kjain@linux.ibm.com</email>
</author>
<published>2022-06-10T13:41:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c178606ab51076d464fe537cd7a6bcbc615939e5'/>
<id>urn:sha1:c178606ab51076d464fe537cd7a6bcbc615939e5</id>
<content type='text'>
Thresh control bits in the event code is used to program thresh_ctl
field in Monitor Mode Control Register A (MMCRA: 48-55). When scheduling
events as a group, all events in that group should match value in these
bits. Otherwise event open for the sibling events will fail.

Testcase uses event code PM_MRK_INST_CMPL (0x401e0) as leader and
another event PM_THRESH_MET (101ec) as sibling event, and checks if
group constraint checks for thresh_ctl field added correctly via perf
interface.

Signed-off-by: Kajol Jain &lt;kjain@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220610134113.62991-34-atrajeev@linux.vnet.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc/pmu: Add selftest for group constraint for unit and pmc field in p9</title>
<updated>2022-06-28T22:57:45Z</updated>
<author>
<name>Kajol Jain</name>
<email>kjain@linux.ibm.com</email>
</author>
<published>2022-06-10T13:41:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=142c9bd1ff215f364a5d683a9dd0b7c413397185'/>
<id>urn:sha1:142c9bd1ff215f364a5d683a9dd0b7c413397185</id>
<content type='text'>
Unit and pmu bits in the event code is used to program unit and pmc
fields in Monitor Mode Control Register 1 (MMCR1). For power9 platform,
incase unit field value is within 6 to 9, one of the event in the group
should use PMC4. Otherwise event_open should fail for that group.

Signed-off-by: Kajol Jain &lt;kjain@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220610134113.62991-33-atrajeev@linux.vnet.ibm.com

</content>
</entry>
<entry>
<title>selftests/powerpc/pmu: Add selftest for group constraint check for MMCRA thresh_cmp field</title>
<updated>2022-06-28T22:57:45Z</updated>
<author>
<name>Kajol Jain</name>
<email>kjain@linux.ibm.com</email>
</author>
<published>2022-06-10T13:41:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8eaca8c4b4ed9a2058e4f232d56b5973191fec37'/>
<id>urn:sha1:8eaca8c4b4ed9a2058e4f232d56b5973191fec37</id>
<content type='text'>
Thresh compare bits for a event is used to program thresh compare field
in Monitor Mode Control Register A (MMCRA: 9-18 bits for power9 and
MMCRA: 8-18 bits for power10). When scheduling events as a group, all
events in that group should match value in thresh compare bits.
Otherwise event open for the sibling events will fail.

Testcase uses event code "0x401e0" as leader and another event "0x101ec"
as sibling event, and checks for thresh compare constraint via perf
interface.

Signed-off-by: Kajol Jain &lt;kjain@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220610134113.62991-32-atrajeev@linux.vnet.ibm.com

</content>
</entry>
</feed>
