From 9cfe2646f7f421c6faacc2fd3097845c5d0680c5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 30 Aug 2022 19:10:52 +0200 Subject: [PATCH] Revert "ANDROID: vendor_hooks: FPSIMD save/restore by using vendor_hooks" This reverts commit 74555f39924dc4c173b4bec9bd015acfeb895e68. The hook android_vh_is_fpsimd_save 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: 149632552 Cc: Wooyeon Kim Signed-off-by: Greg Kroah-Hartman Change-Id: Idecd20a8791c5e4497f8d2222cc54cc42b2ebdff --- arch/arm64/include/asm/processor.h | 5 +++++ arch/arm64/kernel/process.c | 3 --- drivers/android/vendor_hooks.c | 2 -- include/trace/hooks/fpsimd.h | 27 --------------------------- 4 files changed, 5 insertions(+), 32 deletions(-) delete mode 100644 include/trace/hooks/fpsimd.h diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index abeebb43b3fe..a4867b384ef0 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -149,6 +149,11 @@ struct thread_struct { struct user_fpsimd_state fpsimd_state; } uw; + /* + * Unused now that commit 74555f39924d ("ANDROID: vendor_hooks: FPSIMD + * save/restore by using vendor_hooks") is reverted, but remains to + * preserve the ABI in the android13-5.10 branch. + */ ANDROID_VENDOR_DATA(1); unsigned int fpsimd_cpu; diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 00bff856d496..d98512af85f1 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include @@ -588,8 +587,6 @@ __notrace_funcgraph struct task_struct *__switch_to(struct task_struct *prev, if (prev->thread.sctlr_user != next->thread.sctlr_user) update_sctlr_el1(next->thread.sctlr_user); - trace_android_vh_is_fpsimd_save(prev, next); - /* the actual thread switch */ last = cpu_switch_to(prev, next); diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index c507e5737cdb..74d2fcf0e2d2 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -100,7 +99,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_sk_free); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_nf_conn_alloc); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_nf_conn_free); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_arch_set_freq_scale); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_is_fpsimd_save); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_transaction_init); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_priority_skip); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_set_priority); diff --git a/include/trace/hooks/fpsimd.h b/include/trace/hooks/fpsimd.h deleted file mode 100644 index 1141ebb1a1c6..000000000000 --- a/include/trace/hooks/fpsimd.h +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM fpsimd - -#define TRACE_INCLUDE_PATH trace/hooks - -#if !defined(_TRACE_HOOK_FPSIMD_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_HOOK_FPSIMD_H - -#include - -#ifdef __GENKSYMS__ -struct task_struct; -#else -/* struct task_struct */ -#include -#endif /* __GENKSYMS__ */ - -DECLARE_HOOK(android_vh_is_fpsimd_save, - 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_FPSIMD_H */ -/* This part must be outside protection */ -#include