[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] xen/perfc: Add perfc_defn.h to asm-generic
commit 02c24a1325d37bdf089b980b5618b2b0616260a7 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Sun Dec 29 18:18:22 2024 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Tue Jan 7 11:50:25 2025 +0000 xen/perfc: Add perfc_defn.h to asm-generic ... and hook it up for RISC-V and PPC. On RISC-V at least, no combination of headers pulls in errno.h, so include it explicitly. Guard the hypercalls array declaration based on NR_hypercalls existing. This is sufficient to get PERF_COUNTERS fully working on RISC-V and PPC, so drop the randconfig override. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Oleksii Kurohcko <oleksii.kurochko@xxxxxxxxx> --- automation/gitlab-ci/build.yaml | 1 - xen/arch/ppc/include/asm/Makefile | 1 + xen/arch/riscv/configs/tiny64_defconfig | 1 - xen/arch/riscv/include/asm/Makefile | 1 + xen/common/perfc.c | 1 + xen/include/asm-generic/perfc_defn.h | 5 +++++ xen/include/xen/perfc_defn.h | 2 ++ 7 files changed, 10 insertions(+), 2 deletions(-) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 1b884cc81c..41f17ed456 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -734,7 +734,6 @@ debian-12-riscv64-gcc: CONFIG_GRANT_TABLE=n CONFIG_LIVEPATCH=n CONFIG_MEM_ACCESS=n - CONFIG_PERF_COUNTERS=n CONFIG_QEMU_PLATFORM=y CONFIG_XSM=n diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/Makefile index ced02e26ed..c989a7f89b 100644 --- a/xen/arch/ppc/include/asm/Makefile +++ b/xen/arch/ppc/include/asm/Makefile @@ -7,6 +7,7 @@ generic-y += hypercall.h generic-y += iocap.h generic-y += paging.h generic-y += percpu.h +generic-y += perfc_defn.h generic-y += random.h generic-y += softirq.h generic-y += vm_event.h diff --git a/xen/arch/riscv/configs/tiny64_defconfig b/xen/arch/riscv/configs/tiny64_defconfig index 6af563bd73..bb3ae26a44 100644 --- a/xen/arch/riscv/configs/tiny64_defconfig +++ b/xen/arch/riscv/configs/tiny64_defconfig @@ -1,7 +1,6 @@ # CONFIG_BOOT_TIME_CPUPOOLS is not set # CONFIG_GRANT_TABLE is not set # CONFIG_MEM_ACCESS is not set -# CONFIG_PERF_COUNTERS is not set # CONFIG_COVERAGE is not set # CONFIG_LIVEPATCH is not set # CONFIG_XSM is not set diff --git a/xen/arch/riscv/include/asm/Makefile b/xen/arch/riscv/include/asm/Makefile index ced02e26ed..c989a7f89b 100644 --- a/xen/arch/riscv/include/asm/Makefile +++ b/xen/arch/riscv/include/asm/Makefile @@ -7,6 +7,7 @@ generic-y += hypercall.h generic-y += iocap.h generic-y += paging.h generic-y += percpu.h +generic-y += perfc_defn.h generic-y += random.h generic-y += softirq.h generic-y += vm_event.h diff --git a/xen/common/perfc.c b/xen/common/perfc.c index ed4dba36f1..8c967ab900 100644 --- a/xen/common/perfc.c +++ b/xen/common/perfc.c @@ -1,4 +1,5 @@ +#include <xen/errno.h> #include <xen/lib.h> #include <xen/smp.h> #include <xen/time.h> diff --git a/xen/include/asm-generic/perfc_defn.h b/xen/include/asm-generic/perfc_defn.h new file mode 100644 index 0000000000..8237636d83 --- /dev/null +++ b/xen/include/asm-generic/perfc_defn.h @@ -0,0 +1,5 @@ +/* This file is legitimately included multiple times. */ +/* #ifndef ASM_GENERIC_PERFC_DEFN_H */ +/* #define ASM_GENERIC_PERFC_DEFN_H */ + +/* #endif ASM_GENERIC_PERFC_DEFN_H */ diff --git a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h index 0027d95a60..a987d80dd6 100644 --- a/xen/include/xen/perfc_defn.h +++ b/xen/include/xen/perfc_defn.h @@ -4,7 +4,9 @@ #include <asm/perfc_defn.h> +#ifdef NR_hypercalls PERFCOUNTER_ARRAY(hypercalls, "hypercalls", NR_hypercalls) +#endif PERFCOUNTER(calls_from_multicall, "calls from multicall") -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |