]> xenbits.xensource.com Git - xen.git/commitdiff
xen/perfc: Add perfc_defn.h to asm-generic
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sun, 29 Dec 2024 18:18:22 +0000 (18:18 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 7 Jan 2025 11:50:25 +0000 (11:50 +0000)
... 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@citrix.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Oleksii Kurohcko <oleksii.kurochko@gmail.com>
automation/gitlab-ci/build.yaml
xen/arch/ppc/include/asm/Makefile
xen/arch/riscv/configs/tiny64_defconfig
xen/arch/riscv/include/asm/Makefile
xen/common/perfc.c
xen/include/asm-generic/perfc_defn.h [new file with mode: 0644]
xen/include/xen/perfc_defn.h

index 1b884cc81cdb53ba06ad6e2332c15fc76e4d6e33..41f17ed45641351a51309ca91efdfd80a495134c 100644 (file)
@@ -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
 
index ced02e26ed136299ff4df2303f65cfcdf4da13b2..c989a7f89b34ab4055d690e49c8f1b9bc1e77ca7 100644 (file)
@@ -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
index 6af563bd7372e0690adf506ede59fc0892d47018..bb3ae26a444d435ed04bf3eda663166f21473f9e 100644 (file)
@@ -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
index ced02e26ed136299ff4df2303f65cfcdf4da13b2..c989a7f89b34ab4055d690e49c8f1b9bc1e77ca7 100644 (file)
@@ -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
index ed4dba36f1bccf9d708aff6868128b7329a818a6..8c967ab900f989bb60997fba9728db87daba2d3e 100644 (file)
@@ -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 (file)
index 0000000..8237636
--- /dev/null
@@ -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 */
index 0027d95a60bcd5fe81c1eda88e7d6fb4fa2d7655..a987d80dd6f1793aca19c58f1030edcb64729cf8 100644 (file)
@@ -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")