... 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>
CONFIG_GRANT_TABLE=n
CONFIG_LIVEPATCH=n
CONFIG_MEM_ACCESS=n
- CONFIG_PERF_COUNTERS=n
CONFIG_QEMU_PLATFORM=y
CONFIG_XSM=n
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
# 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
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
+#include <xen/errno.h>
#include <xen/lib.h>
#include <xen/smp.h>
#include <xen/time.h>
--- /dev/null
+/* 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 */
#include <asm/perfc_defn.h>
+#ifdef NR_hypercalls
PERFCOUNTER_ARRAY(hypercalls, "hypercalls", NR_hypercalls)
+#endif
PERFCOUNTER(calls_from_multicall, "calls from multicall")