[PATCH] um: add perf-event support

Johannes Berg johannes at sipsolutions.net
Mon Sep 21 16:07:40 PDT 2026


From: Johannes Berg <johannes.berg at intel.com>

Enable HAVE_PERF_EVENTS without any hardware events (since
there's no hardware), that just needs to select the symbol
and provide an empty asm/perf_event.h.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 arch/um/Kconfig                  | 1 +
 arch/um/include/asm/perf_event.h | 7 +++++++
 2 files changed, 8 insertions(+)
 create mode 100644 arch/um/include/asm/perf_event.h

diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index d9541d13d9eb..8fec92f56a82 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -27,6 +27,7 @@ config UML
 	select HAVE_DEBUG_KMEMLEAK
 	select HAVE_DEBUG_BUGVERBOSE
 	select HAVE_PAGE_SIZE_4KB
+	select HAVE_PERF_EVENTS
 	select NO_DMA if !UML_DMA_EMULATION
 	select OF_EARLY_FLATTREE if OF
 	select GENERIC_IRQ_SHOW
diff --git a/arch/um/include/asm/perf_event.h b/arch/um/include/asm/perf_event.h
new file mode 100644
index 000000000000..9f774e2db198
--- /dev/null
+++ b/arch/um/include/asm/perf_event.h
@@ -0,0 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __UM_PERF_EVENT_H
+#define __UM_PERF_EVENT_H
+
+/* nothing here - clearly no real hardware support */
+
+#endif /* __UM_PERF_EVENT_H */
-- 
2.55.0




More information about the linux-um mailing list