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 97f7f2ebf3eaa4d5f2e00b0a9c6d23462a25aa2d) (cherry picked from commit 8326170bb6a02c97289689a4efda7062e991285f) (cherry picked from commit 088b154d2680429192da6ee83622037659e8b862)
This commit is contained in:
committed by
Treehugger Robot
parent
291f863611
commit
f8cc197cb1
@@ -7,6 +7,7 @@
|
||||
#include <linux/osq_lock.h>
|
||||
#include <linux/spinlock_types.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/android_vendor.h>
|
||||
|
||||
#ifndef CONFIG_PREEMPT_RT
|
||||
|
||||
@@ -51,6 +52,7 @@ struct mutex {
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
struct lockdep_map dep_map;
|
||||
#endif
|
||||
ANDROID_OEM_DATA_ARRAY(1, 2);
|
||||
};
|
||||
|
||||
#else /* !CONFIG_PREEMPT_RT */
|
||||
@@ -64,6 +66,7 @@ struct mutex {
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
struct lockdep_map dep_map;
|
||||
#endif
|
||||
ANDROID_OEM_DATA_ARRAY(1, 2);
|
||||
};
|
||||
|
||||
#endif /* CONFIG_PREEMPT_RT */
|
||||
|
||||
@@ -66,6 +66,7 @@ struct rw_semaphore {
|
||||
struct lockdep_map dep_map;
|
||||
#endif
|
||||
ANDROID_VENDOR_DATA(1);
|
||||
ANDROID_OEM_DATA_ARRAY(1, 2);
|
||||
};
|
||||
|
||||
#define RWSEM_UNLOCKED_VALUE 0UL
|
||||
|
||||
Reference in New Issue
Block a user