Re: [PATCH V3 05/10] perf: Add PERF_BR_NEW_ARCH_[N] map for BRBE on arm64 platform

From: Anshuman Khandual
Date: Mon Mar 14 2022 - 06:48:42 EST




On 3/14/22 14:07, kernel test robot wrote:
>>> error: include/uapi/linux/perf_event.h: leak CONFIG_ARM64 to user-space
> make[2]: *** [scripts/Makefile.headersinst:63: usr/include/linux/perf_event.h] Error 1
> make[2]: Target '__headers' not remade because of errors.
> make[1]: *** [Makefile:1277: headers] Error 2
> make[1]: Target 'prepare' not remade because of errors.
> make: *** [Makefile:219: __sub-make] Error 2
> make: Target 'prepare' not remade because of errors.

I should have avoided CONFIG_ARM64 in the the header file which gets
duplicated for tools/include/.. Looking at this once again, platform
build wrappers are not really required for these arch overrides. These
arm64 branch types can co-exist with any other platform overrides when
they get added later on. Just that the branch type nomenclature should
include the platform name some where. Something like ..

PERF_BR_<ARCH>_<BRANCH_TYPE>

#define PERF_BR_ARM64_FIQ PERF_BR_NEW_ARCH_1
#define PERF_BR_ARM64_DEBUG_HALT PERF_BR_NEW_ARCH_2
#define PERF_BR_ARM64_DEBUG_EXIT PERF_BR_NEW_ARCH_3
#define PERF_BR_ARM64_DEBUG_INST PERF_BR_NEW_ARCH_4
#define PERF_BR_ARM64_DEBUG_DATA PERF_BR_NEW_ARCH_5

Will do this change next time around.

- Anshuman