From 372b24bad2a8e7994d0360c870f6e981e3f4bb8f Mon Sep 17 00:00:00 2001 From: Liangliang Li Date: Fri, 21 May 2021 16:56:59 +0800 Subject: [PATCH] ANDROID: GKI: Add OEM data to mutex/rwsem Reserve ANDROID_OEM_DATA in struct mutex/rw_semaphore for recoreding informaition about the lock, which helps to do oem specific lock optimization. Bug: 188869548 Change-Id: I33f767a1823f854a8deb8ba9078079aa6a9d76ea Signed-off-by: Liangliang Li --- include/linux/mutex.h | 2 ++ include/linux/rwsem.h | 1 + 2 files changed, 3 insertions(+) diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 4d671fba3cab..05165a61c64d 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -19,6 +19,7 @@ #include #include #include +#include struct ww_acquire_ctx; @@ -63,6 +64,7 @@ struct mutex { #ifdef CONFIG_DEBUG_LOCK_ALLOC struct lockdep_map dep_map; #endif + ANDROID_OEM_DATA_ARRAY(1, 2); }; struct ww_class; diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index a6f7e212e164..e851cd553a9e 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h @@ -53,6 +53,7 @@ struct rw_semaphore { struct lockdep_map dep_map; #endif ANDROID_VENDOR_DATA(1); + ANDROID_OEM_DATA_ARRAY(1, 2); }; enum rwsem_waiter_type {