Skip to content

Commit

Permalink
tools/testing/selftests/powerpc/pmu: Update comment description
Browse files Browse the repository at this point in the history
to refer ISA v3.1 for power10 and above

For some of the tests which are only applicable
to power10, comment says "applicable on power10".
Example, tests for l2l3 select, radix scope qual bits.
Since these are applicable for ISA v3.1 (including
power10 and power11 ), update comment to say "ISA v3.1".
Also update few of the pvr specific reference to include
power11.

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
  • Loading branch information
athira-rajeev authored and root committed Dec 20, 2024
1 parent b2d9d8a commit 20fab1f
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static int group_constraint_l2l3_sel(void)

/*
* Check for platform support for the test.
* This test is only aplicable on power10
* This test is only aplicable on ISA v3.1
*/
SKIP_IF(platform_check_for_tests());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static int group_constraint_radix_scope_qual(void)

/*
* Check for platform support for the test.
* This test is aplicable on power10 only.
* This test is aplicable on ISA v3.1 only.
*/
SKIP_IF(platform_check_for_tests());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/*
* Testcase for group constraint check of thresh_cmp bits which 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).
* (MMCRA: 9-18 bits for power9 and MMCRA: 8-18 bits for power10/power11).
* All events in the group should match thresh compare bits otherwise
* event_open for the group will fail.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Some of the bits in the event code is
* reserved for specific platforms.
* Event code bits 52-59 are reserved in power9,
* whereas in power10, these are used for programming
* whereas in ISA v3.1, these are used for programming
* Monitor Mode Control Register 3 (MMCR3).
* Bit 9 in event code is reserved in power9,
* whereas it is used for programming "radix_scope_qual"
Expand All @@ -39,7 +39,7 @@ static int invalid_event_code(void)

/*
* Events using MMCR3 bits and radix scope qual bits
* should fail in power9 and should succeed in power10.
* should fail in power9 and should succeed in power10 ( ISA v3.1 )
* Init the events and check for pass/fail in event open.
*/
if (have_hwcap2(PPC_FEATURE2_ARCH_3_1)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static int reserved_bits_mmcra_sample_elig_mode(void)

/*
* MMCRA Random Sampling Mode (SM) value 0x10
* is reserved in power10 and 0xC is reserved in
* is reserved in power10/power11 and 0xC is reserved in
* power9.
*/
if ((pvr == POWER10) || (pvr == POWER11)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* A perf sampling test to check bhrb filter
* map. All the branch filters are not supported
* in powerpc. Supported filters in:
* power10: any, any_call, ind_call, cond
* power10/power11: any, any_call, ind_call, cond
* power9: any, any_call
*
* Testcase checks event open for invalid bhrb filter
Expand All @@ -24,13 +24,13 @@
*/

/* Invalid types for powerpc */
/* Valid bhrb filters in power9/power10 */
/* Valid bhrb filters in power9/power10/power11 */
int bhrb_filter_map_valid_common[] = {
PERF_SAMPLE_BRANCH_ANY,
PERF_SAMPLE_BRANCH_ANY_CALL,
};

/* Valid bhrb filters in power10 */
/* Valid bhrb filters in power10/power11 */
int bhrb_filter_map_valid_p10[] = {
PERF_SAMPLE_BRANCH_IND_CALL,
PERF_SAMPLE_BRANCH_COND,
Expand Down Expand Up @@ -69,15 +69,15 @@ static int bhrb_filter_map_test(void)
FAIL_IF(!event_open(&event));
}

/* valid filter maps for power9/power10 which are expected to pass in event_open */
/* valid filter maps for power9/power10/power11 which are expected to pass in event_open */
for (i = 0; i < ARRAY_SIZE(bhrb_filter_map_valid_common); i++) {
event.attr.branch_sample_type = bhrb_filter_map_valid_common[i];
FAIL_IF(event_open(&event));
event_close(&event);
}

/*
* filter maps which are valid in power10 and invalid in power9.
* filter maps which are valid in power10/power11 and invalid in power9.
* PVR check is used here since PMU specific data like bhrb filter
* alternative tests is handled by respective PMU driver code and
* using PVR will work correctly for all cases including generic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static int mmcra_bhrb_cond_test(void)

/*
* Check for platform support for the test.
* This test is only aplicable on power10
* This test is only aplicable on ISA v3.1
*/
SKIP_IF(check_pvr_for_sampling_tests());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static int mmcra_bhrb_disable_no_branch_test(void)

/*
* Check for platform support for the test.
* This test is only aplicable on power10
* This test is only aplicable on ISA v3.1
*/
SKIP_IF(check_pvr_for_sampling_tests());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static int mmcra_bhrb_disable_test(void)

/*
* Check for platform support for the test.
* This test is only aplicable on power10
* This test is only aplicable on ISA v3.1
*/
SKIP_IF(check_pvr_for_sampling_tests());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static int mmcra_bhrb_ind_call_test(void)

/*
* Check for platform support for the test.
* This test is only aplicable on power10
* This test is only aplicable on ISA v3.1
*/
SKIP_IF(check_pvr_for_sampling_tests());
SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_1));
Expand Down

0 comments on commit 20fab1f

Please sign in to comment.