1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef __LIBPERF_INTERNAL_CPUMAP_H 3*4882a593Smuzhiyun #define __LIBPERF_INTERNAL_CPUMAP_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #include <linux/refcount.h> 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun struct perf_cpu_map { 8*4882a593Smuzhiyun refcount_t refcnt; 9*4882a593Smuzhiyun int nr; 10*4882a593Smuzhiyun int map[]; 11*4882a593Smuzhiyun }; 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun #ifndef MAX_NR_CPUS 14*4882a593Smuzhiyun #define MAX_NR_CPUS 2048 15*4882a593Smuzhiyun #endif 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun int perf_cpu_map__idx(struct perf_cpu_map *cpus, int cpu); 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun #endif /* __LIBPERF_INTERNAL_CPUMAP_H */ 20