From: Steven Rostedt Date: Thu, 12 Jun 2025 14:03:13 +0000 (-0400) Subject: mm, x86/mm: move creating the tlb_flush event back to x86 code X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=53c910bfad1945b86d3de20af7487f4432b58304;p=users%2Fjedix%2Flinux-maple.git mm, x86/mm: move creating the tlb_flush event back to x86 code Commit e73ad5ff2f76 ("mm, x86/mm: Make the batched unmap TLB flush API more generic") moved the trace_tlb_flush out of mm/rmap.c and back into x86 specific architecture, but it kept the include to the events/tlb.h file, even though it didn't use that event. Then another commit came in and added more events to the mm/rmap.c file and moved the #define CREATE_TRACE_POINTS define from the x86 specific architecture to the generic mm/rmap.h file to create both the tlb_flush tracepoint and the new tracepoints. But since the tlb_flush tracepoint is only x86 specific, it now creates that tracepoint for all other architectures and this wastes approximately 5K of text and meta data that will not be used. Remove the events/tlb.h from mm/rmap.c and add the define CREATE_TRACE_POINTS back in the x86 code. Link: https://lkml.kernel.org/r/20250612100313.3b9a8b80@batman.local.home Fixes: e73ad5ff2f76 ("mm, x86/mm: Make the batched unmap TLB flush API more generic") Signed-off-by: Steven Rostedt (Google) Reviewed-by: Lorenzo Stoakes Cc: Andy Lutomirski Cc: Borislav Betkov Cc: David Hildenbrand Cc: "Masami Hiramatsu (Google)" Cc: Mathieu Desnoyers Cc: Peter Zijlstra Cc: Thomas Gleinxer Signed-off-by: Andrew Morton --- diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index bb57e93b4caf..8bf6ad4b9400 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -34,6 +34,7 @@ * We need to define the tracepoints somewhere, and tlb.c * is only compiled when SMP=y. */ +#define CREATE_TRACE_POINTS #include #include "mm_internal.h" diff --git a/mm/rmap.c b/mm/rmap.c index 14cf3b24ae50..34333ae3bd80 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -79,7 +79,6 @@ #include #define CREATE_TRACE_POINTS -#include #include #include "internal.h"