From a32d8ee384c9a70cf34ff14033ccacc142db54e4 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 21 Oct 2021 09:37:05 +0200 Subject: [PATCH] Revert "ANDROID: mpam: add vendor hook to record MPAM" This reverts commit 1aa1f6a7cf67c9cea1a609581eb9c2602fd96576. The hook android_vh_mpam_set is not used by any vendor, so remove it to help with merge issues with future LTS releases. If this is needed by any real user, it can easily be reverted to add it back and then the symbol should be added to the abi list at the same time to prevent it from being removed again later. Bug: 203756332 Bug: 165333282 Cc: C-J.Chen Signed-off-by: Greg Kroah-Hartman Change-Id: I18356743538df7d41a00f54479bf2a0bc3a62e06 --- arch/arm64/kernel/process.c | 6 ------ drivers/android/vendor_hooks.c | 2 -- include/trace/hooks/mpam.h | 23 ----------------------- 3 files changed, 31 deletions(-) delete mode 100644 include/trace/hooks/mpam.h diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 132261037b42..9a545ebc3661 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include @@ -572,11 +571,6 @@ __notrace_funcgraph struct task_struct *__switch_to(struct task_struct *prev, ssbs_thread_switch(next); erratum_1418040_thread_switch(prev, next); ptrauth_thread_switch_user(next); - /* - * vendor hook is needed before the dsb(), - * because MPAM is related to cache maintenance. - */ - trace_android_vh_mpam_set(prev, next); /* * Complete any pending TLB or cache maintenance on this CPU in case diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 423219ac6989..b44972ad1b93 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -123,7 +122,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_show_task); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shmem_alloc_page); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_idle_enter); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_idle_exit); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mpam_set); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_find_busiest_group); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gic_resume); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_wq_lockup_pool); diff --git a/include/trace/hooks/mpam.h b/include/trace/hooks/mpam.h deleted file mode 100644 index 8479fe7c2356..000000000000 --- a/include/trace/hooks/mpam.h +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM mpam -#undef TRACE_INCLUDE_PATH -#define TRACE_INCLUDE_PATH trace/hooks -#if !defined(_TRACE_HOOK_MPAM_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_HOOK_MPAM_H -#include -#include -/* - * Following tracepoints are not exported in tracefs and provide a - * mechanism for vendor modules to hook and extend functionality - */ -struct task_struct; -DECLARE_HOOK(android_vh_mpam_set, - TP_PROTO(struct task_struct *prev, struct task_struct *next), - TP_ARGS(prev, next)); - -/* macro versions of hooks are no longer required */ - -#endif /* _TRACE_HOOK_MPAM_H */ -/* This part must be outside protection */ -#include