mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
ANDROID: GKI: Add OEM data to mutex/rwsem
Reserve ANDROID_OEM_DATA in struct mutex/rw_semaphore for recording
information about the lock, such as the lock owner, which helps with
OEM specific lock optimization.
Bug: 188869548
Change-Id: I33f767a1823f854a8deb8ba9078079aa6a9d76ea
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit 97f7f2ebf3)
This commit is contained in:
committed by
Carlos Llamas
parent
b0375cb69c
commit
8326170bb6
@@ -19,6 +19,7 @@
|
|||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <linux/osq_lock.h>
|
#include <linux/osq_lock.h>
|
||||||
#include <linux/debug_locks.h>
|
#include <linux/debug_locks.h>
|
||||||
|
#include <linux/android_vendor.h>
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||||
# define __DEP_MAP_MUTEX_INITIALIZER(lockname) \
|
# define __DEP_MAP_MUTEX_INITIALIZER(lockname) \
|
||||||
@@ -73,6 +74,7 @@ struct mutex {
|
|||||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||||
struct lockdep_map dep_map;
|
struct lockdep_map dep_map;
|
||||||
#endif
|
#endif
|
||||||
|
ANDROID_OEM_DATA_ARRAY(1, 2);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_MUTEXES
|
#ifdef CONFIG_DEBUG_MUTEXES
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ struct rw_semaphore {
|
|||||||
struct lockdep_map dep_map;
|
struct lockdep_map dep_map;
|
||||||
#endif
|
#endif
|
||||||
ANDROID_VENDOR_DATA(1);
|
ANDROID_VENDOR_DATA(1);
|
||||||
|
ANDROID_OEM_DATA_ARRAY(1, 2);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* In all implementations count != 0 means locked */
|
/* In all implementations count != 0 means locked */
|
||||||
|
|||||||
Reference in New Issue
Block a user