FILE
check_extended_reg_test.c
File preview with syntax highlighting.
linux-6.19.14/tools/testing/selftests/powerpc/pmu/sampling_tests/check_extended_reg_test.c
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright 2024, Kajol Jain, IBM Corp. 4 */ 5 6#include <stdio.h> 7#include <stdlib.h> 8 9#include "../event.h" 10#include "misc.h" 11#include "utils.h" 12 13/* 14 * A perf sampling test to check extended 15 * reg support. 16 */ 17static int check_extended_reg_test(void) 18{ 19 /* Check for platform support for the test */ 20 SKIP_IF(!have_hwcap2(PPC_FEATURE2_ARCH_3_00)); 21 22 /* Skip for Generic compat PMU */ 23 SKIP_IF(check_for_generic_compat_pmu()); 24 25 /* Check if platform supports extended regs */ 26 platform_extended_mask = perf_get_platform_reg_mask(); 27 FAIL_IF(check_extended_regs_support()); 28 29 return 0; 30} 31 32int main(void) 33{ 34 return test_harness(check_extended_reg_test, "check_extended_reg_test"); 35}
~/
Read-only file preview.