From eed2741ae61dd88e93fe96f6f9a99afa08cff2c4 Mon Sep 17 00:00:00 2001 From: Peifeng Li Date: Wed, 3 Aug 2022 19:42:27 +0800 Subject: [PATCH 01/28] ANDROID: vendor_hook: add hooks to protect locking-tsk in cpu scheduler Providing vendor hooks to record the start time of holding the lock, which protects rwsem/mutex locking-process from being preemptedfor a short time in some cases. - android_vh_record_mutex_lock_starttime - android_vh_record_rtmutex_lock_starttime - android_vh_record_rwsem_lock_starttime - android_vh_record_percpu_rwsem_lock_starttime Bug: 241191475 Signed-off-by: Peifeng Li Change-Id: I0e967a1e8b77c32a1ad588acd54028fae2f90c4e --- drivers/android/vendor_hooks.c | 4 ++++ include/linux/percpu-rwsem.h | 9 ++++++++- include/trace/hooks/dtask.h | 13 ++++++++++++- kernel/locking/mutex.c | 11 +++++++++-- kernel/locking/percpu-rwsem.c | 17 +++++++++++++++++ kernel/locking/rtmutex.c | 8 ++++++++ kernel/locking/rwsem.c | 21 ++++++++++++++++++--- 7 files changed, 76 insertions(+), 7 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 128f63a76938..d62f48f3f00f 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -259,6 +259,10 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_commit_creds); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_exit_creds); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_override_creds); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_revert_creds); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_record_mutex_lock_starttime); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_record_rtmutex_lock_starttime); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_record_rwsem_lock_starttime); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_record_percpu_rwsem_lock_starttime); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_memory_x); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_memory_nx); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_memory_ro); diff --git a/include/linux/percpu-rwsem.h b/include/linux/percpu-rwsem.h index 536976636c58..2f33e0a6e1a9 100644 --- a/include/linux/percpu-rwsem.h +++ b/include/linux/percpu-rwsem.h @@ -9,6 +9,9 @@ #include #include +void _trace_android_vh_record_percpu_rwsem_lock_starttime( + struct task_struct *tsk, unsigned long settime); + struct percpu_rw_semaphore { struct rcu_sync rss; unsigned int __percpu *read_count; @@ -73,6 +76,7 @@ static inline void percpu_down_read(struct percpu_rw_semaphore *sem) * bleeding the critical section out. */ preempt_enable(); + _trace_android_vh_record_percpu_rwsem_lock_starttime(current, jiffies); } static inline bool percpu_down_read_trylock(struct percpu_rw_semaphore *sem) @@ -93,14 +97,17 @@ static inline bool percpu_down_read_trylock(struct percpu_rw_semaphore *sem) * bleeding the critical section out. */ - if (ret) + if (ret) { + _trace_android_vh_record_percpu_rwsem_lock_starttime(current, jiffies); rwsem_acquire_read(&sem->dep_map, 0, 1, _RET_IP_); + } return ret; } static inline void percpu_up_read(struct percpu_rw_semaphore *sem) { + _trace_android_vh_record_percpu_rwsem_lock_starttime(current, 0); rwsem_release(&sem->dep_map, _RET_IP_); preempt_disable(); diff --git a/include/trace/hooks/dtask.h b/include/trace/hooks/dtask.h index 9890bfe5c41d..fcf0ea550455 100644 --- a/include/trace/hooks/dtask.h +++ b/include/trace/hooks/dtask.h @@ -71,7 +71,18 @@ DECLARE_HOOK(android_vh_mutex_unlock_slowpath_end, DECLARE_HOOK(android_vh_mutex_start_check_new_owner, TP_PROTO(struct mutex *lock), TP_ARGS(lock)); - +DECLARE_HOOK(android_vh_record_mutex_lock_starttime, + TP_PROTO(struct task_struct *tsk, unsigned long settime_jiffies), + TP_ARGS(tsk, settime_jiffies)); +DECLARE_HOOK(android_vh_record_rtmutex_lock_starttime, + TP_PROTO(struct task_struct *tsk, unsigned long settime_jiffies), + TP_ARGS(tsk, settime_jiffies)); +DECLARE_HOOK(android_vh_record_rwsem_lock_starttime, + TP_PROTO(struct task_struct *tsk, unsigned long settime_jiffies), + TP_ARGS(tsk, settime_jiffies)); +DECLARE_HOOK(android_vh_record_percpu_rwsem_lock_starttime, + TP_PROTO(struct task_struct *tsk, unsigned long settime_jiffies), + TP_ARGS(tsk, settime_jiffies)); /* macro versions of hooks are no longer required */ #endif /* _TRACE_HOOK_DTASK_H */ diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index 6d4f413264d2..4fa524e21420 100644 --- a/kernel/locking/mutex.c +++ b/kernel/locking/mutex.c @@ -170,8 +170,10 @@ static __always_inline bool __mutex_trylock_fast(struct mutex *lock) unsigned long curr = (unsigned long)current; unsigned long zero = 0UL; - if (atomic_long_try_cmpxchg_acquire(&lock->owner, &zero, curr)) + if (atomic_long_try_cmpxchg_acquire(&lock->owner, &zero, curr)) { + trace_android_vh_record_mutex_lock_starttime(current, jiffies); return true; + } return false; } @@ -748,6 +750,7 @@ static noinline void __sched __mutex_unlock_slowpath(struct mutex *lock, unsigne */ void __sched mutex_unlock(struct mutex *lock) { + trace_android_vh_record_mutex_lock_starttime(current, 0); #ifndef CONFIG_DEBUG_LOCK_ALLOC if (__mutex_unlock_fast(lock)) return; @@ -978,6 +981,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass, lock_acquired(&lock->dep_map, ip); if (ww_ctx) ww_mutex_set_context_fastpath(ww, ww_ctx); + trace_android_vh_record_mutex_lock_starttime(current, jiffies); preempt_enable(); return 0; } @@ -1097,6 +1101,7 @@ skip_wait: spin_unlock(&lock->wait_lock); preempt_enable(); + trace_android_vh_record_mutex_lock_starttime(current, jiffies); return 0; err: @@ -1433,8 +1438,10 @@ int __sched mutex_trylock(struct mutex *lock) #endif locked = __mutex_trylock(lock); - if (locked) + if (locked) { + trace_android_vh_record_mutex_lock_starttime(current, jiffies); mutex_acquire(&lock->dep_map, 0, 1, _RET_IP_); + } return locked; } diff --git a/kernel/locking/percpu-rwsem.c b/kernel/locking/percpu-rwsem.c index b88eda4eb624..4a9e7aafd7f4 100644 --- a/kernel/locking/percpu-rwsem.c +++ b/kernel/locking/percpu-rwsem.c @@ -10,6 +10,21 @@ #include #include +#include + +/* + * trace_android_vh_record_percpu_rwsem_lock_starttime is called in + * include/linux/percpu-rwsem.h by including include/hooks/dtask.h, which + * will result to build-err. So we create + * func:_trace_android_vh_record_percpu_rwsem_lock_starttime for percpu-rwsem.h to call. + */ +void _trace_android_vh_record_percpu_rwsem_lock_starttime(struct task_struct *tsk, + unsigned long settime) +{ + trace_android_vh_record_percpu_rwsem_lock_starttime(tsk, settime); +} +EXPORT_SYMBOL_GPL(_trace_android_vh_record_percpu_rwsem_lock_starttime); + int __percpu_init_rwsem(struct percpu_rw_semaphore *sem, const char *name, struct lock_class_key *key) { @@ -237,11 +252,13 @@ void percpu_down_write(struct percpu_rw_semaphore *sem) /* Wait for all active readers to complete. */ rcuwait_wait_event(&sem->writer, readers_active_check(sem), TASK_UNINTERRUPTIBLE); + trace_android_vh_record_percpu_rwsem_lock_starttime(current, jiffies); } EXPORT_SYMBOL_GPL(percpu_down_write); void percpu_up_write(struct percpu_rw_semaphore *sem) { + trace_android_vh_record_percpu_rwsem_lock_starttime(current, 0); rwsem_release(&sem->dep_map, _RET_IP_); /* diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 49c0fa173bde..419cc6639894 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -1471,6 +1471,7 @@ static inline void __rt_mutex_lock(struct rt_mutex *lock, unsigned int subclass) mutex_acquire(&lock->dep_map, subclass, 0, _RET_IP_); rt_mutex_fastlock(lock, TASK_UNINTERRUPTIBLE, rt_mutex_slowlock); + trace_android_vh_record_rtmutex_lock_starttime(current, jiffies); } #ifdef CONFIG_DEBUG_LOCK_ALLOC @@ -1519,6 +1520,8 @@ int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock) ret = rt_mutex_fastlock(lock, TASK_INTERRUPTIBLE, rt_mutex_slowlock); if (ret) mutex_release(&lock->dep_map, _RET_IP_); + else + trace_android_vh_record_rtmutex_lock_starttime(current, jiffies); return ret; } @@ -1563,6 +1566,8 @@ rt_mutex_timed_lock(struct rt_mutex *lock, struct hrtimer_sleeper *timeout) rt_mutex_slowlock); if (ret) mutex_release(&lock->dep_map, _RET_IP_); + else + trace_android_vh_record_rtmutex_lock_starttime(current, jiffies); return ret; } @@ -1589,6 +1594,8 @@ int __sched rt_mutex_trylock(struct rt_mutex *lock) ret = rt_mutex_fasttrylock(lock, rt_mutex_slowtrylock); if (ret) mutex_acquire(&lock->dep_map, 0, 1, _RET_IP_); + else + trace_android_vh_record_rtmutex_lock_starttime(current, jiffies); return ret; } @@ -1603,6 +1610,7 @@ void __sched rt_mutex_unlock(struct rt_mutex *lock) { mutex_release(&lock->dep_map, _RET_IP_); rt_mutex_fastunlock(lock, rt_mutex_slowunlock); + trace_android_vh_record_rtmutex_lock_starttime(current, 0); } EXPORT_SYMBOL_GPL(rt_mutex_unlock); diff --git a/kernel/locking/rwsem.c b/kernel/locking/rwsem.c index a33e6a36dae9..d368d1a1af49 100644 --- a/kernel/locking/rwsem.c +++ b/kernel/locking/rwsem.c @@ -279,6 +279,10 @@ static inline bool rwsem_read_trylock(struct rw_semaphore *sem) long cnt = atomic_long_add_return_acquire(RWSEM_READER_BIAS, &sem->count); if (WARN_ON_ONCE(cnt < 0)) rwsem_set_nonspinnable(sem); + + if ((cnt & RWSEM_READ_FAILED_MASK) == 0) + trace_android_vh_record_rwsem_lock_starttime(current, jiffies); + return !(cnt & RWSEM_READ_FAILED_MASK); } @@ -1021,9 +1025,11 @@ rwsem_down_read_slowpath(struct rw_semaphore *sem, int state) raw_spin_unlock_irq(&sem->wait_lock); wake_up_q(&wake_q); } + trace_android_vh_record_rwsem_lock_starttime(current, jiffies); return sem; } else if (rwsem_reader_phase_trylock(sem, waiter.last_rowner)) { /* rwsem_reader_phase_trylock() implies ACQUIRE on success */ + trace_android_vh_record_rwsem_lock_starttime(current, jiffies); return sem; } @@ -1104,6 +1110,7 @@ queue: __set_current_state(TASK_RUNNING); trace_android_vh_rwsem_read_wait_finish(sem); lockevent_inc(rwsem_rlock); + trace_android_vh_record_rwsem_lock_starttime(current, jiffies); return sem; out_nolock: @@ -1150,6 +1157,7 @@ rwsem_down_write_slowpath(struct rw_semaphore *sem, int state) if (rwsem_can_spin_on_owner(sem, RWSEM_WR_NONSPINNABLE) && rwsem_optimistic_spin(sem, true)) { /* rwsem_optimistic_spin() implies ACQUIRE on success */ + trace_android_vh_record_rwsem_lock_starttime(current, jiffies); return sem; } @@ -1280,7 +1288,7 @@ trylock_again: rwsem_disable_reader_optspin(sem, disable_rspin); raw_spin_unlock_irq(&sem->wait_lock); lockevent_inc(rwsem_wlock); - + trace_android_vh_record_rwsem_lock_starttime(current, jiffies); return ret; out_nolock: @@ -1396,6 +1404,7 @@ static inline int __down_read_trylock(struct rw_semaphore *sem) if (atomic_long_try_cmpxchg_acquire(&sem->count, &tmp, tmp + RWSEM_READER_BIAS)) { rwsem_set_reader_owned(sem); + trace_android_vh_record_rwsem_lock_starttime(current, jiffies); return 1; } } while (!(tmp & RWSEM_READ_FAILED_MASK)); @@ -1410,10 +1419,12 @@ static inline void __down_write(struct rw_semaphore *sem) long tmp = RWSEM_UNLOCKED_VALUE; if (unlikely(!atomic_long_try_cmpxchg_acquire(&sem->count, &tmp, - RWSEM_WRITER_LOCKED))) + RWSEM_WRITER_LOCKED))) { rwsem_down_write_slowpath(sem, TASK_UNINTERRUPTIBLE); - else + } else { + trace_android_vh_record_rwsem_lock_starttime(current, jiffies); rwsem_set_owner(sem); + } } static inline int __down_write_killable(struct rw_semaphore *sem) @@ -1425,6 +1436,7 @@ static inline int __down_write_killable(struct rw_semaphore *sem) if (IS_ERR(rwsem_down_write_slowpath(sem, TASK_KILLABLE))) return -EINTR; } else { + trace_android_vh_record_rwsem_lock_starttime(current, jiffies); rwsem_set_owner(sem); } return 0; @@ -1440,6 +1452,7 @@ static inline int __down_write_trylock(struct rw_semaphore *sem) if (atomic_long_try_cmpxchg_acquire(&sem->count, &tmp, RWSEM_WRITER_LOCKED)) { rwsem_set_owner(sem); + trace_android_vh_record_rwsem_lock_starttime(current, jiffies); return true; } return false; @@ -1455,6 +1468,7 @@ static inline void __up_read(struct rw_semaphore *sem) DEBUG_RWSEMS_WARN_ON(sem->magic != sem, sem); DEBUG_RWSEMS_WARN_ON(!is_rwsem_reader_owned(sem), sem); + trace_android_vh_record_rwsem_lock_starttime(current, 0); rwsem_clear_reader_owned(sem); tmp = atomic_long_add_return_release(-RWSEM_READER_BIAS, &sem->count); DEBUG_RWSEMS_WARN_ON(tmp < 0, sem); @@ -1481,6 +1495,7 @@ static inline void __up_write(struct rw_semaphore *sem) DEBUG_RWSEMS_WARN_ON((rwsem_owner(sem) != current) && !rwsem_test_oflags(sem, RWSEM_NONSPINNABLE), sem); + trace_android_vh_record_rwsem_lock_starttime(current, 0); rwsem_clear_owner(sem); tmp = atomic_long_fetch_add_release(-RWSEM_WRITER_LOCKED, &sem->count); if (unlikely(tmp & RWSEM_FLAG_WAITERS)) From 8d868467814e79d4770c276f954e5dd928401da6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 16 Aug 2022 12:53:02 +0200 Subject: [PATCH 02/28] Revert "ANDROID: vendor_hooks: Add hooks for binder" This reverts commit acefa91e517b9321295429d3a0e534908e2939c1. The hooks trace_android_vh_binder_proc_transaction_entry and trace_android_vh_binder_select_worklist_ilocked are 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: 219898723 Cc: Liujie Xie Signed-off-by: Greg Kroah-Hartman Change-Id: I2c04e60fa9d6eb6d85be7882d12f1b70956b8e80 --- drivers/android/binder.c | 12 ++---------- drivers/android/vendor_hooks.c | 2 -- include/trace/hooks/binder.h | 9 --------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index ba7d6a96514f..e2f6da3332a6 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -2576,7 +2576,6 @@ static int binder_proc_transaction(struct binder_transaction *t, struct binder_priority node_prio; bool oneway = !!(t->flags & TF_ONE_WAY); bool pending_async = false; - bool skip = false; struct binder_transaction *t_outdated = NULL; BUG_ON(!node); @@ -2605,10 +2604,7 @@ static int binder_proc_transaction(struct binder_transaction *t, return proc->is_frozen ? BR_FROZEN_REPLY : BR_DEAD_REPLY; } - trace_android_vh_binder_proc_transaction_entry(proc, t, - &thread, node->debug_id, pending_async, !oneway, &skip); - - if (!thread && !pending_async && !skip) + if (!thread && !pending_async) thread = binder_select_thread_ilocked(proc); trace_android_vh_binder_proc_transaction(current, proc->tsk, @@ -4150,10 +4146,6 @@ retry: size_t trsize = sizeof(*trd); binder_inner_proc_lock(proc); - trace_android_vh_binder_select_worklist_ilocked(&list, thread, - proc, wait_for_proc_work); - if (list) - goto skip; if (!binder_worklist_empty_ilocked(&thread->todo)) list = &thread->todo; else if (!binder_worklist_empty_ilocked(&proc->todo) && @@ -4167,7 +4159,7 @@ retry: goto retry; break; } -skip: + if (end - ptr < sizeof(tr) + 4) { binder_inner_proc_unlock(proc); break; diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index d62f48f3f00f..bf1bbb705313 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -294,10 +294,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_reply); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_trans); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_binder_transaction); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_preset); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_entry); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_proc_transaction_end); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_select_worklist_ilocked); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_new_ref); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_del_ref); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_post_init_entity_util_avg); diff --git a/include/trace/hooks/binder.h b/include/trace/hooks/binder.h index 5147261de15c..fd877ec5b67f 100644 --- a/include/trace/hooks/binder.h +++ b/include/trace/hooks/binder.h @@ -75,11 +75,6 @@ DECLARE_RESTRICTED_HOOK(android_rvh_binder_transaction, DECLARE_HOOK(android_vh_binder_preset, TP_PROTO(struct hlist_head *hhead, struct mutex *lock), TP_ARGS(hhead, lock)); -DECLARE_HOOK(android_vh_binder_proc_transaction_entry, - TP_PROTO(struct binder_proc *proc, struct binder_transaction *t, - struct binder_thread **thread, int node_debug_id, bool pending_async, - bool sync, bool *skip), - TP_ARGS(proc, t, thread, node_debug_id, pending_async, sync, skip)); DECLARE_HOOK(android_vh_binder_proc_transaction, TP_PROTO(struct task_struct *caller_task, struct task_struct *binder_proc_task, struct task_struct *binder_th_task, int node_debug_id, @@ -90,10 +85,6 @@ DECLARE_HOOK(android_vh_binder_proc_transaction_end, struct task_struct *binder_th_task, unsigned int code, bool pending_async, bool sync), TP_ARGS(caller_task, binder_proc_task, binder_th_task, code, pending_async, sync)); -DECLARE_HOOK(android_vh_binder_select_worklist_ilocked, - TP_PROTO(struct list_head **list, struct binder_thread *thread, struct binder_proc *proc, - int wait_for_proc_work), - TP_ARGS(list, thread, proc, wait_for_proc_work)); DECLARE_HOOK(android_vh_binder_new_ref, TP_PROTO(struct task_struct *proc, uint32_t ref_desc, int node_debug_id), TP_ARGS(proc, ref_desc, node_debug_id)); From eb99e6d80ee21eb061c55cdf14c0b05e0c61af4d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 16 Aug 2022 12:57:40 +0200 Subject: [PATCH 03/28] Revert "ANDROID: vendor_hook: Add hook in __free_pages()" This reverts commit 01680ae117e650bbc7b4c2714165218e019efebe. The hook android_vh_free_pages 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: 234214858 Cc: Bing Han Signed-off-by: Greg Kroah-Hartman Change-Id: I36d4bfb83e1605c6fd1f9ff8dcd39cdbcdef8760 --- drivers/android/vendor_hooks.c | 1 - include/trace/hooks/mm.h | 3 --- mm/page_alloc.c | 1 - 3 files changed, 5 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index bf1bbb705313..1eff6b292764 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -446,7 +446,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_unuse_swap_page); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_init_swap_info_struct); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_swapinfo); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_si); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_pages); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_shmem_page_flag); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_pidfd_open); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmput); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 8b0225ce7ced..0362142a1323 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -254,9 +254,6 @@ DECLARE_HOOK(android_vh_si_swapinfo, DECLARE_HOOK(android_vh_alloc_si, TP_PROTO(struct swap_info_struct **p, bool *skip), TP_ARGS(p, skip)); -DECLARE_HOOK(android_vh_free_pages, - TP_PROTO(struct page *page, unsigned int order), - TP_ARGS(page, order)); DECLARE_HOOK(android_vh_set_shmem_page_flag, TP_PROTO(struct page *page), TP_ARGS(page)); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d2b7eca3a2bf..9e43e2b8425c 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5183,7 +5183,6 @@ static inline void free_the_page(struct page *page, unsigned int order) void __free_pages(struct page *page, unsigned int order) { - trace_android_vh_free_pages(page, order); if (put_page_testzero(page)) free_the_page(page, order); else if (!PageHead(page)) From 567d65e53644b104c63d60c8fd679923708a3a22 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Tue, 16 Aug 2022 08:55:20 -0700 Subject: [PATCH 04/28] ANDROID: Guard rq_clock_task_mult with CONFIG_SMP rq->cpu only exists on CONFIG_SMP builds. PELT only needs to support SMP-enabled builds, so guard rq_clock_task_mult with CONFIG_SMP to support compilation of kernel without CONFIG_SMP enabled. Change-Id: I7779f5b10b44757dfd4cbc159b6ae3f3f1ddf3e7 Fixes: 93772777248d ("ANDROID: sched: Introducing PELT multiplier") Signed-off-by: Elliot Berman --- kernel/sched/sched.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 4b9eff7c8ee9..80a5af131251 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1193,6 +1193,7 @@ static inline u64 rq_clock_task(struct rq *rq) return rq->clock_task; } +#ifdef CONFIG_SMP DECLARE_PER_CPU(u64, clock_task_mult); static inline u64 rq_clock_task_mult(struct rq *rq) @@ -1202,6 +1203,7 @@ static inline u64 rq_clock_task_mult(struct rq *rq) return per_cpu(clock_task_mult, cpu_of(rq)); } +#endif /** * By default the decay is the default pelt decay period. From 23fdb24a480953b265fdda7d29df91828d92cc8d Mon Sep 17 00:00:00 2001 From: Peifeng Li Date: Tue, 16 Aug 2022 16:14:40 +0800 Subject: [PATCH 05/28] ANDROID: GKI: Update symbols to symbol list Leaf changes summary: 11 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 6 Added functions Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 5 Added variables 6 Added functions: [A] 'function int __traceiter_android_vh_do_page_trylock(void*, page*, rw_semaphore*, bool*, bool*)' [A] 'function int __traceiter_android_vh_handle_failed_page_trylock(void*, list_head*)' [A] 'function int __traceiter_android_vh_page_trylock_clear(void*, page*)' [A] 'function int __traceiter_android_vh_page_trylock_get_result(void*, page*, bool*)' [A] 'function int __traceiter_android_vh_page_trylock_set(void*, page*)' [A] 'function unsigned long int reclaim_pages(list_head*)' 5 Added variables: [A] 'tracepoint __tracepoint_android_vh_do_page_trylock' [A] 'tracepoint __tracepoint_android_vh_handle_failed_page_trylock' [A] 'tracepoint __tracepoint_android_vh_page_trylock_clear' [A] 'tracepoint __tracepoint_android_vh_page_trylock_get_result' [A] 'tracepoint __tracepoint_android_vh_page_trylock_set' Bug: 193384408 Signed-off-by: Peifeng Li Change-Id: I46e420a9e74fe67d37107a28e7f94148a4434b21 --- android/abi_gki_aarch64.xml | 11523 ++++++++++++++++---------------- android/abi_gki_aarch64_oplus | 11 + 2 files changed, 5644 insertions(+), 5890 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 16bd86e5d344..8c2c3d0ff92e 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -450,6 +450,7 @@ + @@ -479,6 +480,7 @@ + @@ -517,6 +519,9 @@ + + + @@ -4311,6 +4316,7 @@ + @@ -6304,6 +6310,7 @@ + @@ -6334,6 +6341,7 @@ + @@ -6375,6 +6383,9 @@ + + + @@ -7392,7 +7403,6 @@ - @@ -9179,9 +9189,9 @@ - - - + + + @@ -9202,7 +9212,6 @@ - @@ -9288,7 +9297,6 @@ - @@ -12631,8 +12639,8 @@ - - + + @@ -14713,9 +14721,9 @@ - + - + @@ -15454,12 +15462,6 @@ - - - - - - @@ -19103,7 +19105,6 @@ - @@ -19494,11 +19495,7 @@ - - - - - + @@ -20454,7 +20451,6 @@ - @@ -20652,7 +20648,6 @@ - @@ -21093,14 +21088,6 @@ - - - - - - - - @@ -25123,7 +25110,7 @@ - + @@ -25162,7 +25149,6 @@ - @@ -26334,7 +26320,7 @@ - + @@ -26492,7 +26478,7 @@ - + @@ -26721,7 +26707,6 @@ - @@ -26799,7 +26784,7 @@ - + @@ -27415,36 +27400,36 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -27872,7 +27857,7 @@ - + @@ -28821,7 +28806,6 @@ - @@ -31691,9 +31675,6 @@ - - - @@ -32702,9 +32683,9 @@ - - - + + + @@ -33605,7 +33586,6 @@ - @@ -34436,10 +34416,9 @@ - - + @@ -35050,7 +35029,7 @@ - + @@ -36691,10 +36670,6 @@ - - - - @@ -38626,7 +38601,6 @@ - @@ -39417,8 +39391,8 @@ - - + + @@ -40393,17 +40367,6 @@ - - - - - - - - - - - @@ -40684,9 +40647,9 @@ - - - + + + @@ -42203,7 +42166,6 @@ - @@ -44695,13 +44657,6 @@ - - - - - - - @@ -44731,11 +44686,6 @@ - - - - - @@ -45183,12 +45133,12 @@ - - - - - - + + + + + + @@ -45319,7 +45269,6 @@ - @@ -46102,21 +46051,21 @@ - + - + - + - + - + - + @@ -48221,8 +48170,8 @@ - - + + @@ -49836,11 +49785,6 @@ - - - - - @@ -50252,7 +50196,7 @@ - + @@ -50968,56 +50912,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -52308,7 +52203,7 @@ - + @@ -53153,7 +53048,6 @@ - @@ -53597,7 +53491,6 @@ - @@ -54637,7 +54530,6 @@ - @@ -55569,9 +55461,9 @@ - - - + + + @@ -56882,7 +56774,7 @@ - + @@ -57350,7 +57242,7 @@ - + @@ -59602,7 +59494,6 @@ - @@ -60066,11 +59957,6 @@ - - - - - @@ -61295,44 +61181,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -62565,65 +62414,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -64120,7 +63911,6 @@ - @@ -64436,15 +64226,15 @@ - + - + - + - + @@ -65526,7 +65316,7 @@ - + @@ -66048,10 +65838,10 @@ - - - - + + + + @@ -67347,11 +67137,6 @@ - - - - - @@ -68381,11 +68166,6 @@ - - - - - @@ -68848,7 +68628,7 @@ - + @@ -73396,8 +73176,8 @@ - - + + @@ -73516,7 +73296,6 @@ - @@ -73842,7 +73621,6 @@ - @@ -74207,8 +73985,8 @@ - - + + @@ -74748,38 +74526,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -74890,7 +74637,7 @@ - + @@ -77584,7 +77331,6 @@ - @@ -79012,12 +78758,12 @@ - + - + @@ -80102,12 +79848,12 @@ - - - - - - + + + + + + @@ -81645,7 +81391,6 @@ - @@ -83096,11 +82841,6 @@ - - - - - @@ -83123,7 +82863,6 @@ - @@ -83584,7 +83323,7 @@ - + @@ -83660,14 +83399,6 @@ - - - - - - - - @@ -87410,7 +87141,7 @@ - + @@ -88092,9 +87823,9 @@ - - - + + + @@ -88563,26 +88294,7 @@ - - - - - - - - - - - - - - - - - - - - + @@ -88607,7 +88319,7 @@ - + @@ -90143,7 +89855,7 @@ - + @@ -90791,8 +90503,8 @@ - - + + @@ -93050,7 +92762,7 @@ - + @@ -93225,7 +92937,7 @@ - + @@ -93661,12 +93373,12 @@ - + - + @@ -93758,7 +93470,6 @@ - @@ -95233,7 +94944,6 @@ - @@ -96520,7 +96230,7 @@ - + @@ -97032,7 +96742,7 @@ - + @@ -97084,7 +96794,7 @@ - + @@ -97522,7 +97232,7 @@ - + @@ -98234,9 +97944,6 @@ - - - @@ -99752,8 +99459,8 @@ - - + + @@ -99973,8 +99680,8 @@ - - + + @@ -102123,12 +101830,12 @@ - + - + - + @@ -103665,9 +103372,6 @@ - - - @@ -103706,7 +103410,7 @@ - + @@ -103847,8 +103551,8 @@ - - + + @@ -104449,7 +104153,6 @@ - @@ -108802,20 +108505,6 @@ - - - - - - - - - - - - - - @@ -113113,11 +112802,6 @@ - - - - - @@ -115234,7 +114918,6 @@ - @@ -115319,7 +115002,6 @@ - @@ -115443,8 +115125,8 @@ - - + + @@ -117616,9 +117298,9 @@ - - - + + + @@ -117627,14 +117309,14 @@ - - - + + + - - - + + + @@ -117780,11 +117462,11 @@ - - - - - + + + + + @@ -117811,18 +117493,18 @@ - - - - - + + + + + - - - - - + + + + + @@ -118082,25 +117764,25 @@ - - - - - - - - + + + + + + + + - - - + + + - - - - + + + + @@ -118166,11 +117848,19 @@ - - - - - + + + + + + + + + + + + + @@ -118180,9 +117870,9 @@ - - - + + + @@ -118191,14 +117881,14 @@ - - - - - - - - + + + + + + + + @@ -118231,10 +117921,10 @@ - - - - + + + + @@ -118243,22 +117933,22 @@ - - - + + + - - - - + + + + - - - - - + + + + + @@ -118337,11 +118027,11 @@ - - - - - + + + + + @@ -118355,11 +118045,16 @@ - - - - - + + + + + + + + + + @@ -118431,11 +118126,11 @@ - - - - - + + + + + @@ -118460,9 +118155,9 @@ - - - + + + @@ -118472,52 +118167,52 @@ - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - - - - - + + + + + + + + - - - - + + + + @@ -118586,25 +118281,41 @@ - - - - + + + + - - - - - - - + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -118636,14 +118347,14 @@ - - - - - - - - + + + + + + + + @@ -118702,16 +118413,16 @@ - - - - + + + + - - - - + + + + @@ -118839,9 +118550,9 @@ - - - + + + @@ -118850,10 +118561,10 @@ - - - - + + + + @@ -118861,10 +118572,10 @@ - - - - + + + + @@ -118873,10 +118584,10 @@ - - - - + + + + @@ -118936,12 +118647,12 @@ - - - - - - + + + + + + @@ -119063,13 +118774,13 @@ - - - - - - - + + + + + + + @@ -119588,10 +119299,10 @@ - + - - + + @@ -119619,12 +119330,12 @@ - + - - + + @@ -119663,9 +119374,9 @@ - - - + + + @@ -119676,21 +119387,22 @@ - + + - + - + - + - - - + + + @@ -119704,11 +119416,12 @@ - + + - + @@ -119721,20 +119434,20 @@ - + - + - - - - - - - - + + + + + + + + @@ -119744,12 +119457,15 @@ - + - - - + + + + + + @@ -119757,7 +119473,7 @@ - + @@ -119775,8 +119491,8 @@ - - + + @@ -119800,18 +119516,18 @@ - + - + - + - + - + @@ -119819,7 +119535,7 @@ - + @@ -119838,14 +119554,14 @@ - + - + @@ -120108,9 +119824,9 @@ - - - + + + @@ -120121,33 +119837,33 @@ - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - - - + + + @@ -120157,27 +119873,27 @@ - - - + + + - - - + + + - - - + + + - - - + + + @@ -120187,8 +119903,8 @@ - - + + @@ -120207,8 +119923,8 @@ - - + + @@ -120224,57 +119940,57 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + @@ -120285,16 +120001,16 @@ - - + + - - + + @@ -120322,12 +120038,12 @@ - - - - - - + + + + + + @@ -120344,9 +120060,9 @@ - - - + + + @@ -120362,29 +120078,29 @@ - - + + - - - - - + + + + + - - - + + + - - + + - - - + + + @@ -120401,15 +120117,15 @@ - - - + + + - - - + + + @@ -120422,22 +120138,22 @@ - - - - + + + + - - - - + + + + - - - - + + + + @@ -120516,13 +120232,13 @@ - - - - - - - + + + + + + + @@ -120531,29 +120247,29 @@ - - - + + + - - - - - - + + + + + + - - - - + + + + - - + + @@ -120595,11 +120311,11 @@ - - - - - + + + + + @@ -120619,14 +120335,14 @@ - - + + - - - - + + + + @@ -120649,15 +120365,15 @@ - - - - + + + + - - - + + + @@ -120665,11 +120381,11 @@ - - - - - + + + + + @@ -120720,21 +120436,21 @@ - - - - - + + + + + - - - - - - + + + + + + - - + + @@ -120775,18 +120491,18 @@ - - + + - - - + + + - - - + + + @@ -120819,17 +120535,17 @@ - - - - + + + + - - - - - + + + + + @@ -120840,47 +120556,47 @@ - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - - - + + + + - - + + - - + + @@ -120890,15 +120606,15 @@ - - + + - - - - - + + + + + @@ -120911,9 +120627,9 @@ - - - + + + @@ -120922,49 +120638,49 @@ - - - - + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + @@ -120974,10 +120690,10 @@ - - - - + + + + @@ -121027,17 +120743,17 @@ - - + + - - + + - - - + + + @@ -121072,10 +120788,10 @@ - - - - + + + + @@ -121107,13 +120823,13 @@ - - - + + + - - + + @@ -121144,8 +120860,8 @@ - - + + @@ -121154,8 +120870,8 @@ - - + + @@ -121177,8 +120893,8 @@ - - + + @@ -121225,8 +120941,8 @@ - - + + @@ -121248,14 +120964,14 @@ - - + + - - - - + + + + @@ -121291,9 +121007,9 @@ - - - + + + @@ -121442,16 +121158,16 @@ - - + + - - + + @@ -121500,42 +121216,42 @@ - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - + + + - - - - - - + + + + + + - - - + + + @@ -121556,31 +121272,31 @@ - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - + + + + @@ -121598,9 +121314,9 @@ - - - + + + @@ -121648,67 +121364,67 @@ - - - - + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + + @@ -121724,16 +121440,16 @@ - - + + - - - - - - + + + + + + @@ -121754,22 +121470,22 @@ - - + + - - + + - - + + - - + + @@ -121793,23 +121509,23 @@ - - - + + + - - - - - + + + + + - - - - - + + + + + @@ -121819,8 +121535,8 @@ - - + + @@ -121833,8 +121549,8 @@ - - + + @@ -121904,9 +121620,9 @@ - - - + + + @@ -121950,11 +121666,11 @@ - - - - - + + + + + @@ -121970,19 +121686,19 @@ - - - + + + - - - + + + - - - + + + @@ -122014,9 +121730,9 @@ - - - + + + @@ -122105,14 +121821,14 @@ - - - + + + - - - + + + @@ -122124,47 +121840,47 @@ - - - + + + - - - - + + + + - - + + - - - - - + + + + + - - - - - + + + + + - - + + - - - - + + + + - - + + @@ -122177,30 +121893,30 @@ - - + + - - + + - - + + - - - + + + - - - + + + @@ -122209,48 +121925,48 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + @@ -122261,8 +121977,8 @@ - - + + @@ -122380,8 +122096,8 @@ - - + + @@ -122489,28 +122205,28 @@ - - - + + + - - + + - - - - - + + + + + @@ -122521,13 +122237,13 @@ - - - - - - - + + + + + + + @@ -122538,11 +122254,11 @@ - - - - - + + + + + @@ -122554,11 +122270,11 @@ - - - - - + + + + + @@ -122577,8 +122293,8 @@ - - + + @@ -122615,10 +122331,10 @@ - - - - + + + + @@ -122656,22 +122372,22 @@ - - + + - - - - + + + + - - + + - - + + @@ -122682,9 +122398,9 @@ - - - + + + @@ -122703,15 +122419,15 @@ - - + + - - - - + + + + @@ -122722,9 +122438,9 @@ - - - + + + @@ -122785,8 +122501,8 @@ - - + + @@ -122817,18 +122533,18 @@ - - + + - - - + + + - - - + + + @@ -122840,8 +122556,8 @@ - - + + @@ -122857,9 +122573,9 @@ - - - + + + @@ -122892,12 +122608,12 @@ - - + + - - + + @@ -122908,23 +122624,23 @@ - - + + - - - + + + - - - - + + + + @@ -122939,9 +122655,9 @@ - - - + + + @@ -122960,8 +122676,8 @@ - - + + @@ -122981,58 +122697,58 @@ - - - + + + - - - + + + - - - - + + + + - - - - - + + + + + - - - - - + + + + + - + - + - - - + + + - - - - - + + + + + - - - - - + + + + + @@ -123081,16 +122797,16 @@ - - + + - - + + @@ -123125,10 +122841,10 @@ - - - - + + + + @@ -123183,42 +122899,42 @@ - - - - - - + + + + + + - - - - - - + + + + + + - - + + - - - + + + - - - + + + - + @@ -123261,10 +122977,10 @@ - - - - + + + + @@ -123272,9 +122988,9 @@ - - - + + + @@ -123284,7 +123000,7 @@ - + @@ -123309,8 +123025,8 @@ - - + + @@ -123331,22 +123047,22 @@ - - + + - - - + + + - - - + + + @@ -123396,11 +123112,11 @@ - - - - - + + + + + @@ -123408,44 +123124,44 @@ - - - - - + + + + + - - - - + + + + - - - - - + + + + + - - - - + + + + - - + + - - + + - - - - + + + + @@ -123470,8 +123186,8 @@ - - + + @@ -123496,18 +123212,18 @@ - - - + + + - - - + + + @@ -123524,9 +123240,9 @@ - - - + + + @@ -123537,11 +123253,11 @@ - - - - - + + + + + @@ -123551,11 +123267,11 @@ - - + + - + @@ -123577,17 +123293,17 @@ - - + + - - + + - - - + + + @@ -123595,22 +123311,22 @@ - - + + - - + + - - - - + + + + @@ -123618,9 +123334,9 @@ - - - + + + @@ -123651,12 +123367,12 @@ - - + + - - + + @@ -123665,7 +123381,7 @@ - + @@ -123696,11 +123412,11 @@ - - - - - + + + + + @@ -123710,17 +123426,17 @@ - - - + + + - - - - - - + + + + + + @@ -123732,12 +123448,12 @@ - - - - - - + + + + + + @@ -123774,11 +123490,11 @@ - - - - - + + + + + @@ -123788,11 +123504,11 @@ - - - - - + + + + + @@ -123824,9 +123540,9 @@ - - - + + + @@ -123837,8 +123553,8 @@ - - + + @@ -123848,9 +123564,9 @@ - - - + + + @@ -123859,11 +123575,11 @@ - - - - - + + + + + @@ -123876,16 +123592,16 @@ - - + + - - + + - - + + @@ -123902,18 +123618,18 @@ - - - - + + + + - - + + @@ -123955,49 +123671,49 @@ - - + + - - - - + + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -124019,9 +123735,9 @@ - - - + + + @@ -124034,9 +123750,9 @@ - - - + + + @@ -124058,10 +123774,10 @@ - - - - + + + + @@ -124092,15 +123808,15 @@ - - - - + + + + - - - + + + @@ -124120,8 +123836,8 @@ - - + + @@ -124137,8 +123853,8 @@ - - + + @@ -124146,13 +123862,13 @@ - - + + - - - + + + @@ -124163,9 +123879,9 @@ - - - + + + @@ -124182,16 +123898,16 @@ - - + + - - + + @@ -124216,9 +123932,9 @@ - - - + + + @@ -124312,9 +124028,9 @@ - - - + + + @@ -124327,17 +124043,17 @@ - - - - + + + + - - - - + + + + @@ -124345,10 +124061,10 @@ - - - - + + + + @@ -124356,9 +124072,9 @@ - - - + + + @@ -124383,11 +124099,11 @@ - - - - - + + + + + @@ -124459,20 +124175,20 @@ - - + + - - + + - - + + @@ -124485,8 +124201,8 @@ - - + + @@ -124508,12 +124224,12 @@ - - - - - - + + + + + + @@ -124522,40 +124238,40 @@ - - - + + + - - - - - - - + + + + + + + - - + + - - - + + + - - - - + + + + - - - - + + + + @@ -124590,28 +124306,28 @@ - - - + + + - - + + - - - - + + + + - - - + + + @@ -124633,10 +124349,10 @@ - - - - + + + + @@ -124658,11 +124374,11 @@ - - - - - + + + + + @@ -124685,15 +124401,15 @@ - - - + + + - - - - + + + + @@ -124710,14 +124426,14 @@ - - - + + + - - - + + + @@ -124746,24 +124462,31 @@ - - + + - - + + - - - - + + + + + + + + + + + @@ -124784,10 +124507,10 @@ - - - - + + + + @@ -124795,15 +124518,15 @@ - - - - + + + + - - - + + + @@ -124910,11 +124633,11 @@ - - - - - + + + + + @@ -125112,29 +124835,29 @@ - - - - + + + + - - - + + + - - - - + + + + - - - - - + + + + + @@ -125144,10 +124867,10 @@ - - - - + + + + @@ -125179,6 +124902,11 @@ + + + + + @@ -125186,14 +124914,14 @@ - - - - - - - - + + + + + + + + @@ -125206,9 +124934,9 @@ - - - + + + @@ -125229,6 +124957,12 @@ + + + + + + @@ -125241,8 +124975,8 @@ - - + + @@ -125309,14 +125043,14 @@ - - - + + + - - - + + + @@ -125324,10 +125058,10 @@ - - - - + + + + @@ -125350,6 +125084,11 @@ + + + + + @@ -125380,15 +125119,15 @@ - - - - + + + + - - - + + + @@ -125487,16 +125226,16 @@ - - - + + + - - - - - + + + + + @@ -125552,34 +125291,34 @@ - - - + + + - - - - - + + + + + - - - - - + + + + + - - + + - - - - - + + + + + @@ -125590,12 +125329,12 @@ - - + + - - + + @@ -125704,9 +125443,9 @@ - - - + + + @@ -125728,17 +125467,17 @@ - - + + - - - + + + - - + + @@ -125746,15 +125485,15 @@ - - - + + + - - - - + + + + @@ -125765,34 +125504,34 @@ - - + + - - - - + + + + - - + + - - - + + + - - - - + + + + @@ -125804,9 +125543,9 @@ - - - + + + @@ -125814,8 +125553,8 @@ - - + + @@ -125826,15 +125565,15 @@ - + - - - - - - + + + + + + @@ -125846,13 +125585,13 @@ - - - - + + + + - - + + @@ -125872,10 +125611,10 @@ - - - - + + + + @@ -126033,46 +125772,46 @@ - - - + + + - - - + + + - - + + - - - - - + + + + + - - + + - - - + + + - - - - + + + + - - - - - + + + + + @@ -126205,8 +125944,8 @@ - - + + @@ -126250,8 +125989,8 @@ - - + + @@ -126263,8 +126002,8 @@ - - + + @@ -126275,8 +126014,8 @@ - - + + @@ -126446,9 +126185,9 @@ - - - + + + @@ -126458,62 +126197,62 @@ - - + + - - - + + + - - + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + @@ -126531,14 +126270,14 @@ - - - + + + - - - + + + @@ -126573,13 +126312,13 @@ - - - - - - - + + + + + + + @@ -126803,62 +126542,62 @@ - - + + - - - + + + - - + + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + @@ -126874,15 +126613,15 @@ - - + + - - - - - + + + + + @@ -126893,10 +126632,10 @@ - - - - + + + + @@ -126939,8 +126678,8 @@ - - + + @@ -126948,9 +126687,9 @@ - - - + + + @@ -126987,9 +126726,9 @@ - - - + + + @@ -126998,8 +126737,8 @@ - - + + @@ -127007,19 +126746,19 @@ - - - - - + + + + + - - - - - - + + + + + + @@ -127027,20 +126766,20 @@ - - + + - - + + - - + + - - + + @@ -127053,17 +126792,17 @@ - - + + - - + + - - - + + + @@ -127110,19 +126849,19 @@ - - - - - - - + + + + + + + - - - + + + @@ -127130,17 +126869,17 @@ - - - + + + - - + + @@ -127158,20 +126897,20 @@ - - + + - - + + - - + + @@ -127184,11 +126923,11 @@ - - - - - + + + + + @@ -127199,33 +126938,33 @@ - - - + + + - - - - + + + + - - - - + + + + - - + + - - + + @@ -127535,23 +127274,23 @@ - - + + - - - - + + + + - - - + + + @@ -127567,12 +127306,12 @@ - - - - - - + + + + + + @@ -127624,26 +127363,26 @@ - - - - - + + + + + - - + + - - - - + + + + - - - - + + + + @@ -127798,10 +127537,10 @@ - - - - + + + + @@ -127851,9 +127590,9 @@ - - - + + + @@ -127982,19 +127721,19 @@ - - - + + + - - - + + + - - - + + + @@ -128095,8 +127834,8 @@ - - + + @@ -128118,9 +127857,9 @@ - - - + + + @@ -128153,8 +127892,8 @@ - - + + @@ -128169,24 +127908,24 @@ - - + + - - - + + + - - - - + + + + - - - + + + @@ -128205,9 +127944,9 @@ - - - + + + @@ -128221,18 +127960,18 @@ - - + + - - - + + + - - - + + + @@ -128253,9 +127992,9 @@ - - - + + + @@ -128286,28 +128025,28 @@ - - + + - - + + - - - + + + - - - - + + + + - - - + + + @@ -128318,83 +128057,83 @@ - - - + + + - - - - + + + + - - - + + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - + + - - - - + + + + - - - - + + + + @@ -128450,17 +128189,17 @@ - - + + - - + + - - - + + + @@ -128474,20 +128213,20 @@ - - + + - - + + - - + + @@ -128556,9 +128295,9 @@ - - - + + + @@ -128570,44 +128309,44 @@ - - + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + @@ -128617,12 +128356,12 @@ - - - - - - + + + + + + @@ -128633,9 +128372,9 @@ - - - + + + @@ -128643,18 +128382,18 @@ - - - - + + + + - - - - - - - + + + + + + + @@ -128669,30 +128408,30 @@ - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + @@ -128728,8 +128467,8 @@ - - + + @@ -128813,20 +128552,20 @@ - - + + - - - - - - - - - - + + + + + + + + + + @@ -128835,19 +128574,19 @@ - - - + + + - - - - + + + + - - - + + + @@ -128874,40 +128613,40 @@ - - - - + + + + - - + + - - + + - - - + + + - - - - + + + + - - - - + + + + @@ -129146,8 +128885,8 @@ - - + + @@ -129161,13 +128900,13 @@ - - + + - - - + + + @@ -129184,10 +128923,10 @@ - - - - + + + + @@ -129220,14 +128959,14 @@ - - - + + + - - - + + + @@ -129235,17 +128974,17 @@ - - - - + + + + - - + + @@ -129260,9 +128999,9 @@ - - - + + + @@ -129276,54 +129015,54 @@ - - - - + + + + - - + + - - + + - - + + - - - - + + + + - - - - + + + + - - + + - - + + - - - + + + - - + + @@ -129333,15 +129072,15 @@ - - - + + + - - - - + + + + @@ -129374,18 +129113,18 @@ - - - - + + + + - - - - - + + + + + @@ -129393,9 +129132,9 @@ - - - + + + @@ -129429,12 +129168,12 @@ - - + + - - + + @@ -129480,15 +129219,15 @@ - - - + + + - - - - + + + + @@ -129497,13 +129236,13 @@ - - - + + + - - + + @@ -129513,21 +129252,21 @@ - - - + + + - - - - + + + + - - - - + + + + @@ -129543,26 +129282,26 @@ - - + + - - - + + + - - + + - - - + + + @@ -129579,11 +129318,11 @@ - - + + - + @@ -129598,8 +129337,8 @@ - - + + @@ -129647,18 +129386,18 @@ - - - + + + - - + + - - - + + + @@ -129666,13 +129405,13 @@ - - + + - - - + + + @@ -129688,9 +129427,9 @@ - - - + + + @@ -129784,9 +129523,9 @@ - - - + + + @@ -129835,11 +129574,11 @@ - - - - - + + + + + @@ -129859,11 +129598,11 @@ - - - - - + + + + + @@ -129975,8 +129714,8 @@ - - + + @@ -129985,9 +129724,9 @@ - - - + + + @@ -130000,8 +129739,8 @@ - - + + @@ -130044,12 +129783,12 @@ - - + + - - + + @@ -130086,35 +129825,35 @@ - - + + - - - + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - + + + @@ -130126,13 +129865,13 @@ - - - + + + - - + + @@ -130175,36 +129914,36 @@ - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - + + @@ -130247,13 +129986,13 @@ - - - - - - - + + + + + + + @@ -130278,13 +130017,13 @@ - - - + + + - - + + @@ -130320,10 +130059,10 @@ - - - - + + + + @@ -130333,12 +130072,12 @@ - - + + - - + + @@ -130349,17 +130088,17 @@ - - - - - - - + + + + + + + - - + + @@ -130376,8 +130115,8 @@ - - + + @@ -130407,15 +130146,15 @@ - - + + - - - - - + + + + + @@ -130427,8 +130166,8 @@ - - + + @@ -130454,8 +130193,8 @@ - - + + @@ -130469,20 +130208,20 @@ - - + + - + - - - + + + @@ -130499,41 +130238,41 @@ - - - - + + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + @@ -130543,13 +130282,13 @@ - - + + - - - + + + @@ -130563,41 +130302,41 @@ - - - - - - + + + + + + - - + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + @@ -130611,8 +130350,8 @@ - - + + @@ -130624,18 +130363,18 @@ - - + + - - - - + + + + @@ -130659,23 +130398,23 @@ - - - + + + - - - + + + - - - + + + - - + + @@ -130688,9 +130427,9 @@ - - - + + + @@ -130698,29 +130437,29 @@ - - - - + + + + - - + + - - - - - + + + + + - - - - - - + + + + + + @@ -130764,9 +130503,9 @@ - - - + + + @@ -130775,8 +130514,8 @@ - - + + @@ -130785,9 +130524,9 @@ - - - + + + @@ -130884,8 +130623,8 @@ - - + + @@ -130912,10 +130651,10 @@ - - - - + + + + @@ -130927,25 +130666,25 @@ - - - + + + - - + + - - + + - - + + - - + + @@ -130990,10 +130729,10 @@ - - + + - + @@ -131008,22 +130747,22 @@ - - - + + + - - - + + + - - + + - - + + @@ -131080,38 +130819,38 @@ - - - - + + + + - - - - - - - - + + + + + + + + - - + + - - + + - + - - + + @@ -131122,9 +130861,9 @@ - - - + + + @@ -131139,26 +130878,26 @@ - - + + - - - - + + + + - - - - - - + + + + + + - - + + @@ -131169,32 +130908,33 @@ + - - + + - - - + + + - - + + - - - - - + + + + + - - - - + + + + @@ -131209,28 +130949,28 @@ - - - - - + + + + + - - + + - - - - - + + + + + - - - - + + + + @@ -131252,18 +130992,18 @@ - - + + - - + + - - + + @@ -131286,12 +131026,12 @@ - - + + - - + + @@ -131328,9 +131068,9 @@ - - - + + + @@ -131365,81 +131105,81 @@ - - - + + + - - - + + + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -131569,12 +131309,12 @@ - - + + - - + + @@ -131617,14 +131357,14 @@ - - + + - - - - + + + + @@ -131645,36 +131385,36 @@ - - - - - + + + + + - - + + - - - + + + - - - - - - + + + + + + - - - - - - + + + + + + @@ -131685,39 +131425,39 @@ - - + + - - - + + + - - - - + + + + - - - + + + - - + + - - - + + + - - - - + + + + @@ -131743,14 +131483,14 @@ - - + + - - - - + + + + @@ -131771,12 +131511,12 @@ - - + + - - + + @@ -131792,8 +131532,8 @@ - - + + @@ -131926,21 +131666,21 @@ - - - - - + + + + + - - - - - - - - + + + + + + + + @@ -131950,8 +131690,8 @@ - - + + @@ -131974,8 +131714,8 @@ - - + + @@ -131983,9 +131723,9 @@ - - - + + + @@ -132005,24 +131745,24 @@ - - - - + + + + - - - + + + - - - - + + + + @@ -132030,50 +131770,50 @@ - - - - - - + + + + + + - - - + + + - - + + - - + + - - - - + + + + - - - + + + - - - + + + - - - + + + @@ -132089,8 +131829,8 @@ - - + + @@ -132111,8 +131851,8 @@ - - + + @@ -132127,8 +131867,8 @@ - - + + @@ -132161,20 +131901,20 @@ - - + + - - + + - - + + @@ -132211,12 +131951,12 @@ - - + + - - + + @@ -132228,34 +131968,34 @@ - - + + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - - + + @@ -132340,9 +132080,9 @@ - - - + + + @@ -132503,74 +132243,74 @@ - - - + + + - - + + - - - + + + - - + + - - - - - - + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - - - + + + - - - - + + + + - - - - + + + + @@ -132578,53 +132318,53 @@ - - - - + + + + - - - - - + + + + + - - - - + + + + - - + + - - + + - - - - - - + + + + + + - - - - - + + + + + @@ -132659,8 +132399,8 @@ - - + + @@ -132760,13 +132500,13 @@ - - - + + + - - + + @@ -132777,15 +132517,15 @@ - - - - - - - - - + + + + + + + + + @@ -132821,9 +132561,9 @@ - - - + + + @@ -132849,30 +132589,30 @@ - - - + + + - - - - + + + + - - - - + + + + - - - + + + @@ -132885,10 +132625,10 @@ - - - - + + + + @@ -132896,11 +132636,11 @@ - - - - - + + + + + @@ -132923,10 +132663,10 @@ - - - - + + + + @@ -132939,20 +132679,20 @@ - - - + + + - - - - + + + + - + - - + + @@ -132969,9 +132709,9 @@ - - - + + + @@ -133073,14 +132813,14 @@ - - - + + + - - + + @@ -133167,8 +132907,8 @@ - - + + @@ -133178,56 +132918,56 @@ - - + + - - - - - - - - - + + + + + + + + + - - + + - - - - - - - - - + + + + + + + + + - - + + - - + + - - + + - - + + - + @@ -133238,10 +132978,10 @@ - - - - + + + + @@ -133267,21 +133007,21 @@ - - - - + + + + - - - + + + - - - - + + + + @@ -133292,35 +133032,35 @@ - - - - - - - - + + + + + + + + - - + + - - - + + + - - - - + + + + - - - - + + + + @@ -133352,46 +133092,46 @@ - - - - + + + + - - - + + + - - + + - - + + - - - + + + - - - - - + + + + + - - + + - - - + + + @@ -133400,35 +133140,35 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + - - + + - - + + @@ -133437,23 +133177,23 @@ - - - + + + - - - + + + - - - + + + @@ -133461,34 +133201,34 @@ - - - - + + + + - - - + + + - - - - + + + + - - - - + + + + - - - - - + + + + + @@ -133498,16 +133238,16 @@ - - - - + + + + - - - - + + + + @@ -133523,10 +133263,10 @@ - - - - + + + + @@ -133536,10 +133276,10 @@ - - - - + + + + @@ -133549,37 +133289,37 @@ - - - - + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - - - + + + + + @@ -133590,9 +133330,9 @@ - - - + + + @@ -133606,11 +133346,11 @@ - - - - - + + + + + @@ -133646,11 +133386,11 @@ - - + + - + @@ -133667,15 +133407,15 @@ - - + + - - + + - - + + @@ -133695,8 +133435,8 @@ - - + + @@ -133710,8 +133450,8 @@ - - + + @@ -133723,8 +133463,8 @@ - - + + @@ -133738,18 +133478,18 @@ - - - + + + - - - - + + + + - - + + @@ -133757,10 +133497,10 @@ - - - - + + + + @@ -133773,14 +133513,14 @@ - - - - + + + + - - + + @@ -133816,18 +133556,18 @@ - - - + + + - - - + + + @@ -133838,8 +133578,8 @@ - - + + @@ -133860,10 +133600,10 @@ - - - - + + + + @@ -133873,30 +133613,30 @@ - - - - - + + + + + - - + + - - + + - - - + + + - - + + @@ -133915,11 +133655,11 @@ - - - - - + + + + + @@ -133927,13 +133667,13 @@ - - + + - - + + @@ -133950,11 +133690,11 @@ - - - - - + + + + + @@ -133993,8 +133733,8 @@ - - + + @@ -134002,25 +133742,25 @@ - - - + + + - - + + - - - - + + + + - - - - + + + + @@ -134033,9 +133773,9 @@ - - - + + + @@ -134046,13 +133786,13 @@ - - + + - - - + + + @@ -134060,50 +133800,50 @@ - - - + + + - - + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + @@ -134117,8 +133857,8 @@ - - + + @@ -134194,9 +133934,9 @@ - - - + + + @@ -134234,32 +133974,32 @@ - - + + - - - + + + - - - - + + + + - - - + + + - - - + + + - + @@ -134272,9 +134012,9 @@ - - - + + + @@ -134354,10 +134094,10 @@ - - - - + + + + @@ -134402,13 +134142,13 @@ - - - - - - - + + + + + + + @@ -134599,12 +134339,12 @@ - - + + - - + + @@ -134616,11 +134356,11 @@ - - - - - + + + + + @@ -134661,8 +134401,8 @@ - - + + @@ -134715,8 +134455,8 @@ - - + + @@ -134728,9 +134468,9 @@ - - - + + + @@ -134741,28 +134481,28 @@ - - - + + + - - - - - - + + + + + + - - + + - - - - - + + + + + @@ -134773,9 +134513,9 @@ - - - + + + @@ -134836,8 +134576,8 @@ - - + + @@ -134876,9 +134616,9 @@ - - - + + + @@ -134934,8 +134674,8 @@ - - + + @@ -134957,12 +134697,12 @@ - - + + - - + + @@ -134996,8 +134736,8 @@ - - + + @@ -135008,9 +134748,9 @@ - - - + + + @@ -135018,47 +134758,47 @@ - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - - - - + + + + + @@ -135066,18 +134806,18 @@ - - - - + + + + - - + + @@ -135085,14 +134825,14 @@ - - - - + + + + - - - + + + @@ -135128,17 +134868,17 @@ - - + + - - - + + + @@ -135148,9 +134888,9 @@ - - - + + + @@ -135192,12 +134932,12 @@ - - + + - - + + @@ -135211,67 +134951,67 @@ - - - + + + - - + + - - + + - - + + - - + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - - + + + @@ -135279,19 +135019,19 @@ - - + + - - + + - - - - - + + + + + @@ -135302,41 +135042,41 @@ - - - - + + + + - - - + + + - - + + - - - - - + + + + + - - + + - - + + @@ -135350,16 +135090,16 @@ - - - - + + + + - - - - + + + + @@ -135380,11 +135120,11 @@ - - - - - + + + + + @@ -135401,24 +135141,24 @@ - - - - + + + + - - - - - + + + + + - - - - - + + + + + @@ -135443,10 +135183,10 @@ - - - - + + + + @@ -135459,12 +135199,12 @@ - - + + - - + + @@ -135489,18 +135229,18 @@ - - - + + + - - + + - - - + + + @@ -135524,18 +135264,18 @@ - - - - - + + + + + - - - - - + + + + + @@ -135546,19 +135286,19 @@ - - - - + + + + - - + + - - - + + + @@ -135577,14 +135317,14 @@ - - - + + + - - - + + + @@ -135610,9 +135350,9 @@ - - - + + + @@ -135625,22 +135365,22 @@ - - - - + + + + - - + + - - + + @@ -135660,43 +135400,43 @@ - - + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - - - - + + + + + @@ -135709,9 +135449,9 @@ - - - + + + @@ -135744,14 +135484,14 @@ - - - - + + + + - - + + @@ -135762,44 +135502,44 @@ - - - - + + + + - - - + + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + @@ -135833,16 +135573,16 @@ - - - - - - + + + + + + - - - + + + @@ -135850,9 +135590,9 @@ - - - + + + @@ -135896,33 +135636,33 @@ - - - + + + - - - + + + - - + + - - + + - - - + + + - - - - + + + + @@ -135947,9 +135687,9 @@ - - - + + + @@ -135965,32 +135705,32 @@ - - - - + + + + - - + + - - + + - - - + + + - - - + + + - - - + + + @@ -135999,9 +135739,9 @@ - - - + + + @@ -136009,74 +135749,74 @@ - - - + + + - - + + - - - + + + - - - + + + - - - - + + + + - - - - + + + + - - + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - + + - - + + - - - - + + + + @@ -136088,42 +135828,42 @@ - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - + + @@ -136138,8 +135878,8 @@ - - + + @@ -136159,8 +135899,8 @@ - - + + @@ -136174,61 +135914,61 @@ - - - - - + + + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - + + + + @@ -136246,12 +135986,12 @@ - - - - - - + + + + + + @@ -136262,12 +136002,12 @@ - - - - - - + + + + + + @@ -136282,9 +136022,9 @@ - - - + + + @@ -136297,15 +136037,15 @@ - - + + - - - - - + + + + + @@ -136322,10 +136062,10 @@ - - - - + + + + @@ -136345,10 +136085,10 @@ - - - - + + + + @@ -136394,10 +136134,10 @@ - - - - + + + + @@ -136412,16 +136152,16 @@ - - - + + + - - + + - - + + @@ -136449,11 +136189,11 @@ - - - - - + + + + + @@ -136483,16 +136223,16 @@ - - - - - - + + + + + + - - + + @@ -136595,33 +136335,33 @@ - - + + - - + + - - - - - - + + + + + + - - - + + + - - + + @@ -136647,8 +136387,8 @@ - - + + @@ -136668,16 +136408,16 @@ - - + + - - + + - - + + @@ -136762,19 +136502,19 @@ - - - + + + - - - + + + - - - + + + @@ -136789,8 +136529,8 @@ - - + + @@ -136821,9 +136561,9 @@ - - - + + + @@ -136853,14 +136593,14 @@ - - - + + + - - - + + + @@ -136873,9 +136613,9 @@ - - - + + + @@ -136883,10 +136623,10 @@ - - - - + + + + @@ -136900,12 +136640,12 @@ - - + + - - + + @@ -136926,9 +136666,9 @@ - - - + + + @@ -136940,9 +136680,9 @@ - - - + + + @@ -136990,8 +136730,8 @@ - - + + @@ -137037,9 +136777,9 @@ - - - + + + @@ -137055,10 +136795,10 @@ - - - - + + + + @@ -137079,10 +136819,10 @@ - - - - + + + + @@ -137115,17 +136855,17 @@ - - + + - - - + + + @@ -137139,55 +136879,55 @@ - - - - + + + + - - + + - - - + + + - - + + - - + + - - - - - + + + + + - - - + + + - - - + + + - - + + - - + + - - + + @@ -137209,20 +136949,20 @@ - - - - - - + + + + + + - - + + - - + + @@ -137230,21 +136970,21 @@ - - - - - + + + + + - - - - - + + + + + - - + + @@ -137255,7 +136995,7 @@ - + @@ -137274,21 +137014,21 @@ - - - - + + + + - - - - - - - - - + + + + + + + + + @@ -137322,8 +137062,8 @@ - - + + @@ -137343,9 +137083,9 @@ - - - + + + @@ -137353,23 +137093,23 @@ - - - + + + - - - + + + - - - + + + @@ -137390,37 +137130,37 @@ - - + + - - - - + + + + - - - + + + - - + + - - - - + + + + @@ -137434,11 +137174,11 @@ - - - - - + + + + + @@ -137448,12 +137188,12 @@ - - - - - - + + + + + + @@ -137497,10 +137237,10 @@ - - - - + + + + @@ -137559,24 +137299,24 @@ - - + + - - + + - - + + @@ -137586,11 +137326,11 @@ - - - - - + + + + + @@ -137635,14 +137375,14 @@ - - - - + + + + - - - + + + @@ -137875,8 +137615,8 @@ - - + + @@ -137896,29 +137636,29 @@ - - - + + + - - + + - - + + - - + + - - + + - - + + @@ -137930,14 +137670,14 @@ - - - + + + - - - + + + @@ -137950,16 +137690,16 @@ - - - - + + + + - - - - + + + + @@ -138015,12 +137755,12 @@ - - + + - - + + @@ -138067,24 +137807,24 @@ - - + + - - + + - - + + - - + + @@ -138104,13 +137844,13 @@ - - + + - - - + + + @@ -138124,16 +137864,16 @@ - - - - + + + + - - - - + + + + @@ -138146,9 +137886,9 @@ - - - + + + @@ -138169,8 +137909,8 @@ - - + + @@ -138185,8 +137925,8 @@ - - + + @@ -138220,8 +137960,8 @@ - - + + @@ -138239,10 +137979,10 @@ - - - - + + + + @@ -138255,54 +137995,54 @@ - - + + - - - + + + - - + + - + - + - - - - + + + + - - - - + + + + - - - - - - - - - + + + + + + + + + - - + + - - + + @@ -138311,36 +138051,36 @@ - - - - - + + + + + - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + @@ -138351,12 +138091,12 @@ - - - - - - + + + + + + @@ -138375,9 +138115,9 @@ - - - + + + @@ -138387,8 +138127,8 @@ - - + + @@ -138402,10 +138142,10 @@ - - - - + + + + @@ -138418,13 +138158,13 @@ - - - + + + - - + + @@ -138477,11 +138217,11 @@ - - - - - + + + + + @@ -138497,24 +138237,24 @@ - - + + - - + + - - + + - - + + @@ -138522,24 +138262,24 @@ - - + + - - + + - - + + @@ -138599,8 +138339,8 @@ - - + + @@ -138610,28 +138350,28 @@ - - - - - + + + + + - - - - - + + + + + - - - - + + + + @@ -138645,23 +138385,23 @@ - - - + + + - - + + - - - - + + + + - - + + @@ -138684,48 +138424,48 @@ - - - + + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + @@ -138734,7 +138474,7 @@ - + @@ -138774,17 +138514,17 @@ - + - + - - + + @@ -138803,8 +138543,8 @@ - - + + @@ -138841,10 +138581,14 @@ - - + + + + + + @@ -138854,23 +138598,23 @@ - - - - + + + + - - - + + + - - - + + + @@ -138930,8 +138674,8 @@ - - + + @@ -138972,16 +138716,16 @@ - - + + - - + + - - + + @@ -138992,8 +138736,8 @@ - - + + @@ -139016,12 +138760,12 @@ - - + + - - + + @@ -139041,8 +138785,8 @@ - - + + @@ -139161,10 +138905,10 @@ - - - - + + + + @@ -139179,20 +138923,20 @@ - - - - - - - - + + + + + + + + - - - - + + + + @@ -139200,14 +138944,14 @@ - - - + + + - - - + + + @@ -139225,8 +138969,8 @@ - - + + @@ -139238,8 +138982,8 @@ - - + + @@ -139280,8 +139024,8 @@ - - + + @@ -139332,22 +139076,22 @@ - - - - + + + + - - - - + + + + - - - - + + + + @@ -139442,8 +139186,8 @@ - - + + @@ -139451,22 +139195,22 @@ - - + + - - - - - - + + + + + + - - - - + + + + @@ -139479,9 +139223,9 @@ - - - + + + @@ -139489,9 +139233,9 @@ - - - + + + @@ -139539,13 +139283,13 @@ - - - - - - - + + + + + + + @@ -139553,28 +139297,28 @@ - - + + - - + + - - + + - - + + - - + + @@ -139590,20 +139334,20 @@ - - - - - - + + + + + + - - - + + + - - + + @@ -139619,8 +139363,8 @@ - - + + @@ -139637,8 +139381,8 @@ - - + + @@ -139651,15 +139395,15 @@ - - - + + + - - - - + + + + @@ -139667,39 +139411,39 @@ - - - + + + - - - - + + + + - - + + - - - + + + - - - - + + + + - - - + + + - - - + + + @@ -139707,30 +139451,30 @@ - - - - + + + + - - - - + + + + - - - - + + + + - - + + - - + + @@ -139857,8 +139601,8 @@ - - + + @@ -139994,12 +139738,12 @@ - - + + - - + + @@ -140016,9 +139760,9 @@ - - - + + + @@ -140026,9 +139770,9 @@ - - - + + + @@ -140036,9 +139780,9 @@ - - - + + + @@ -140063,12 +139807,12 @@ - - + + - - + + @@ -140086,10 +139830,10 @@ - - - - + + + + @@ -140111,61 +139855,61 @@ - - - + + + - - - - + + + + - - - + + + - - + + - - - - - - + + + + + + - - - - + + + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - - + + + @@ -140175,10 +139919,10 @@ - - - - + + + + @@ -140189,13 +139933,13 @@ - + - - - - + + + + @@ -140229,10 +139973,10 @@ - - - - + + + + @@ -140274,7 +140018,7 @@ - + @@ -140282,34 +140026,34 @@ - - + + - - + + - - + + - - - - - - + + + + + + - - - - + + + + - - + + @@ -140320,10 +140064,10 @@ - - - - + + + + @@ -140333,8 +140077,8 @@ - - + + @@ -140345,8 +140089,8 @@ - - + + @@ -140384,8 +140128,8 @@ - - + + @@ -140423,14 +140167,14 @@ - - - - - + + + + + - - + + @@ -140468,11 +140212,11 @@ - - - - - + + + + + @@ -140616,21 +140360,21 @@ - - + + - - - + + + - - + + - - + + @@ -140664,11 +140408,11 @@ - - - - - + + + + + @@ -140683,21 +140427,21 @@ - - + + - - + + - - + + - - - + + + @@ -140713,11 +140457,11 @@ - - - - - + + + + + @@ -140741,12 +140485,12 @@ - - - - - - + + + + + + @@ -140766,28 +140510,28 @@ - - - - + + + + - - - - + + + + - - - + + + - - - - + + + + @@ -140807,26 +140551,26 @@ - - - - + + + + - - - + + + - - - - - + + + + + - - - + + + @@ -140835,20 +140579,20 @@ - - - + + + - - - + + + - - - + + + @@ -140858,26 +140602,26 @@ - - - + + + - - - + + + - - - - + + + + - - - - + + + + @@ -141023,9 +140767,9 @@ - - - + + + @@ -141040,9 +140784,9 @@ - - - + + + @@ -141050,26 +140794,26 @@ - - + + - - - - + + + + - - + + - - + + @@ -141077,25 +140821,25 @@ - - - + + + - - - + + + - - - + + + - - - - + + + + @@ -141107,33 +140851,33 @@ - - - - - - + + + + + + - - - - - - + + + + + + - - - - + + + + - - - + + + @@ -141141,32 +140885,32 @@ - - - + + + - - - - - + + + + + - - + + - - + + - - - + + + - - + + @@ -141177,13 +140921,13 @@ - - - - - - - + + + + + + + @@ -141215,14 +140959,14 @@ - - + + - - - - + + + + @@ -141230,10 +140974,10 @@ - - - - + + + + @@ -141241,10 +140985,10 @@ - - - - + + + + @@ -141267,10 +141011,10 @@ - - - - + + + + @@ -141286,8 +141030,8 @@ - - + + @@ -141297,29 +141041,29 @@ - + - - + + - - + + - - - - + + + + - - - - - - + + + + + + @@ -141348,13 +141092,13 @@ - - - - - - - + + + + + + + @@ -141373,10 +141117,10 @@ - - - - + + + + @@ -141393,10 +141137,10 @@ - - - - + + + + @@ -141406,30 +141150,30 @@ - - - + + + - - - - - - + + + + + + - - + + - - - - - - - + + + + + + + @@ -141446,13 +141190,13 @@ - - + + - - - + + + @@ -141471,39 +141215,39 @@ - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - - + + @@ -141526,55 +141270,55 @@ - - - - - + + + + + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - - - + + + @@ -141584,9 +141328,9 @@ - - - + + + @@ -141596,16 +141340,16 @@ - - - - - + + + + + - - - + + + @@ -141640,15 +141384,15 @@ - - - + + + - - - - + + + + @@ -141661,11 +141405,11 @@ - - - - - + + + + + @@ -141675,16 +141419,16 @@ - - - - - + + + + + - - - + + + @@ -141694,8 +141438,8 @@ - - + + @@ -141707,25 +141451,25 @@ - - + + - - + + - - - - - - - + + + + + + + - - + + @@ -141736,9 +141480,9 @@ - - - + + + @@ -141790,15 +141534,15 @@ - - - + + + - - - - + + + + @@ -141826,22 +141570,22 @@ - - - - - + + + + + - - - - - + + + + + - - + + @@ -141920,8 +141664,8 @@ - - + + @@ -141931,9 +141675,9 @@ - - - + + + @@ -142002,8 +141746,8 @@ - - + + @@ -142019,9 +141763,9 @@ - - - + + + @@ -142031,17 +141775,17 @@ - - - - + + + + - - - - - + + + + + @@ -142065,17 +141809,17 @@ - - + + - - - - - - - + + + + + + + @@ -142090,23 +141834,23 @@ - - + + - - - - + + + + - - - + + + - - + + @@ -142117,12 +141861,12 @@ - - - - - - + + + + + + @@ -142141,8 +141885,8 @@ - - + + @@ -142154,18 +141898,18 @@ - - - - - - + + + + + + - - - - + + + + @@ -142173,17 +141917,17 @@ - - - + + + - - + + - - + + @@ -142221,9 +141965,9 @@ - - - + + + @@ -142235,8 +141979,8 @@ - - + + @@ -142268,45 +142012,45 @@ - - - + + + - - - - + + + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - + + + + + @@ -142351,9 +142095,9 @@ - - - + + + @@ -142384,10 +142128,10 @@ - - - - + + + + @@ -142484,14 +142228,14 @@ - - - - + + + + - - + + @@ -142509,8 +142253,8 @@ - - + + @@ -142772,9 +142516,9 @@ - - - + + + @@ -142863,9 +142607,9 @@ - - - + + + @@ -142886,13 +142630,13 @@ - - - - - - - + + + + + + + @@ -142904,44 +142648,44 @@ - - - + + + - - - - + + + + - - + + - - + + - - - - - - + + + + + + - - + + - - - + + + @@ -143051,9 +142795,9 @@ - - - + + + @@ -143065,17 +142809,17 @@ - - - - - - + + + + + + - - - + + + @@ -143199,9 +142943,9 @@ - - - + + + @@ -143234,34 +142978,34 @@ - - + + - - + + - - + + - - + + - - - - + + + + - - - - - - + + + + + + @@ -143284,9 +143028,9 @@ - - - + + + @@ -143304,8 +143048,8 @@ - - + + @@ -143340,10 +143084,10 @@ - - - - + + + + @@ -143352,26 +143096,26 @@ - - - - + + + + - - - + + + - - - + + + - - - - + + + + @@ -143379,21 +143123,21 @@ - - - - + + + + - - - - - + + + + + - - - + + + @@ -143412,16 +143156,16 @@ - - - + + + - - - + + + - - + + @@ -143453,33 +143197,33 @@ - - + + - - + + - - + + - - + + - - + + - - - + + + @@ -143490,10 +143234,10 @@ - + - + @@ -143505,12 +143249,12 @@ - - + + - - + + @@ -143525,23 +143269,23 @@ - - + + - - + + - - - + + + - + - + @@ -143560,15 +143304,15 @@ - - - + + + - - - - + + + + @@ -143581,27 +143325,27 @@ - - - + + + - - - - + + + + - - - + + + - - - - + + + + @@ -143623,9 +143367,9 @@ - - - + + + @@ -143634,10 +143378,10 @@ - - - - + + + + @@ -143645,9 +143389,9 @@ - - - + + + @@ -143655,9 +143399,9 @@ - - - + + + @@ -143666,17 +143410,17 @@ - - - - + + + + - + @@ -143694,8 +143438,8 @@ - - + + @@ -143775,8 +143519,8 @@ - - + + @@ -143873,16 +143617,16 @@ - - + + - - + + @@ -143891,8 +143635,8 @@ - - + + @@ -143924,19 +143668,19 @@ - - - - - - - - - + + + + + + + + + - - + + @@ -143948,9 +143692,9 @@ - - - + + + @@ -143975,14 +143719,14 @@ - - - - + + + + - - + + @@ -144010,9 +143754,9 @@ - - - + + + @@ -144035,12 +143779,11 @@ - - - + + @@ -144075,19 +143818,19 @@ - - + + - - - - + + + + - - - + + + @@ -144105,8 +143848,8 @@ - - + + @@ -144116,24 +143859,24 @@ - - - - - + + + + + - - - - + + + + - - - - - + + + + + @@ -144143,26 +143886,26 @@ - - - - + + + + - - - + + + - - - + + + - - - + + + @@ -144171,10 +143914,10 @@ - - - - + + + + @@ -144194,7 +143937,7 @@ - + @@ -144228,19 +143971,19 @@ - - - + + + - - - - - + + + + + @@ -144368,10 +144111,10 @@ - - - - + + + + @@ -144379,10 +144122,10 @@ - - - - + + + + @@ -144461,19 +144204,19 @@ - - - + + + - - - + + + - - - + + + @@ -144503,8 +144246,8 @@ - - + + @@ -144522,16 +144265,16 @@ - - + + - - + + @@ -144584,9 +144327,9 @@ - - - + + + @@ -144600,9 +144343,9 @@ - - - + + + @@ -144641,8 +144384,8 @@ - - + + @@ -144688,9 +144431,9 @@ - - - + + + @@ -144781,11 +144524,11 @@ - - - - - + + + + + @@ -145020,9 +144763,9 @@ - - - + + + @@ -145140,27 +144883,27 @@ - - + + - - + + - - + + - - - - - + + + + + @@ -145194,8 +144937,8 @@ - - + + @@ -145234,17 +144977,17 @@ - - + + - - + + - - - + + + @@ -145255,8 +144998,8 @@ - - + + @@ -145287,12 +145030,12 @@ - - + + - - + + @@ -145319,8 +145062,8 @@ - - + + @@ -145342,8 +145085,8 @@ - - + + @@ -145379,9 +145122,9 @@ - - - + + + @@ -145404,9 +145147,9 @@ - - - + + + @@ -145421,16 +145164,16 @@ - - + + - - + + - - + + @@ -145449,8 +145192,8 @@ - - + + @@ -145465,16 +145208,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -145508,8 +145251,8 @@ - - + + @@ -145524,15 +145267,15 @@ - - - - + + + + - - - + + + @@ -145543,9 +145286,9 @@ - - - + + + @@ -145557,9 +145300,9 @@ - - - + + + @@ -145578,24 +145321,24 @@ - - - + + + - - - - + + + + - - - + + + @@ -145622,8 +145365,8 @@ - - + + @@ -145642,9 +145385,9 @@ - - - + + + @@ -145653,28 +145396,28 @@ - - - - + + + + - - + + - - + + - - - + + + - - - + + + @@ -145683,14 +145426,14 @@ - - - - + + + + - - + + @@ -145701,9 +145444,9 @@ - - - + + + @@ -145718,8 +145461,8 @@ - - + + @@ -145741,8 +145484,8 @@ - - + + @@ -145845,15 +145588,15 @@ - - - + + + - - - - + + + + @@ -145865,8 +145608,8 @@ - - + + @@ -145932,16 +145675,16 @@ - - + + - - + + @@ -145949,10 +145692,10 @@ - - - - + + + + @@ -145976,8 +145719,8 @@ - - + + @@ -145988,30 +145731,30 @@ - - + + - - - + + + - - - + + + - - + + - - + + @@ -146019,10 +145762,10 @@ - - - - + + + + @@ -146046,9 +145789,9 @@ - - - + + + @@ -146056,8 +145799,8 @@ - - + + @@ -146106,9 +145849,9 @@ - - - + + + @@ -146129,10 +145872,10 @@ - - - - + + + + @@ -146182,9 +145925,9 @@ - - - + + + @@ -146244,50 +145987,50 @@ - - - + + + - - - - - - + + + + + + - - - - - + + + + + - - + + - - - - + + + + - - - - - - + + + + + + - - + + @@ -146463,9 +146206,9 @@ - - - + + + @@ -146479,8 +146222,8 @@ - - + + @@ -146494,19 +146237,19 @@ - - - - + + + + - - - + + + @@ -146520,33 +146263,33 @@ - - - - - + + + + + - - - + + + - - + + - - + + - - + + - - - + + + @@ -146799,15 +146542,15 @@ - - - + + + - - - - + + + + @@ -146876,15 +146619,15 @@ - - - + + + - - - + + + @@ -146897,15 +146640,15 @@ - - - - + + + + - - - + + + @@ -146983,9 +146726,9 @@ - - - + + + @@ -147001,36 +146744,36 @@ - - - + + + - - - - - + + + + + - - - - + + + + - - - - + + + + - - - + + + - - + + @@ -147045,9 +146788,9 @@ - - - + + + @@ -147062,14 +146805,14 @@ - - - + + + - - - + + + @@ -147111,15 +146854,15 @@ - - + + - - - - - + + + + + @@ -147127,11 +146870,11 @@ - - - - - + + + + + @@ -147159,14 +146902,14 @@ - - - - - + + + + + - - + + @@ -147186,8 +146929,8 @@ - - + + @@ -147230,8 +146973,8 @@ - - + + @@ -147267,8 +147010,8 @@ - - + + @@ -147335,9 +147078,9 @@ - - - + + + @@ -147408,26 +147151,26 @@ - - - - - - - + + + + + + + - - + + - - - + + + @@ -147464,21 +147207,21 @@ - - - + + + - - - + + + - - - + + + @@ -147545,15 +147288,15 @@ - - + + - - + + @@ -147564,16 +147307,16 @@ - - - - - + + + + + - - - + + + @@ -147582,11 +147325,11 @@ - - - - - + + + + + @@ -147595,9 +147338,9 @@ - - - + + + @@ -147647,11 +147390,11 @@ - - - - - + + + + + @@ -147661,23 +147404,23 @@ - - - - + + + + - - - + + + - - + + - - + + @@ -147696,12 +147439,12 @@ - - + + - - + + @@ -147709,8 +147452,8 @@ - - + + @@ -147731,8 +147474,8 @@ - - + + @@ -147740,16 +147483,16 @@ - - - + + + - + - - + + @@ -147757,8 +147500,8 @@ - - + + @@ -147774,9 +147517,9 @@ - - - + + + @@ -147799,17 +147542,17 @@ - - - + + + - - + + @@ -147826,12 +147569,12 @@ - - - - - - + + + + + + @@ -147892,9 +147635,9 @@ - - - + + + @@ -147919,34 +147662,34 @@ - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - + + + @@ -147956,17 +147699,17 @@ - - + + - - - - + + + + @@ -147977,26 +147720,26 @@ - - - - + + + + - - - - + + + + - - + + - - - - + + + + @@ -148007,9 +147750,9 @@ - - - + + + @@ -148041,10 +147784,10 @@ - - - - + + + + @@ -148077,9 +147820,9 @@ - - - + + + @@ -148096,15 +147839,15 @@ - - - - + + + + - - - + + + @@ -148128,12 +147871,12 @@ - - - - - - + + + + + + @@ -148155,13 +147898,13 @@ - - + + - - - + + + @@ -148178,10 +147921,10 @@ - - - - + + + + @@ -148192,47 +147935,47 @@ - - - + + + - - + + - - - - - - - + + + + + + + - - + + - - - + + + - - - - - - - + + + + + + + - - - - - - + + + + + + diff --git a/android/abi_gki_aarch64_oplus b/android/abi_gki_aarch64_oplus index 4f25e9accef0..0767c782b5b0 100644 --- a/android/abi_gki_aarch64_oplus +++ b/android/abi_gki_aarch64_oplus @@ -2100,6 +2100,7 @@ rdev_get_regmap read_cache_page_gfp reboot_mode + reclaim_pages refcount_dec_and_lock refcount_dec_not_one refcount_warn_saturate @@ -2798,6 +2799,7 @@ __traceiter_android_vh_futex_sleep_start __traceiter_android_vh_get_from_fragment_pool __traceiter_android_vh_gpio_block_read + __traceiter_android_vh_handle_failed_page_trylock __traceiter_android_vh_include_reserved_zone __traceiter_android_vh_iommu_alloc_iova __traceiter_android_vh_iommu_free_iova @@ -2823,9 +2825,13 @@ __traceiter_android_vh_override_creds __traceiter_android_vh_page_referenced_check_bypass __traceiter_android_vh_page_should_be_protected + __traceiter_android_vh_page_trylock_set + __traceiter_android_vh_page_trylock_clear + __traceiter_android_vh_page_trylock_get_result __traceiter_android_vh_mark_page_accessed __traceiter_android_vh_show_mapcount_pages __traceiter_android_vh_do_traversal_lruvec + __traceiter_android_vh_do_page_trylock __traceiter_android_vh_update_page_mapcount __traceiter_android_vh_add_page_to_lrulist __traceiter_android_vh_del_page_from_lrulist @@ -3021,6 +3027,7 @@ __tracepoint_android_vh_futex_sleep_start __tracepoint_android_vh_get_from_fragment_pool __tracepoint_android_vh_gpio_block_read + __tracepoint_android_vh_handle_failed_page_trylock __tracepoint_android_vh_include_reserved_zone __tracepoint_android_vh_iommu_alloc_iova __tracepoint_android_vh_iommu_free_iova @@ -3046,9 +3053,13 @@ __tracepoint_android_vh_override_creds __tracepoint_android_vh_page_referenced_check_bypass __tracepoint_android_vh_page_should_be_protected + __tracepoint_android_vh_page_trylock_set + __tracepoint_android_vh_page_trylock_clear + __tracepoint_android_vh_page_trylock_get_result __tracepoint_android_vh_mark_page_accessed __tracepoint_android_vh_show_mapcount_pages __tracepoint_android_vh_do_traversal_lruvec + __tracepoint_android_vh_do_page_trylock __tracepoint_android_vh_update_page_mapcount __tracepoint_android_vh_add_page_to_lrulist __tracepoint_android_vh_del_page_from_lrulist From 501063ce66dd386c16c47c463c8a3df0e810435f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 16 Aug 2022 13:12:42 +0200 Subject: [PATCH 06/28] Revert "ANDROID: vendor_hooks:vendor hook for mmput" This reverts commit 8b19ed264b40220326562a29f7ffc1342ba61c08. The hook android_vh_mmput 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: 238821038 Cc: xiaofeng Signed-off-by: Greg Kroah-Hartman Change-Id: Idd40f231640723d2342a9dbac7e9206a800e82dd --- drivers/android/vendor_hooks.c | 1 - include/trace/hooks/sched.h | 4 ---- kernel/fork.c | 4 +--- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 1eff6b292764..91f67a58a0bc 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -448,5 +448,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_swapinfo); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_si); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_shmem_page_flag); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_pidfd_open); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmput); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_pelt_multiplier); diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index d0fc31e2c966..95f292953109 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -395,10 +395,6 @@ DECLARE_HOOK(android_vh_pidfd_open, TP_PROTO(struct pid *p), TP_ARGS(p)); -DECLARE_HOOK(android_vh_mmput, - TP_PROTO(void *unused), - TP_ARGS(unused)); - DECLARE_HOOK(android_vh_sched_pelt_multiplier, TP_PROTO(unsigned int old, unsigned int cur, int *ret), TP_ARGS(old, cur, ret)); diff --git a/kernel/fork.c b/kernel/fork.c index 58409b7178c2..3b281326c0e1 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -1150,10 +1150,8 @@ void mmput(struct mm_struct *mm) { might_sleep(); - if (atomic_dec_and_test(&mm->mm_users)) { - trace_android_vh_mmput(NULL); + if (atomic_dec_and_test(&mm->mm_users)) __mmput(mm); - } } EXPORT_SYMBOL_GPL(mmput); From d0590b99c9946526ee434a33c47d69056d137e06 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 16 Aug 2022 14:37:37 +0200 Subject: [PATCH 07/28] Revert "ANDROID: vendor_hooks: Add hooks to extend the struct swap_info_struct" This reverts commit 667f0d71dc08e25bf013cafa617adf6789fe5b93. The hooks android_vh_init_swap_info_struct and android_vh_alloc_si are 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: 234214858 Cc: Bing Han Signed-off-by: Greg Kroah-Hartman Change-Id: If01c284ebf15e804e7cf34e854b7db0d5b68ae1b --- drivers/android/vendor_hooks.c | 2 -- include/trace/hooks/mm.h | 6 ------ mm/swapfile.c | 8 ++------ 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 91f67a58a0bc..6238312d55e9 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -443,9 +443,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_inactive_is_low); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_snapshot_refaults); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_swap_pages); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_unuse_swap_page); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_init_swap_info_struct); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_swapinfo); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_si); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_shmem_page_flag); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_pidfd_open); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_pelt_multiplier); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 0362142a1323..213b14ea4cc6 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -245,15 +245,9 @@ DECLARE_HOOK(android_vh_account_swap_pages, DECLARE_HOOK(android_vh_unuse_swap_page, TP_PROTO(struct swap_info_struct *si, struct page *page), TP_ARGS(si, page)); -DECLARE_HOOK(android_vh_init_swap_info_struct, - TP_PROTO(struct swap_info_struct *p, struct plist_head *swap_avail_heads), - TP_ARGS(p, swap_avail_heads)); DECLARE_HOOK(android_vh_si_swapinfo, TP_PROTO(struct swap_info_struct *si, bool *skip), TP_ARGS(si, skip)); -DECLARE_HOOK(android_vh_alloc_si, - TP_PROTO(struct swap_info_struct **p, bool *skip), - TP_ARGS(p, skip)); DECLARE_HOOK(android_vh_set_shmem_page_flag, TP_PROTO(struct page *page), TP_ARGS(page)); diff --git a/mm/swapfile.c b/mm/swapfile.c index 677f235806c2..0aba6e4742d1 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2902,15 +2902,12 @@ late_initcall(max_swapfiles_check); static struct swap_info_struct *alloc_swap_info(void) { - struct swap_info_struct *p = NULL; + struct swap_info_struct *p; struct swap_info_struct *defer = NULL; unsigned int type; int i; - bool skip = false; - trace_android_vh_alloc_si(&p, &skip); - if (!skip) - p = kvzalloc(struct_size(p, avail_lists, nr_node_ids), GFP_KERNEL); + p = kvzalloc(struct_size(p, avail_lists, nr_node_ids), GFP_KERNEL); if (!p) return ERR_PTR(-ENOMEM); @@ -3393,7 +3390,6 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) (swap_flags & SWAP_FLAG_PRIO_MASK) >> SWAP_FLAG_PRIO_SHIFT; enable_swap_info(p, prio, swap_map, cluster_info, frontswap_map); - trace_android_vh_init_swap_info_struct(p, swap_avail_heads); pr_info("Adding %uk swap on %s. Priority:%d extents:%d across:%lluk %s%s%s%s%s\n", p->pages<<(PAGE_SHIFT-10), name->name, p->prio, nr_extents, (unsigned long long)span<<(PAGE_SHIFT-10), From 40b3533213efcee418cc54619a56f5cdb2880758 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 16 Aug 2022 14:51:32 +0200 Subject: [PATCH 08/28] Revert "ANDROID: vendor_hooks:vendor hook for pidfd_open" This reverts commit 242b11e574603029393ca1d094c76900797b5897. The hook android_vh_pidfd_open 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: 238725692 Cc: xiaofeng Signed-off-by: Greg Kroah-Hartman Change-Id: I77afe002bebc3b3e97ea7a28faae74e9cb8a6718 --- drivers/android/vendor_hooks.c | 1 - include/trace/hooks/sched.h | 4 ---- kernel/pid.c | 4 ---- 3 files changed, 9 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 6238312d55e9..13c10551d922 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -445,5 +445,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_swap_pages); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_unuse_swap_page); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_swapinfo); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_shmem_page_flag); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_pidfd_open); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_pelt_multiplier); diff --git a/include/trace/hooks/sched.h b/include/trace/hooks/sched.h index 95f292953109..6488dee32a88 100644 --- a/include/trace/hooks/sched.h +++ b/include/trace/hooks/sched.h @@ -391,10 +391,6 @@ DECLARE_HOOK(android_vh_setscheduler_uclamp, TP_PROTO(struct task_struct *tsk, int clamp_id, unsigned int value), TP_ARGS(tsk, clamp_id, value)); -DECLARE_HOOK(android_vh_pidfd_open, - TP_PROTO(struct pid *p), - TP_ARGS(p)); - DECLARE_HOOK(android_vh_sched_pelt_multiplier, TP_PROTO(unsigned int old, unsigned int cur, int *ret), TP_ARGS(old, cur, ret)); diff --git a/kernel/pid.c b/kernel/pid.c index 468d04810b40..48babb1dd3e1 100644 --- a/kernel/pid.c +++ b/kernel/pid.c @@ -45,9 +45,6 @@ #include #include -#undef CREATE_TRACE_POINTS -#include - struct pid init_struct_pid = { .count = REFCOUNT_INIT(1), .tasks = { @@ -605,7 +602,6 @@ SYSCALL_DEFINE2(pidfd_open, pid_t, pid, unsigned int, flags) else fd = -EINVAL; - trace_android_vh_pidfd_open(p); put_pid(p); return fd; } From 86be1a3d9f5a43437b9d1815a6014b4be96e1349 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 16 Aug 2022 18:12:02 +0200 Subject: [PATCH 09/28] Revert "ANDROID: vendor_hook: Add hook in si_swapinfo()" This reverts commit ed2b11d639fabae87d33a9f2c10b15e87b0f4281. The hook android_vh_si_swapinfo 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: 234214858 Cc: Bing Han Signed-off-by: Greg Kroah-Hartman Change-Id: Ib474a0911dd97d54d2f086258e9d53ddd3451967 --- drivers/android/vendor_hooks.c | 1 - include/trace/hooks/mm.h | 3 --- mm/swapfile.c | 4 +--- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 13c10551d922..053ce75a212f 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -443,6 +443,5 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_inactive_is_low); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_snapshot_refaults); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_swap_pages); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_unuse_swap_page); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_swapinfo); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_shmem_page_flag); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_pelt_multiplier); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 213b14ea4cc6..7c97213cd2de 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -245,9 +245,6 @@ DECLARE_HOOK(android_vh_account_swap_pages, DECLARE_HOOK(android_vh_unuse_swap_page, TP_PROTO(struct swap_info_struct *si, struct page *page), TP_ARGS(si, page)); -DECLARE_HOOK(android_vh_si_swapinfo, - TP_PROTO(struct swap_info_struct *si, bool *skip), - TP_ARGS(si, skip)); DECLARE_HOOK(android_vh_set_shmem_page_flag, TP_PROTO(struct page *page), TP_ARGS(page)); diff --git a/mm/swapfile.c b/mm/swapfile.c index 0aba6e4742d1..fb712ff403c5 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -3454,10 +3454,8 @@ void si_swapinfo(struct sysinfo *val) spin_lock(&swap_lock); for (type = 0; type < nr_swapfiles; type++) { struct swap_info_struct *si = swap_info[type]; - bool skip = false; - trace_android_vh_si_swapinfo(si, &skip); - if (!skip && (si->flags & SWP_USED) && !(si->flags & SWP_WRITEOK)) + if ((si->flags & SWP_USED) && !(si->flags & SWP_WRITEOK)) nr_to_be_unused += si->inuse_pages; } val->freeswap = atomic_long_read(&nr_swap_pages) + nr_to_be_unused; From 4e1387087735ef78962293f34a5a36dac6ce3ee0 Mon Sep 17 00:00:00 2001 From: Sarannya S Date: Thu, 18 Aug 2022 19:39:40 +0530 Subject: [PATCH 10/28] ANDROID: abi_gki_aarch64_qcom: Add skb and scatterlist helpers Add sg_miter_skip, skb_copy_datagram_from_iter and sock_alloc_send_pskb to the symbol list. These functions will be used in qrtr to handle fragmented skbs. Leaf changes summary: 3 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 3 Added functions: [A] 'function bool sg_miter_skip(sg_mapping_iter*, off_t)' [A] 'function int skb_copy_datagram_from_iter(sk_buff*, int, iov_iter*, int)' [A] 'function sk_buff* sock_alloc_send_pskb(sock*, unsigned long int, unsigned long int, int, int*, int)' Bug: 232287599 Change-Id: I5bebdebb833f3ff78f89e67aaca578b9c6c86259 Signed-off-by: Sarannya S --- android/abi_gki_aarch64.xml | 555 +++++++++++++++++------------------ android/abi_gki_aarch64_qcom | 5 +- 2 files changed, 274 insertions(+), 286 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 8c2c3d0ff92e..f432f0776506 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -4772,6 +4772,7 @@ + @@ -4832,6 +4833,7 @@ + @@ -5078,6 +5080,7 @@ + @@ -14763,7 +14766,6 @@ - @@ -14993,15 +14995,15 @@ - + - + - + - + @@ -30628,18 +30630,18 @@ - + - + - + - + - + @@ -36999,12 +37001,6 @@ - - - - - - @@ -44687,9 +44683,6 @@ - - - @@ -52756,81 +52749,81 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -60827,7 +60820,7 @@ - + @@ -62473,24 +62466,24 @@ - + - + - + - + - + - + - + @@ -68987,26 +68980,7 @@ - - - - - - - - - - - - - - - - - - - - + @@ -92787,21 +92761,21 @@ - + - + - + - + - + - + @@ -95456,17 +95430,7 @@ - - - - - - - - - - - + @@ -105911,30 +105875,30 @@ - + - + - + - + - + - + - + - + - + @@ -115979,10 +115943,10 @@ - - - - + + + + @@ -116347,12 +116311,12 @@ - - + + - - + + @@ -116385,15 +116349,15 @@ - - - + + + - - - - + + + + @@ -116585,10 +116549,10 @@ - - - - + + + + @@ -116791,10 +116755,10 @@ - - - - + + + + @@ -117551,35 +117515,35 @@ - - - - + + + + - + + + + + + - + + + - - - - - + + + + - - - - - - - - - - - + + + + + @@ -117588,12 +117552,12 @@ - - - - - - + + + + + + @@ -117602,30 +117566,30 @@ - + + + + + + + + + + + - + - - - - - - - - - - - - - - + + + + @@ -117648,17 +117612,17 @@ - - - - - + + + + + - - - - + + + + @@ -118425,11 +118389,11 @@ - - - - - + + + + + @@ -119342,22 +119306,22 @@ - - - - - + + + + + - + - - - + + + - - + + @@ -119493,7 +119457,7 @@ - + @@ -120128,9 +120092,9 @@ - - - + + + @@ -120247,9 +120211,9 @@ - - - + + + @@ -125981,16 +125945,16 @@ - - + + - - + + - - + + @@ -126002,16 +125966,16 @@ - - + + - - + + - - + + @@ -129241,8 +129205,8 @@ - - + + @@ -129269,9 +129233,9 @@ - - - + + + @@ -129282,8 +129246,8 @@ - - + + @@ -129295,8 +129259,8 @@ - - + + @@ -129395,14 +129359,14 @@ - - - + + + - - - + + + @@ -130244,9 +130208,9 @@ - - - + + + @@ -130278,17 +130242,17 @@ - - + + - - + + - - - + + + @@ -131753,7 +131717,7 @@ - + @@ -134770,28 +134734,28 @@ - - + + - - + + - - + + - - + + - - + + @@ -136894,8 +136858,8 @@ - - + + @@ -136926,8 +136890,8 @@ - - + + @@ -137375,14 +137339,14 @@ - - - + + + - - - + + + @@ -138253,8 +138217,8 @@ - - + + @@ -139726,16 +139690,16 @@ - - + + - - + + - - + + @@ -140889,6 +140853,11 @@ + + + + + @@ -141041,15 +141010,15 @@ - + - - + + - - + + @@ -141227,6 +141196,13 @@ + + + + + + + @@ -142577,6 +142553,15 @@ + + + + + + + + + @@ -143197,8 +143182,8 @@ - - + + @@ -143438,8 +143423,8 @@ - - + + @@ -145058,12 +145043,12 @@ - - + + - - + + @@ -147644,18 +147629,18 @@ - - - + + + - - - + + + - - + + diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index 34770c16c5b8..4dedb32d9661 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -1965,7 +1965,6 @@ register_kretprobe register_memory_notifier register_module_notifier - register_qdisc register_netdev register_netdevice register_netdevice_notifier @@ -1973,6 +1972,7 @@ register_oom_notifier register_pernet_device register_pm_notifier + register_qdisc register_reboot_notifier register_restart_handler __register_rpmsg_driver @@ -2194,6 +2194,7 @@ sg_init_one sg_init_table sg_miter_next + sg_miter_skip sg_miter_start sg_miter_stop sg_next @@ -2233,6 +2234,7 @@ skb_complete_wifi_ack skb_copy skb_copy_bits + skb_copy_datagram_from_iter skb_copy_datagram_iter skb_copy_expand skb_dequeue @@ -2321,6 +2323,7 @@ snprintf soc_device_register soc_device_unregister + sock_alloc_send_pskb sock_alloc_send_skb __sock_create sock_create_kern From 04c766fa7690fc18178eb78293a733630789c138 Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Wed, 17 Aug 2022 10:30:58 -0700 Subject: [PATCH 11/28] ANDROID: Use rq_clock_task without CONFIG_SMP Fix build error caused by guarding rq_clock_task_mult with CONFIG_SMP. Issue was not seen in original commit as test case was UM Linux, which does not enable CONFIG_CFS_BANDWIDTH. >> kernel/sched/fair.c:4791:40: error: implicit declaration of function 'rq_clock_task_mult' [-Werror,-Wimplicit-function-declaration] cfs_rq->throttled_clock_task_time += rq_clock_task_mult(rq) - Change-Id: Id3392c37ba1b2bfe78c89bc4b1ca01b920164a35 Reported-by: kernel test robot Fixes: 567d65e53644 ("ANDROID: Guard rq_clock_task_mult with CONFIG_SMP") Signed-off-by: Elliot Berman --- kernel/sched/sched.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 80a5af131251..a3c3bc3ca751 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1203,6 +1203,11 @@ static inline u64 rq_clock_task_mult(struct rq *rq) return per_cpu(clock_task_mult, cpu_of(rq)); } +#else +static inline u64 rq_clock_task_mult(struct rq *rq) +{ + return rq_clock_task(rq); +} #endif /** From 7ff95bd758c6d4f1d31961ee6ea7c9af57562a55 Mon Sep 17 00:00:00 2001 From: Peifeng Li Date: Wed, 17 Aug 2022 11:35:21 +0800 Subject: [PATCH 12/28] ANDROID: GKI: Update symbols to symbol list Leaf changes summary: 8 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 4 Added functions Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 4 Added variables 4 Added functions: [A] 'function int __traceiter_android_vh_record_mutex_lock_starttime(void*, task_struct*, unsigned long int)' [A] 'function int __traceiter_android_vh_record_percpu_rwsem_lock_starttime(void*, task_struct*, unsigned long int)' [A] 'function int __traceiter_android_vh_record_rtmutex_lock_starttime(void*, task_struct*, unsigned long int)' [A] 'function int __traceiter_android_vh_record_rwsem_lock_starttime(void*, task_struct*, unsigned long int)' 4 Added variables: [A] 'tracepoint __tracepoint_android_vh_record_mutex_lock_starttime' [A] 'tracepoint __tracepoint_android_vh_record_percpu_rwsem_lock_starttime' [A] 'tracepoint __tracepoint_android_vh_record_rtmutex_lock_starttime' [A] 'tracepoint __tracepoint_android_vh_record_rwsem_lock_starttime' Bug: 193384408 Signed-off-by: Peifeng Li Change-Id: Ia5acf188732440ca70795f0afb3298e4f9d6eb8a --- android/abi_gki_aarch64.xml | 36 +++++++++++++++++++++++++++++++++++ android/abi_gki_aarch64_oplus | 8 ++++++++ 2 files changed, 44 insertions(+) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index f432f0776506..e0004c18f143 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -528,6 +528,10 @@ + + + + @@ -6397,6 +6401,10 @@ + + + + @@ -118305,6 +118313,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -119436,6 +119468,10 @@ + + + + diff --git a/android/abi_gki_aarch64_oplus b/android/abi_gki_aarch64_oplus index 0767c782b5b0..fc00ead539dc 100644 --- a/android/abi_gki_aarch64_oplus +++ b/android/abi_gki_aarch64_oplus @@ -2840,6 +2840,10 @@ __traceiter_android_vh_printk_hotplug __traceiter_android_vh_process_killed __traceiter_android_vh_revert_creds + __traceiter_android_vh_record_mutex_lock_starttime + __traceiter_android_vh_record_rtmutex_lock_starttime + __traceiter_android_vh_record_rwsem_lock_starttime + __traceiter_android_vh_record_percpu_rwsem_lock_starttime __traceiter_android_vh_rmqueue __traceiter_android_vh_rwsem_init __traceiter_android_vh_rwsem_mark_wake_readers @@ -3068,6 +3072,10 @@ __tracepoint_android_vh_printk_hotplug __tracepoint_android_vh_process_killed __tracepoint_android_vh_revert_creds + __tracepoint_android_vh_record_mutex_lock_starttime + __tracepoint_android_vh_record_rtmutex_lock_starttime + __tracepoint_android_vh_record_rwsem_lock_starttime + __tracepoint_android_vh_record_percpu_rwsem_lock_starttime __tracepoint_android_vh_rmqueue __tracepoint_android_vh_rwsem_init __tracepoint_android_vh_rwsem_mark_wake_readers From 7449d8120a05fc74d863b73df0773c46a69cfd83 Mon Sep 17 00:00:00 2001 From: Bing Han Date: Thu, 18 Aug 2022 15:35:24 +0800 Subject: [PATCH 13/28] ANDROID: vendor_hook: Add hook in si_swapinfo() This reverts commit 86be1a3d9f5a43437b9d1815a6014b4be96e1349 The hook android_vh_si_swapinfo is deleted, due to the symbol is not added to the abi list. The symbol is added to the abi list in patch:2183484. This patch is to add the hook android_vh_si_swapinfo again. Bug: 234214858 Bug: 203756332 Cc: Greg Kroah-Hartman Signed-off-by: Bing Han Change-Id: Ifd1e05f44ac04b67816618139badd5c2ee786b50 --- drivers/android/vendor_hooks.c | 1 + include/trace/hooks/mm.h | 3 +++ mm/swapfile.c | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 053ce75a212f..13c10551d922 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -443,5 +443,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_inactive_is_low); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_snapshot_refaults); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_swap_pages); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_unuse_swap_page); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_swapinfo); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_shmem_page_flag); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_pelt_multiplier); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 7c97213cd2de..213b14ea4cc6 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -245,6 +245,9 @@ DECLARE_HOOK(android_vh_account_swap_pages, DECLARE_HOOK(android_vh_unuse_swap_page, TP_PROTO(struct swap_info_struct *si, struct page *page), TP_ARGS(si, page)); +DECLARE_HOOK(android_vh_si_swapinfo, + TP_PROTO(struct swap_info_struct *si, bool *skip), + TP_ARGS(si, skip)); DECLARE_HOOK(android_vh_set_shmem_page_flag, TP_PROTO(struct page *page), TP_ARGS(page)); diff --git a/mm/swapfile.c b/mm/swapfile.c index fb712ff403c5..0aba6e4742d1 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -3454,8 +3454,10 @@ void si_swapinfo(struct sysinfo *val) spin_lock(&swap_lock); for (type = 0; type < nr_swapfiles; type++) { struct swap_info_struct *si = swap_info[type]; + bool skip = false; - if ((si->flags & SWP_USED) && !(si->flags & SWP_WRITEOK)) + trace_android_vh_si_swapinfo(si, &skip); + if (!skip && (si->flags & SWP_USED) && !(si->flags & SWP_WRITEOK)) nr_to_be_unused += si->inuse_pages; } val->freeswap = atomic_long_read(&nr_swap_pages) + nr_to_be_unused; From 6c56a05b87249f2e42ab6059d7f27f475265bfdf Mon Sep 17 00:00:00 2001 From: Bing Han Date: Thu, 18 Aug 2022 15:37:32 +0800 Subject: [PATCH 14/28] ANDROID: vendor_hooks: Add hooks to extend the struct swap_info_struct This reverts commit: d0590b99c9946526ee434a33c47d69056d137e06 The hooks android_vh_init_swap_info_struct and android_vh_alloc_si are deleted, due to the symbols are not added to the abi list. The symbols are added to the abi list in patch:2183484. This patch is to add the hooks android_vh_init_swap_info_struct and android_vh_alloc_si again. Bug: 234214858 Bug: 203756332 Cc: Greg Kroah-Hartman Signed-off-by: Bing Han Change-Id: Id5524a726d213c5eab55570fd28d28da978974e7 --- drivers/android/vendor_hooks.c | 2 ++ include/trace/hooks/mm.h | 6 ++++++ mm/swapfile.c | 8 ++++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 13c10551d922..6415c78cbbdd 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -443,6 +443,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_inactive_is_low); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_snapshot_refaults); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_account_swap_pages); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_unuse_swap_page); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_init_swap_info_struct); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_swapinfo); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_si); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_shmem_page_flag); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_pelt_multiplier); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 213b14ea4cc6..0362142a1323 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -245,9 +245,15 @@ DECLARE_HOOK(android_vh_account_swap_pages, DECLARE_HOOK(android_vh_unuse_swap_page, TP_PROTO(struct swap_info_struct *si, struct page *page), TP_ARGS(si, page)); +DECLARE_HOOK(android_vh_init_swap_info_struct, + TP_PROTO(struct swap_info_struct *p, struct plist_head *swap_avail_heads), + TP_ARGS(p, swap_avail_heads)); DECLARE_HOOK(android_vh_si_swapinfo, TP_PROTO(struct swap_info_struct *si, bool *skip), TP_ARGS(si, skip)); +DECLARE_HOOK(android_vh_alloc_si, + TP_PROTO(struct swap_info_struct **p, bool *skip), + TP_ARGS(p, skip)); DECLARE_HOOK(android_vh_set_shmem_page_flag, TP_PROTO(struct page *page), TP_ARGS(page)); diff --git a/mm/swapfile.c b/mm/swapfile.c index 0aba6e4742d1..677f235806c2 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2902,12 +2902,15 @@ late_initcall(max_swapfiles_check); static struct swap_info_struct *alloc_swap_info(void) { - struct swap_info_struct *p; + struct swap_info_struct *p = NULL; struct swap_info_struct *defer = NULL; unsigned int type; int i; + bool skip = false; - p = kvzalloc(struct_size(p, avail_lists, nr_node_ids), GFP_KERNEL); + trace_android_vh_alloc_si(&p, &skip); + if (!skip) + p = kvzalloc(struct_size(p, avail_lists, nr_node_ids), GFP_KERNEL); if (!p) return ERR_PTR(-ENOMEM); @@ -3390,6 +3393,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) (swap_flags & SWAP_FLAG_PRIO_MASK) >> SWAP_FLAG_PRIO_SHIFT; enable_swap_info(p, prio, swap_map, cluster_info, frontswap_map); + trace_android_vh_init_swap_info_struct(p, swap_avail_heads); pr_info("Adding %uk swap on %s. Priority:%d extents:%d across:%lluk %s%s%s%s%s\n", p->pages<<(PAGE_SHIFT-10), name->name, p->prio, nr_extents, (unsigned long long)span<<(PAGE_SHIFT-10), From a47fb6a9ae411a860f0f46453608a12bfbc86c5d Mon Sep 17 00:00:00 2001 From: Bing Han Date: Thu, 18 Aug 2022 15:38:58 +0800 Subject: [PATCH 15/28] ANDROID: vendor_hook: Add hook in __free_pages() This reverts commit eb99e6d80ee21eb061c55cdf14c0b05e0c61af4d The hook android_vh_free_pages is deleted, due to the symbol is not added to the abi list. The symbol is added to the abi list in patch:2183484. This patch is to add the hook android_vh_free_pages again. Bug: 234214858 Bug: 203756332 Cc: Greg Kroah-Hartman Signed-off-by: Bing Han Change-Id: I2c97ea4d310e2004b94d891678127c17f7b07c93 --- drivers/android/vendor_hooks.c | 1 + include/trace/hooks/mm.h | 3 +++ mm/page_alloc.c | 1 + 3 files changed, 5 insertions(+) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 6415c78cbbdd..9ba5ee6016cf 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -446,5 +446,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_unuse_swap_page); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_init_swap_info_struct); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_si_swapinfo); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_si); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_pages); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_set_shmem_page_flag); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_pelt_multiplier); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 0362142a1323..8b0225ce7ced 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -254,6 +254,9 @@ DECLARE_HOOK(android_vh_si_swapinfo, DECLARE_HOOK(android_vh_alloc_si, TP_PROTO(struct swap_info_struct **p, bool *skip), TP_ARGS(p, skip)); +DECLARE_HOOK(android_vh_free_pages, + TP_PROTO(struct page *page, unsigned int order), + TP_ARGS(page, order)); DECLARE_HOOK(android_vh_set_shmem_page_flag, TP_PROTO(struct page *page), TP_ARGS(page)); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 9e43e2b8425c..d2b7eca3a2bf 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5183,6 +5183,7 @@ static inline void free_the_page(struct page *page, unsigned int order) void __free_pages(struct page *page, unsigned int order) { + trace_android_vh_free_pages(page, order); if (put_page_testzero(page)) free_the_page(page, order); else if (!PageHead(page)) From 15ad83d91f89416100663032d8b8d7e8c6c608c0 Mon Sep 17 00:00:00 2001 From: Bing Han Date: Thu, 18 Aug 2022 12:20:58 +0800 Subject: [PATCH 16/28] ANDROID: GKI: Update symbol list for transsion Leaf changes summary: 52 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 26 Added functions Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 26 Added variables 26 Added functions: [A] 'function int __traceiter_android_vh_account_swap_pages(void*, swap_info_struct*, bool*)' [A] 'function int __traceiter_android_vh_alloc_si(void*, swap_info_struct**, bool*)' [A] 'function int __traceiter_android_vh_alloc_swap_slot_cache(void*, swap_slots_cache*, int*, bool*)' [A] 'function int __traceiter_android_vh_count_pswpin(void*, swap_info_struct*)' [A] 'function int __traceiter_android_vh_count_pswpout(void*, swap_info_struct*)' [A] 'function int __traceiter_android_vh_count_swpout_vm_event(void*, swap_info_struct*, page*, bool*)' [A] 'function int __traceiter_android_vh_cow_user_page(void*, vm_fault*, page*)' [A] 'function int __traceiter_android_vh_drain_slots_cache_cpu(void*, swap_slots_cache*, unsigned int, bool, bool*)' [A] 'function int __traceiter_android_vh_free_pages(void*, page*, unsigned int)' [A] 'function int __traceiter_android_vh_free_swap_slot(void*, swp_entry_t, swap_slots_cache*, bool*)' [A] 'function int __traceiter_android_vh_get_swap_page(void*, page*, swp_entry_t*, swap_slots_cache*, bool*)' [A] 'function int __traceiter_android_vh_handle_pte_fault_end(void*, vm_fault*, unsigned long int)' [A] 'function int __traceiter_android_vh_inactive_is_low(void*, unsigned long int, unsigned long int*, lru_list, bool*)' [A] 'function int __traceiter_android_vh_init_swap_info_struct(void*, swap_info_struct*, plist_head*)' [A] 'function int __traceiter_android_vh_migrate_page_states(void*, page*, page*)' [A] 'function int __traceiter_android_vh_page_isolated_for_reclaim(void*, mm_struct*, page*)' [A] 'function int __traceiter_android_vh_page_referenced_one_end(void*, vm_area_struct*, page*, int)' [A] 'function int __traceiter_android_vh_set_shmem_page_flag(void*, page*)' [A] 'function int __traceiter_android_vh_si_swapinfo(void*, swap_info_struct*, bool*)' [A] 'function int __traceiter_android_vh_snapshot_refaults(void*, lruvec*)' [A] 'function int __traceiter_android_vh_swap_slot_cache_active(void*, bool)' [A] 'function int __traceiter_android_vh_swapin_add_anon_rmap(void*, vm_fault*, page*)' [A] 'function int __traceiter_android_vh_unuse_swap_page(void*, swap_info_struct*, page*)' [A] 'function int __traceiter_android_vh_waiting_for_page_migration(void*, page*)' [A] 'function void plist_del(plist_node*, plist_head*)' [A] 'function void plist_requeue(plist_node*, plist_head*)' 26 Added variables: [A] 'tracepoint __tracepoint_android_vh_account_swap_pages' [A] 'tracepoint __tracepoint_android_vh_alloc_si' [A] 'tracepoint __tracepoint_android_vh_alloc_swap_slot_cache' [A] 'tracepoint __tracepoint_android_vh_count_pswpin' [A] 'tracepoint __tracepoint_android_vh_count_pswpout' [A] 'tracepoint __tracepoint_android_vh_count_swpout_vm_event' [A] 'tracepoint __tracepoint_android_vh_cow_user_page' [A] 'tracepoint __tracepoint_android_vh_drain_slots_cache_cpu' [A] 'tracepoint __tracepoint_android_vh_free_pages' [A] 'tracepoint __tracepoint_android_vh_free_swap_slot' [A] 'tracepoint __tracepoint_android_vh_get_swap_page' [A] 'tracepoint __tracepoint_android_vh_handle_pte_fault_end' [A] 'tracepoint __tracepoint_android_vh_inactive_is_low' [A] 'tracepoint __tracepoint_android_vh_init_swap_info_struct' [A] 'tracepoint __tracepoint_android_vh_migrate_page_states' [A] 'tracepoint __tracepoint_android_vh_page_isolated_for_reclaim' [A] 'tracepoint __tracepoint_android_vh_page_referenced_one_end' [A] 'tracepoint __tracepoint_android_vh_set_shmem_page_flag' [A] 'tracepoint __tracepoint_android_vh_si_swapinfo' [A] 'tracepoint __tracepoint_android_vh_snapshot_refaults' [A] 'tracepoint __tracepoint_android_vh_swap_slot_cache_active' [A] 'tracepoint __tracepoint_android_vh_swapin_add_anon_rmap' [A] 'tracepoint __tracepoint_android_vh_unuse_swap_page' [A] 'tracepoint __tracepoint_android_vh_waiting_for_page_migration' [A] 'atomic_long_t nr_swap_pages' [A] 'unsigned long int zero_pfn' Bug: 234214858 Signed-off-by: Bing Han Change-Id: I7e1764ee1bbd2e44bb67933024d89520ba48da22 --- android/abi_gki_aarch64.xml | 332 +++++++++++++++++++++++++++++- android/abi_gki_aarch64_transsion | 52 +++++ 2 files changed, 383 insertions(+), 1 deletion(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index e0004c18f143..3fb33ab9b246 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -391,6 +391,7 @@ + @@ -398,6 +399,8 @@ + + @@ -440,6 +443,10 @@ + + + + @@ -455,6 +462,7 @@ + @@ -466,6 +474,8 @@ + + @@ -478,10 +488,14 @@ + + + + @@ -505,6 +519,7 @@ + @@ -517,7 +532,9 @@ + + @@ -565,6 +582,7 @@ + @@ -576,9 +594,13 @@ + + + + @@ -603,6 +625,7 @@ + @@ -610,6 +633,7 @@ + @@ -4141,6 +4165,8 @@ + + @@ -6258,6 +6284,7 @@ + @@ -6265,6 +6292,8 @@ + + @@ -6307,6 +6336,10 @@ + + + + @@ -6322,6 +6355,7 @@ + @@ -6334,6 +6368,8 @@ + + @@ -6346,11 +6382,15 @@ + + + + @@ -6375,6 +6415,7 @@ + @@ -6388,7 +6429,9 @@ + + @@ -6445,6 +6488,7 @@ + @@ -6457,10 +6501,14 @@ + + + + @@ -6487,6 +6535,7 @@ + @@ -6495,6 +6544,7 @@ + @@ -6666,6 +6716,7 @@ + @@ -6748,6 +6799,7 @@ + @@ -15033,6 +15085,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -50914,6 +51049,7 @@ + @@ -67622,7 +67758,14 @@ - + + + + + + + + @@ -73599,6 +73742,7 @@ + @@ -88388,6 +88532,7 @@ + @@ -92681,6 +92826,7 @@ + @@ -117427,6 +117573,12 @@ + + + + + + @@ -117479,6 +117631,19 @@ + + + + + + + + + + + + + @@ -117763,6 +117928,29 @@ + + + + + + + + + + + + + + + + + + + + + + + @@ -117863,6 +118051,14 @@ + + + + + + + + @@ -117935,6 +118131,19 @@ + + + + + + + + + + + + + @@ -118006,6 +118215,14 @@ + + + + + + + + @@ -118022,6 +118239,20 @@ + + + + + + + + + + + + + + @@ -118029,6 +118260,12 @@ + + + + + + @@ -118171,6 +118408,12 @@ + + + + + + @@ -118245,6 +118488,12 @@ + + + + + + @@ -118253,6 +118502,13 @@ + + + + + + + @@ -118525,6 +118781,11 @@ + + + + + @@ -118595,6 +118856,17 @@ + + + + + + + + + + + @@ -118613,6 +118885,17 @@ + + + + + + + + + + + @@ -118770,6 +119053,12 @@ + + + + + + @@ -118821,6 +119110,11 @@ + + + + + @@ -119325,6 +119619,7 @@ + @@ -119332,6 +119627,8 @@ + + @@ -119374,6 +119671,10 @@ + + + + @@ -119389,6 +119690,7 @@ + @@ -119401,6 +119703,8 @@ + + @@ -119413,11 +119717,15 @@ + + + + @@ -119442,6 +119750,7 @@ + @@ -119455,7 +119764,9 @@ + + @@ -119512,6 +119823,7 @@ + @@ -119524,10 +119836,14 @@ + + + + @@ -119554,6 +119870,7 @@ + @@ -119562,6 +119879,7 @@ + @@ -135194,6 +135512,7 @@ + @@ -137725,6 +138044,16 @@ + + + + + + + + + + @@ -147956,6 +148285,7 @@ + diff --git a/android/abi_gki_aarch64_transsion b/android/abi_gki_aarch64_transsion index 7538d32cf51b..648b5a445e8b 100644 --- a/android/abi_gki_aarch64_transsion +++ b/android/abi_gki_aarch64_transsion @@ -6,3 +6,55 @@ scan_swap_map_slots swap_alloc_cluster check_cache_active + zero_pfn + nr_swap_pages + plist_requeue + plist_del + __traceiter_android_vh_handle_pte_fault_end + __traceiter_android_vh_cow_user_page + __traceiter_android_vh_swapin_add_anon_rmap + __traceiter_android_vh_waiting_for_page_migration + __traceiter_android_vh_migrate_page_states + __traceiter_android_vh_page_referenced_one_end + __traceiter_android_vh_count_pswpin + __traceiter_android_vh_count_pswpout + __traceiter_android_vh_count_swpout_vm_event + __traceiter_android_vh_swap_slot_cache_active + __traceiter_android_vh_drain_slots_cache_cpu + __traceiter_android_vh_alloc_swap_slot_cache + __traceiter_android_vh_free_swap_slot + __traceiter_android_vh_get_swap_page + __traceiter_android_vh_page_isolated_for_reclaim + __traceiter_android_vh_inactive_is_low + __traceiter_android_vh_snapshot_refaults + __traceiter_android_vh_account_swap_pages + __traceiter_android_vh_unuse_swap_page + __traceiter_android_vh_init_swap_info_struct + __traceiter_android_vh_si_swapinfo + __traceiter_android_vh_alloc_si + __traceiter_android_vh_free_pages + __traceiter_android_vh_set_shmem_page_flag + __tracepoint_android_vh_handle_pte_fault_end + __tracepoint_android_vh_cow_user_page + __tracepoint_android_vh_swapin_add_anon_rmap + __tracepoint_android_vh_waiting_for_page_migration + __tracepoint_android_vh_migrate_page_states + __tracepoint_android_vh_page_referenced_one_end + __tracepoint_android_vh_count_pswpin + __tracepoint_android_vh_count_pswpout + __tracepoint_android_vh_count_swpout_vm_event + __tracepoint_android_vh_swap_slot_cache_active + __tracepoint_android_vh_drain_slots_cache_cpu + __tracepoint_android_vh_alloc_swap_slot_cache + __tracepoint_android_vh_free_swap_slot + __tracepoint_android_vh_get_swap_page + __tracepoint_android_vh_page_isolated_for_reclaim + __tracepoint_android_vh_inactive_is_low + __tracepoint_android_vh_snapshot_refaults + __tracepoint_android_vh_account_swap_pages + __tracepoint_android_vh_unuse_swap_page + __tracepoint_android_vh_init_swap_info_struct + __tracepoint_android_vh_si_swapinfo + __tracepoint_android_vh_alloc_si + __tracepoint_android_vh_free_pages + __tracepoint_android_vh_set_shmem_page_flag \ No newline at end of file From ef04c4095d0baf70ed1b2955cfcbd7f7144bf940 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 14 Jul 2022 18:38:15 -1000 Subject: [PATCH 17/28] UPSTREAM: cgroup: Elide write-locking threadgroup_rwsem when updating csses on an empty subtree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cgroup_update_dfl_csses() write-lock the threadgroup_rwsem as updating the csses can trigger process migrations. However, if the subtree doesn't contain any tasks, there aren't gonna be any cgroup migrations. This condition can be trivially detected by testing whether mgctx.preloaded_src_csets is empty. Elide write-locking threadgroup_rwsem if the subtree is empty. After this optimization, the usage pattern of creating a cgroup, enabling the necessary controllers, and then seeding it with CLONE_INTO_CGROUP and then removing the cgroup after it becomes empty doesn't need to write-lock threadgroup_rwsem at all. Bug: 242685775 Change-Id: Ifc96030fc7b0655ecd85ef19c52c9ed97e910ffb Signed-off-by: Tejun Heo Cc: Christian Brauner Cc: Michal Koutný (cherry picked from commit 671c11f0619e5ccb380bcf0f062f69ba95fc974a https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git master) Signed-off-by: Mukesh Ojha --- kernel/cgroup/cgroup.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index d50776066fa5..cd5fafbe3af7 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -2945,12 +2945,11 @@ static int cgroup_update_dfl_csses(struct cgroup *cgrp) struct cgroup_subsys_state *d_css; struct cgroup *dsct; struct ext_css_set *ext_src_set; + bool has_tasks; int ret; lockdep_assert_held(&cgroup_mutex); - percpu_down_write(&cgroup_threadgroup_rwsem); - /* look up all csses currently attached to @cgrp's subtree */ spin_lock_irq(&css_set_lock); cgroup_for_each_live_descendant_pre(dsct, d_css, cgrp) { @@ -2961,6 +2960,16 @@ static int cgroup_update_dfl_csses(struct cgroup *cgrp) } spin_unlock_irq(&css_set_lock); + /* + * We need to write-lock threadgroup_rwsem while migrating tasks. + * However, if there are no source csets for @cgrp, changing its + * controllers isn't gonna produce any task migrations and the + * write-locking can be skipped safely. + */ + has_tasks = !list_empty(&mgctx.preloaded_src_csets); + if (has_tasks) + percpu_down_write(&cgroup_threadgroup_rwsem); + /* NULL dst indicates self on default hierarchy */ ret = cgroup_migrate_prepare_dst(&mgctx); if (ret) @@ -2980,7 +2989,8 @@ static int cgroup_update_dfl_csses(struct cgroup *cgrp) ret = cgroup_migrate_execute(&mgctx); out_finish: cgroup_migrate_finish(&mgctx); - percpu_up_write(&cgroup_threadgroup_rwsem); + if (has_tasks) + percpu_up_write(&cgroup_threadgroup_rwsem); return ret; } From d1e180148e5538dd3d05f97b9206b91d35927d75 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 16 Aug 2022 17:47:16 +0530 Subject: [PATCH 18/28] BACKPORT: cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock Bringing up a CPU may involve creating and destroying tasks which requires read-locking threadgroup_rwsem, so threadgroup_rwsem nests inside cpus_read_lock(). However, cpuset's ->attach(), which may be called with thredagroup_rwsem write-locked, also wants to disable CPU hotplug and acquires cpus_read_lock(), leading to a deadlock. Fix it by guaranteeing that ->attach() is always called with CPU hotplug disabled and removing cpus_read_lock() call from cpuset_attach(). Bug: 242685775 Change-Id: Ib14746f8e361eac8a1cfb88ae920488d1155d904 Signed-off-by: Tejun Heo Reviewed-and-tested-by: Imran Khan Reported-and-tested-by: Xuewen Yan Fixes: 05c7b7a92cc8 ("cgroup/cpuset: Fix a race between cpuset_attach() and cpu hotplug") Cc: stable@vger.kernel.org # v5.17+ Link: https://lore.kernel.org/lkml/YvrWaml3F+x9Dk+T@slm.duckdns.org/ Link: https://lore.kernel.org/lkml/20220705123705.764-1-xuewen.yan@unisoc.com/ (cherry picked from commit 4f7e7236435ca0abe005c674ebd6892c6e83aeb3 https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-6.0-fixes) Signed-off-by: Mukesh Ojha --- kernel/cgroup/cgroup.c | 83 +++++++++++++++++++++++++++++------------- kernel/cgroup/cpuset.c | 3 +- 2 files changed, 58 insertions(+), 28 deletions(-) diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index cd5fafbe3af7..93866c87e680 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -2328,6 +2328,47 @@ int task_cgroup_path(struct task_struct *task, char *buf, size_t buflen) } EXPORT_SYMBOL_GPL(task_cgroup_path); +/** + * cgroup_attach_lock - Lock for ->attach() + * @lock_threadgroup: whether to down_write cgroup_threadgroup_rwsem + * + * cgroup migration sometimes needs to stabilize threadgroups against forks and + * exits by write-locking cgroup_threadgroup_rwsem. However, some ->attach() + * implementations (e.g. cpuset), also need to disable CPU hotplug. + * Unfortunately, letting ->attach() operations acquire cpus_read_lock() can + * lead to deadlocks. + * + * Bringing up a CPU may involve creating new tasks which requires read-locking + * threadgroup_rwsem, so threadgroup_rwsem nests inside cpus_read_lock(). If we + * call an ->attach() which acquires the cpus lock while write-locking + * threadgroup_rwsem, the locking order is reversed and we end up waiting for an + * on-going CPU hotplug operation which in turn is waiting for the + * threadgroup_rwsem to be released to create new tasks. For more details: + * + * http://lkml.kernel.org/r/20220711174629.uehfmqegcwn2lqzu@wubuntu + * + * Resolve the situation by always acquiring cpus_read_lock() before optionally + * write-locking cgroup_threadgroup_rwsem. This allows ->attach() to assume that + * CPU hotplug is disabled on entry. + */ +static void cgroup_attach_lock(bool lock_threadgroup) +{ + cpus_read_lock(); + if (lock_threadgroup) + percpu_down_write(&cgroup_threadgroup_rwsem); +} + +/** + * cgroup_attach_unlock - Undo cgroup_attach_lock() + * @lock_threadgroup: whether to up_write cgroup_threadgroup_rwsem + */ +static void cgroup_attach_unlock(bool lock_threadgroup) +{ + if (lock_threadgroup) + percpu_up_write(&cgroup_threadgroup_rwsem); + cpus_read_unlock(); +} + /** * cgroup_migrate_add_task - add a migration target task to a migration context * @task: target task @@ -2812,9 +2853,8 @@ int cgroup_attach_task(struct cgroup *dst_cgrp, struct task_struct *leader, } struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup, - bool *locked, + bool *threadgroup_locked, struct cgroup *dst_cgrp) - __acquires(&cgroup_threadgroup_rwsem) { struct task_struct *tsk; pid_t pid; @@ -2832,12 +2872,8 @@ struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup, * Therefore, we can skip the global lock. */ lockdep_assert_held(&cgroup_mutex); - if (pid || threadgroup) { - percpu_down_write(&cgroup_threadgroup_rwsem); - *locked = true; - } else { - *locked = false; - } + *threadgroup_locked = pid || threadgroup; + cgroup_attach_lock(*threadgroup_locked); rcu_read_lock(); if (pid) { @@ -2871,17 +2907,14 @@ struct task_struct *cgroup_procs_write_start(char *buf, bool threadgroup, goto out_unlock_rcu; out_unlock_threadgroup: - if (*locked) { - percpu_up_write(&cgroup_threadgroup_rwsem); - *locked = false; - } + cgroup_attach_unlock(*threadgroup_locked); + *threadgroup_locked = false; out_unlock_rcu: rcu_read_unlock(); return tsk; } -void cgroup_procs_write_finish(struct task_struct *task, bool locked) - __releases(&cgroup_threadgroup_rwsem) +void cgroup_procs_write_finish(struct task_struct *task, bool threadgroup_locked) { struct cgroup_subsys *ss; int ssid; @@ -2889,8 +2922,8 @@ void cgroup_procs_write_finish(struct task_struct *task, bool locked) /* release reference from cgroup_procs_write_start() */ put_task_struct(task); - if (locked) - percpu_up_write(&cgroup_threadgroup_rwsem); + cgroup_attach_unlock(threadgroup_locked); + for_each_subsys(ss, ssid) if (ss->post_attach) ss->post_attach(); @@ -2967,8 +3000,7 @@ static int cgroup_update_dfl_csses(struct cgroup *cgrp) * write-locking can be skipped safely. */ has_tasks = !list_empty(&mgctx.preloaded_src_csets); - if (has_tasks) - percpu_down_write(&cgroup_threadgroup_rwsem); + cgroup_attach_lock(has_tasks); /* NULL dst indicates self on default hierarchy */ ret = cgroup_migrate_prepare_dst(&mgctx); @@ -2989,8 +3021,7 @@ static int cgroup_update_dfl_csses(struct cgroup *cgrp) ret = cgroup_migrate_execute(&mgctx); out_finish: cgroup_migrate_finish(&mgctx); - if (has_tasks) - percpu_up_write(&cgroup_threadgroup_rwsem); + cgroup_attach_unlock(has_tasks); return ret; } @@ -4865,13 +4896,13 @@ static ssize_t cgroup_procs_write(struct kernfs_open_file *of, struct task_struct *task; const struct cred *saved_cred; ssize_t ret; - bool locked; + bool threadgroup_locked; dst_cgrp = cgroup_kn_lock_live(of->kn, false); if (!dst_cgrp) return -ENODEV; - task = cgroup_procs_write_start(buf, true, &locked, dst_cgrp); + task = cgroup_procs_write_start(buf, true, &threadgroup_locked, dst_cgrp); ret = PTR_ERR_OR_ZERO(task); if (ret) goto out_unlock; @@ -4897,7 +4928,7 @@ static ssize_t cgroup_procs_write(struct kernfs_open_file *of, ret = cgroup_attach_task(dst_cgrp, task, true); out_finish: - cgroup_procs_write_finish(task, locked); + cgroup_procs_write_finish(task, threadgroup_locked); out_unlock: cgroup_kn_unlock(of->kn); @@ -4917,7 +4948,7 @@ static ssize_t cgroup_threads_write(struct kernfs_open_file *of, struct task_struct *task; const struct cred *saved_cred; ssize_t ret; - bool locked; + bool threadgroup_locked; buf = strstrip(buf); @@ -4925,7 +4956,7 @@ static ssize_t cgroup_threads_write(struct kernfs_open_file *of, if (!dst_cgrp) return -ENODEV; - task = cgroup_procs_write_start(buf, false, &locked, dst_cgrp); + task = cgroup_procs_write_start(buf, false, &threadgroup_locked, dst_cgrp); ret = PTR_ERR_OR_ZERO(task); if (ret) goto out_unlock; @@ -4951,7 +4982,7 @@ static ssize_t cgroup_threads_write(struct kernfs_open_file *of, ret = cgroup_attach_task(dst_cgrp, task, false); out_finish: - cgroup_procs_write_finish(task, locked); + cgroup_procs_write_finish(task, threadgroup_locked); out_unlock: cgroup_kn_unlock(of->kn); diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index ff2071fba6a7..af3ed68cc4f2 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -2238,7 +2238,7 @@ static void cpuset_attach(struct cgroup_taskset *tset) cgroup_taskset_first(tset, &css); cs = css_cs(css); - cpus_read_lock(); + lockdep_assert_cpus_held(); /* see cgroup_attach_lock() */ mutex_lock(&cpuset_mutex); guarantee_online_mems(cs, &cpuset_attach_nodemask_to); @@ -2292,7 +2292,6 @@ static void cpuset_attach(struct cgroup_taskset *tset) wake_up(&cpuset_attach_wq); mutex_unlock(&cpuset_mutex); - cpus_read_unlock(); } /* The various types of files and directories in a cpuset file system */ From 4f116d326e52b12b41450db73edcbc3560f05853 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Wed, 10 Aug 2022 21:42:36 +0800 Subject: [PATCH 19/28] ANDROID: GKI: rockchip: Update symbols for rga driver Leaf changes summary: 2 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 2 Added functions Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 2 Added functions: [A] 'function unsigned long int alloc_iova_fast(iova_domain*, unsigned long int, unsigned long int, bool)' [A] 'function void free_iova_fast(iova_domain*, unsigned long int, unsigned long int)' Bug: 239396464 Signed-off-by: Kever Yang Change-Id: Ibc5b98459919d94d347f33b8b19a5c3be46c8e9a --- android/abi_gki_aarch64_rockchip | 90 ++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 39 deletions(-) diff --git a/android/abi_gki_aarch64_rockchip b/android/abi_gki_aarch64_rockchip index 2bee0c4c5eb8..6eee0b6e4e70 100644 --- a/android/abi_gki_aarch64_rockchip +++ b/android/abi_gki_aarch64_rockchip @@ -92,6 +92,7 @@ clk_gate_ops clk_get __clk_get_name + clk_get_parent clk_get_rate clk_hw_get_flags clk_hw_get_name @@ -241,6 +242,7 @@ devm_input_allocate_device devm_ioremap devm_ioremap_resource + devm_kasprintf devm_kfree devm_kmalloc devm_kmemdup @@ -315,7 +317,9 @@ dma_buf_unmap_attachment dma_buf_vmap dma_buf_vunmap + dma_fence_add_callback dma_fence_context_alloc + dma_fence_get_status dma_fence_init dma_fence_release dma_fence_signal @@ -507,6 +511,7 @@ __get_free_pages get_random_bytes get_unused_fd_flags + get_user_pages_remote get_zeroed_page gic_nonsecure_priorities gpiochip_add_pin_range @@ -526,6 +531,8 @@ gpiod_set_value gpiod_set_value_cansleep gpiod_to_irq + gpio_free + gpio_request gpio_to_desc handle_nested_irq handle_simple_irq @@ -555,8 +562,10 @@ i2c_get_adapter i2c_put_adapter i2c_register_driver + i2c_smbus_read_byte i2c_smbus_read_byte_data i2c_smbus_read_i2c_block_data + i2c_smbus_read_word_data i2c_smbus_write_byte_data i2c_smbus_write_i2c_block_data __i2c_smbus_xfer @@ -589,17 +598,22 @@ input_register_device input_set_abs_params input_set_capability + input_unregister_device iommu_attach_device + iommu_attach_group iommu_detach_device + iommu_detach_group iommu_device_register iommu_device_sysfs_add iommu_device_sysfs_remove iommu_get_dma_cookie iommu_get_domain_for_dev iommu_group_alloc + iommu_group_get iommu_group_put iommu_group_ref_get iommu_map + iommu_map_sg iommu_put_dma_cookie iommu_set_fault_handler iommu_unmap @@ -689,6 +703,7 @@ media_pipeline_start media_pipeline_stop memcpy + __memcpy_fromio memdup_user memmove memset @@ -706,6 +721,7 @@ misc_deregister misc_register mmc_of_parse + __mmdrop mod_delayed_work_on mod_timer __module_get @@ -801,6 +817,9 @@ param_ops_int param_ops_string param_ops_uint + pcie_capability_clear_and_set_word + pci_read_config_dword + pci_write_config_dword PDE_DATA __per_cpu_offset perf_trace_buf_alloc @@ -839,6 +858,7 @@ pm_clk_destroy pm_power_off __pm_relax + pm_relax __pm_runtime_disable pm_runtime_enable pm_runtime_force_resume @@ -851,6 +871,7 @@ __pm_runtime_suspend __pm_runtime_use_autosuspend __pm_stay_awake + pm_stay_awake pm_wakeup_ws_event power_supply_am_i_supplied power_supply_changed @@ -1075,6 +1096,7 @@ __sw_hweight64 __sw_hweight8 sync_file_create + sync_file_get_fence synchronize_irq synchronize_rcu syscon_node_to_regmap @@ -1221,6 +1243,7 @@ v4l2_event_queue v4l2_event_subdev_unsubscribe v4l2_event_subscribe + v4l2_event_unsubscribe v4l2_fh_open v4l2_i2c_subdev_init v4l2_match_dv_timings @@ -1312,6 +1335,10 @@ drm_dp_start_crc drm_dp_stop_crc +# required by aspm_ext.ko + pci_find_capability + pci_find_ext_capability + # required by bifrost_kbase.ko __arch_clear_user __bitmap_andnot @@ -1326,9 +1353,7 @@ devfreq_cooling_unregister devfreq_remove_device dev_pm_opp_find_freq_exact - dma_fence_add_callback dma_fence_default_wait - dma_fence_get_status dma_fence_remove_callback downgrade_write down_read_trylock @@ -1347,7 +1372,6 @@ ktime_get_raw ktime_get_raw_ts64 memchr - __mmdrop of_dma_is_coherent of_property_read_variable_u64_array pid_task @@ -1371,7 +1395,6 @@ shmem_file_setup simple_open strcspn - sync_file_get_fence system_freezing_cnt system_highpri_wq _totalram_pages @@ -1482,7 +1505,6 @@ clk_fixed_factor_ops clk_fractional_divider_ops __clk_get_hw - clk_get_parent clk_hw_register_composite clk_hw_round_rate clk_mux_ops @@ -1501,6 +1523,9 @@ scmi_driver_register scmi_driver_unregister +# required by cm3218.ko + i2c_smbus_write_word_data + # required by cma_heap.ko cma_get_name dma_contiguous_default_area @@ -1544,16 +1569,17 @@ mmc_cqe_request_done # required by cryptodev.ko - __close_fd crypto_ahash_final crypto_alloc_akcipher - get_user_pages_remote krealloc proc_dointvec register_sysctl_table sg_last unregister_sysctl_table +# required by da223.ko + simple_strtoul + # required by display-connector.ko drm_atomic_get_new_bridge_state drm_probe_ddc @@ -1672,12 +1698,6 @@ irq_get_domain_generic_chip of_pinctrl_get -# required by grf.ko - of_find_matching_node_and_match - -# required by gslx680-pad.ko - input_unregister_device - # required by hid-alps.ko down input_alloc_absinfo @@ -1706,7 +1726,6 @@ hid_destroy_device hid_input_report hid_parse_report - i2c_smbus_read_byte # required by i2c-mux.ko i2c_add_numbered_adapter @@ -1985,10 +2004,7 @@ dw_pcie_write dw_pcie_write_dbi pci_disable_link_state - pcie_capability_clear_and_set_word - pci_read_config_dword pci_set_power_state - pci_write_config_dword # required by pcierockchiphost.ko devm_pci_alloc_host_bridge @@ -2083,12 +2099,17 @@ kernel_kobj # required by rfkill-rk.ko - gpio_free - gpio_request kstrtoll rfkill_init_sw_state rfkill_set_sw_state +# required by rga3.ko + alloc_iova_fast + dma_fence_wait_timeout + free_iova_fast + kstrdup_quotable_cmdline + mmput + # required by rk628.ko irq_dispose_mapping irq_domain_xlate_onetwocell @@ -2118,11 +2139,6 @@ regmap_del_irq_chip unregister_syscore_ops -# required by rk818_battery.ko - blocking_notifier_call_chain - blocking_notifier_chain_register - blocking_notifier_chain_unregister - # required by rk860x-regulator.ko regulator_suspend_enable @@ -2151,6 +2167,9 @@ # required by rk_headset_irq_hook_adc.ko iio_read_channel_raw +# required by rk_ircut.ko + drain_workqueue + # required by rk_vcodec.ko devfreq_remove_governor devm_iounmap @@ -2160,11 +2179,8 @@ dma_buf_begin_cpu_access_partial dma_buf_end_cpu_access_partial __fdget - iommu_attach_group - iommu_detach_group iommu_device_unregister iommu_dma_reserve_iova - iommu_group_get kthread_flush_worker __kthread_init_worker kthread_queue_work @@ -2174,15 +2190,12 @@ platform_device_del pm_generic_runtime_resume pm_generic_runtime_suspend - pm_relax - pm_stay_awake proc_create_single_data proc_remove strncat # required by rknpu.ko dev_pm_domain_attach_by_name - drm_gem_create_mmap_offset drm_gem_dumb_destroy drm_gem_handle_delete drm_gem_prime_export @@ -2253,7 +2266,6 @@ dev_pm_qos_add_request dev_pm_qos_remove_request dev_pm_qos_update_request - regulator_get remove_cpu strchr strsep @@ -2421,7 +2433,6 @@ drm_writeback_signal_completion iommu_domain_alloc iommu_domain_free - iommu_map_sg memblock_free mipi_dsi_packet_format_is_short of_find_backlight_by_node @@ -2464,12 +2475,17 @@ sdhci_setup_host # required by sdhci-of-dwcmshc.ko + device_get_match_data devm_clk_bulk_get_optional dma_get_required_mask sdhci_adma_write_desc sdhci_remove_host sdhci_request +# required by sensor_dev.ko + class_create_file_ns + class_remove_file_ns + # required by sg.ko blk_get_request blk_put_request @@ -2498,9 +2514,6 @@ sg_scsi_ioctl __task_pid_nr_ns -# required by sgm41542_charger.ko - regulator_unregister - # required by sha1-ce.ko crypto_sha1_finup crypto_sha1_update @@ -2534,6 +2547,9 @@ # required by snd-soc-es8316.ko snd_pcm_hw_constraint_list +# required by snd-soc-es8326.ko + snd_soc_register_component + # required by snd-soc-hdmi-codec.ko snd_ctl_add snd_ctl_new1 @@ -2568,7 +2584,6 @@ snd_soc_dapm_force_bias_level # required by snd-soc-simple-card-utils.ko - devm_kasprintf devm_kvasprintf snd_soc_dai_set_tdm_slot snd_soc_of_parse_audio_simple_widgets @@ -2607,7 +2622,6 @@ swiotlb_max_segment # required by tcpci_husb311.ko - i2c_smbus_read_word_data tcpci_get_tcpm_port tcpci_irq tcpci_register_port @@ -2710,10 +2724,8 @@ # required by video_rkisp.ko media_device_cleanup - __memcpy_fromio __memcpy_toio param_ops_ullong - v4l2_event_unsubscribe v4l2_pipeline_link_notify # required by videobuf2-dma-sg.ko From 052619d9e13613344b8b8913bf815bfb8a515786 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Wed, 17 Aug 2022 12:10:43 +0800 Subject: [PATCH 20/28] ANDROID: GKI: rockchip: Enable symbols bcmdhd-sdio Leaf changes summary: 9 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 9 Added functions Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 9 Added functions: [A] 'function int mmc_sw_reset(mmc_host*)' [A] 'function int pinctrl_generic_add_group(pinctrl_dev*, const char*, int*, int, void*)' [A] 'function int pinmux_generic_add_function(pinctrl_dev*, const char*, const char**, const unsigned int, void*)' [A] 'function u16 sdio_readw(sdio_func*, unsigned int, int*)' [A] 'function void sdio_retune_crc_disable(sdio_func*)' [A] 'function void sdio_retune_crc_enable(sdio_func*)' [A] 'function void sdio_retune_hold_now(sdio_func*)' [A] 'function void sdio_retune_release(sdio_func*)' [A] 'function void sdio_writew(sdio_func*, u16, unsigned int, int*)' Bug: 239396464 Signed-off-by: Kever Yang Change-Id: I5f10fbc9e6b274c11508c10444ec7a31ba73ad71 --- android/abi_gki_aarch64.xml | 359 ++++++++++++++++--------------- android/abi_gki_aarch64_rockchip | 170 ++++++++++----- 2 files changed, 310 insertions(+), 219 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 3fb33ab9b246..bf6dc0f308a8 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -814,6 +814,7 @@ + @@ -2542,6 +2543,7 @@ + @@ -3574,6 +3576,7 @@ + @@ -4113,6 +4116,7 @@ + @@ -4134,6 +4138,7 @@ + @@ -4714,9 +4719,14 @@ + + + + + @@ -4725,6 +4735,7 @@ + @@ -14826,6 +14837,7 @@ + @@ -15055,15 +15067,15 @@ - + - + - + - + @@ -15085,89 +15097,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -30773,18 +30702,18 @@ - + - + - + - + - + @@ -37144,6 +37073,12 @@ + + + + + + @@ -44826,6 +44761,9 @@ + + + @@ -52893,81 +52831,81 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -60964,7 +60902,7 @@ - + @@ -62610,24 +62548,24 @@ - + - + - + - + - + - + - + @@ -67758,14 +67696,7 @@ - - - - - - - - + @@ -69131,7 +69062,26 @@ - + + + + + + + + + + + + + + + + + + + + @@ -92826,7 +92776,6 @@ - @@ -95584,7 +95533,17 @@ - + + + + + + + + + + + @@ -106029,30 +105988,30 @@ - + - + - + - + - + - + - + - + - + @@ -116465,12 +116424,12 @@ - - + + - - + + @@ -120446,9 +120405,9 @@ - - - + + + @@ -120550,6 +120509,13 @@ + + + + + + + @@ -120565,9 +120531,9 @@ - - - + + + @@ -129704,6 +129670,12 @@ + + + + + + @@ -129713,14 +129685,14 @@ - - - + + + - - - + + + @@ -134969,6 +134941,10 @@ + + + + @@ -137781,6 +137757,14 @@ + + + + + + + + @@ -137893,6 +137877,14 @@ + + + + + + + + @@ -140756,6 +140748,12 @@ + + + + + + @@ -140768,6 +140766,22 @@ + + + + + + + + + + + + + + + + @@ -140814,6 +140828,13 @@ + + + + + + + @@ -141375,15 +141396,15 @@ - + - - + + - - + + @@ -143547,8 +143568,8 @@ - - + + diff --git a/android/abi_gki_aarch64_rockchip b/android/abi_gki_aarch64_rockchip index 6eee0b6e4e70..3cf7478b5d90 100644 --- a/android/abi_gki_aarch64_rockchip +++ b/android/abi_gki_aarch64_rockchip @@ -57,6 +57,7 @@ cancel_delayed_work cancel_delayed_work_sync cancel_work_sync + capable cdev_add cdev_del cdev_device_add @@ -117,6 +118,7 @@ completion_done __const_udelay consume_skb + cpu_bit_bitmap __cpufreq_driver_target cpufreq_generic_suspend cpufreq_register_governor @@ -189,6 +191,7 @@ devfreq_suspend_device devfreq_unregister_opp_notifier dev_fwnode + dev_get_regmap device_add device_add_disk device_create @@ -258,6 +261,7 @@ devm_phy_optional_get devm_pinctrl_get devm_pinctrl_register + devm_pinctrl_register_and_init devm_platform_get_and_ioremap_resource devm_platform_ioremap_resource devm_platform_ioremap_resource_byname @@ -317,6 +321,7 @@ dma_buf_unmap_attachment dma_buf_vmap dma_buf_vunmap + dma_contiguous_default_area dma_fence_add_callback dma_fence_context_alloc dma_fence_get_status @@ -349,15 +354,18 @@ dma_unmap_page_attrs dma_unmap_resource dma_unmap_sg_attrs + down down_read down_write driver_register driver_unregister drm_add_edid_modes drm_atomic_get_crtc_state + drm_atomic_get_new_bridge_state drm_atomic_get_new_connector_for_encoder drm_atomic_helper_bridge_destroy_state drm_atomic_helper_bridge_duplicate_state + drm_atomic_helper_bridge_propagate_bus_fmt drm_atomic_helper_bridge_reset drm_atomic_helper_connector_destroy_state drm_atomic_helper_connector_duplicate_state @@ -421,6 +429,7 @@ drm_helper_probe_single_connector_modes drm_ioctl drm_kms_helper_hotplug_event + drm_kms_helper_is_poll_worker drm_match_cea_mode drm_mode_copy drm_mode_create @@ -466,6 +475,7 @@ extcon_get_state extcon_register_notifier extcon_set_property_capability + extcon_set_state extcon_set_state_sync extcon_unregister_notifier failure_tracking @@ -480,8 +490,8 @@ flush_workqueue fpsimd_context_busy fput - frame_vector_to_pages free_irq + free_netdev __free_pages free_pages free_percpu @@ -494,6 +504,7 @@ fwnode_property_read_string fwnode_property_read_u32_array gcd + generic_file_llseek generic_handle_irq generic_mii_ioctl __genphy_config_aneg @@ -584,6 +595,7 @@ iio_device_attach_buffer iio_push_to_buffers iio_read_channel_processed + init_net __init_rwsem __init_swait_queue_head init_timer_key @@ -659,6 +671,7 @@ kmem_cache_free kmemdup kobject_create_and_add + kobject_init_and_add kobject_put kobject_uevent_env kstrdup @@ -684,6 +697,7 @@ led_trigger_unregister __list_add_valid __list_del_entry_valid + __local_bh_enable_ip __log_post_read_mmio __log_read_mmio __log_write_mmio @@ -716,6 +730,8 @@ mipi_dsi_attach mipi_dsi_create_packet mipi_dsi_detach + mipi_dsi_device_register_full + mipi_dsi_device_unregister mipi_dsi_host_register mipi_dsi_host_unregister misc_deregister @@ -740,6 +756,13 @@ netdev_err netdev_info netdev_warn + netif_rx + netif_rx_ni + netif_tx_wake_queue + netlink_unicast + nla_memcpy + nla_put + nla_reserve no_llseek nonseekable_open noop_llseek @@ -769,6 +792,7 @@ of_find_device_by_node of_find_i2c_device_by_node of_find_matching_node_and_match + of_find_mipi_dsi_host_by_node of_find_node_by_name of_find_node_opts_by_path of_find_property @@ -833,8 +857,15 @@ phy_power_off phy_power_on phy_set_mode_ext + pinconf_generic_dt_free_map pinconf_generic_dt_node_to_map pinctrl_dev_get_drvdata + pinctrl_enable + pinctrl_generic_add_group + pinctrl_generic_get_group + pinctrl_generic_get_group_count + pinctrl_generic_get_group_name + pinctrl_generic_get_group_pins pinctrl_gpio_direction_input pinctrl_gpio_direction_output pinctrl_lookup_state @@ -842,6 +873,11 @@ pinctrl_pm_select_sleep_state pinctrl_select_state pinctrl_utils_free_map + pinmux_generic_add_function + pinmux_generic_get_function + pinmux_generic_get_function_count + pinmux_generic_get_function_groups + pinmux_generic_get_function_name platform_bus_type platform_device_put platform_device_register_full @@ -884,6 +920,8 @@ power_supply_register power_supply_reg_notifier power_supply_unregister + prandom_bytes + prandom_u32 preempt_schedule preempt_schedule_notrace prepare_to_wait_event @@ -925,6 +963,8 @@ regcache_sync __register_chrdev register_chrdev_region + register_inetaddr_notifier + register_netdevice register_netdevice_notifier register_pm_notifier register_reboot_notifier @@ -979,6 +1019,7 @@ round_jiffies_relative rtc_class_open rtc_read_time + rtc_time64_to_tm rtc_tm_to_time64 rtc_valid_tm rtnl_is_locked @@ -1024,9 +1065,11 @@ simple_attr_release simple_read_from_buffer simple_strtol + simple_strtoul single_open single_release skb_clone + skb_copy skb_copy_bits skb_copy_expand skb_pull @@ -1075,21 +1118,26 @@ snd_soc_put_volsw snd_soc_unregister_component snprintf + sort __spi_register_driver spi_sync sprintf sscanf __stack_chk_fail __stack_chk_guard + strchr strcmp strcpy strlcpy strlen strncasecmp + strncat strncmp strncpy strnlen + strrchr strscpy + strsep strstr __sw_hweight16 __sw_hweight32 @@ -1144,7 +1192,9 @@ __udelay __unregister_chrdev unregister_chrdev_region + unregister_inetaddr_notifier unregister_netdevice_notifier + unregister_netdevice_queue unregister_reboot_notifier unregister_shrinker up @@ -1260,10 +1310,6 @@ v4l2_valid_dv_timings vabits_actual vb2_buffer_done - vb2_common_vm_ops - vb2_create_framevec - vb2_destroy_framevec - vb2_dma_contig_memops vb2_fop_mmap vb2_fop_poll vb2_fop_release @@ -1293,8 +1339,7 @@ vmap vm_get_page_prot vm_map_pages - vm_map_ram - vm_unmap_ram + vsnprintf vunmap vzalloc wait_for_completion @@ -1304,6 +1349,7 @@ wakeup_source_add wakeup_source_remove __warn_printk + work_busy # required by 8250_dw.ko of_device_is_big_endian @@ -1339,6 +1385,66 @@ pci_find_capability pci_find_ext_capability +# required by bcmdhd.ko + alloc_etherdev_mqs + complete_and_exit + dev_open + down_interruptible + down_timeout + iwe_stream_add_event + iwe_stream_add_point + iwe_stream_add_value + __kfifo_init + kobject_uevent + mmc_set_data_timeout + mmc_sw_reset + mmc_wait_for_req + netdev_update_features + __netlink_kernel_create + netlink_kernel_release + nla_append + nla_put_nohdr + __nlmsg_put + _raw_read_lock_bh + _raw_read_unlock_bh + register_netdev + sched_set_fifo_low + sdio_claim_host + sdio_disable_func + sdio_enable_func + sdio_f0_readb + sdio_f0_writeb + sdio_get_host_pm_caps + sdio_memcpy_fromio + sdio_memcpy_toio + sdio_readb + sdio_readl + sdio_readsb + sdio_readw + sdio_register_driver + sdio_release_host + sdio_retune_crc_disable + sdio_retune_crc_enable + sdio_retune_hold_now + sdio_retune_release + sdio_set_block_size + sdio_set_host_pm_flags + sdio_unregister_driver + sdio_writeb + sdio_writel + sdio_writew + set_cpus_allowed_ptr + __skb_pad + skb_realloc_headroom + sock_wfree + sprint_symbol + strcat + strspn + sys_tz + unregister_netdev + unregister_pm_notifier + wireless_send_event + # required by bifrost_kbase.ko __arch_clear_user __bitmap_andnot @@ -1360,13 +1466,11 @@ dump_stack find_get_pid freezing_slow_path - generic_file_llseek get_user_pages get_user_pages_fast hrtimer_active iomem_resource kobject_del - kobject_init_and_add kstrndup kstrtobool_from_user ktime_get_raw @@ -1441,25 +1545,19 @@ get_net_ns_by_fd get_net_ns_by_pid inet_csk_get_port - init_net init_uts_ns key_create_or_update key_put keyring_alloc ktime_get_coarse_with_offset memcmp - netif_rx_ni netlink_broadcast netlink_register_notifier - netlink_unicast netlink_unregister_notifier net_ns_type_operations nla_find - nla_memcpy __nla_parse nla_put_64bit - nla_put - nla_reserve __nla_validate of_prop_next_u32 __put_net @@ -1528,7 +1626,6 @@ # required by cma_heap.ko cma_get_name - dma_contiguous_default_area dma_heap_get_drvdata dma_heap_put @@ -1577,11 +1674,7 @@ sg_last unregister_sysctl_table -# required by da223.ko - simple_strtoul - # required by display-connector.ko - drm_atomic_get_new_bridge_state drm_probe_ddc # required by dm9601.ko @@ -1672,7 +1765,6 @@ tcpm_register_port tcpm_unregister_port tcpm_vbus_change - vsnprintf # required by gc2145.ko v4l2_ctrl_subdev_log_status @@ -1699,7 +1791,6 @@ of_pinctrl_get # required by hid-alps.ko - down input_alloc_absinfo input_mt_sync_frame @@ -1787,7 +1878,6 @@ dev_queue_xmit ether_setup ethtool_op_get_link - free_netdev get_random_u32 __hw_addr_init __hw_addr_sync @@ -1796,24 +1886,17 @@ kernel_param_unlock kfree_skb_list ktime_get_seconds - __local_bh_enable_ip napi_gro_receive netdev_set_default_ethtool_ops netif_carrier_off netif_carrier_on netif_receive_skb netif_receive_skb_list - netif_rx netif_tx_stop_all_queues - netif_tx_wake_queue net_ratelimit - prandom_bytes - prandom_u32 ___pskb_trim rcu_barrier register_inet6addr_notifier - register_inetaddr_notifier - register_netdevice rhashtable_free_and_destroy rhashtable_insert_slow rhltable_init @@ -1825,7 +1908,6 @@ skb_checksum_help skb_clone_sk skb_complete_wifi_ack - skb_copy skb_dequeue skb_ensure_writable __skb_get_hash @@ -1835,9 +1917,7 @@ skb_queue_tail synchronize_net unregister_inet6addr_notifier - unregister_inetaddr_notifier unregister_netdevice_many - unregister_netdevice_queue # required by nvme-core.ko bd_set_nr_sectors @@ -1867,7 +1947,6 @@ blk_set_queue_dying blk_status_to_errno blk_sync_queue - capable cleanup_srcu_struct device_remove_file_self dev_pm_qos_expose_latency_tolerance @@ -1993,7 +2072,6 @@ videomode_from_timing # required by pcie-dw-rockchip.ko - cpu_bit_bitmap cpumask_next_and dw_pcie_find_ext_capability dw_pcie_host_init @@ -2022,7 +2100,6 @@ # required by phy-rockchip-inno-usb2.ko devm_extcon_register_notifier - extcon_set_state extcon_sync # required by phy-rockchip-inno-usb3.ko @@ -2077,7 +2154,6 @@ pm_genpd_add_subdomain pm_genpd_init pm_genpd_remove - strrchr # required by pwm-regulator.ko regulator_map_voltage_iterate @@ -2192,7 +2268,6 @@ pm_generic_runtime_suspend proc_create_single_data proc_remove - strncat # required by rknpu.ko dev_pm_domain_attach_by_name @@ -2267,8 +2342,6 @@ dev_pm_qos_remove_request dev_pm_qos_update_request remove_cpu - strchr - strsep thermal_zone_get_temp # required by rockchip_thermal.ko @@ -2292,7 +2365,6 @@ drm_atomic_commit drm_atomic_get_connector_state drm_atomic_get_plane_state - drm_atomic_helper_bridge_propagate_bus_fmt drm_atomic_helper_check drm_atomic_helper_check_plane_state drm_atomic_helper_cleanup_planes @@ -2443,21 +2515,14 @@ platform_find_device_by_driver __platform_register_drivers platform_unregister_drivers - sort __vmalloc -# required by rohm-bu18tl82.ko - mipi_dsi_device_register_full - mipi_dsi_device_unregister - of_find_mipi_dsi_host_by_node - # required by rtc-hym8563.ko devm_rtc_device_register # required by rtc-rk808.ko devm_rtc_allocate_device __rtc_register_device - rtc_time64_to_tm rtc_update_irq # required by sdhci-of-arasan.ko @@ -2720,7 +2785,6 @@ # required by video_rkcif.ko media_entity_setup_link - work_busy # required by video_rkisp.ko media_device_cleanup @@ -2728,8 +2792,14 @@ param_ops_ullong v4l2_pipeline_link_notify -# required by videobuf2-dma-sg.ko +# required by videobuf2-cma-sg.ko + frame_vector_to_pages split_page + vb2_common_vm_ops + vb2_create_framevec + vb2_destroy_framevec + vm_map_ram + vm_unmap_ram # required by vl6180.ko iio_read_const_attr From f32894eadfeb45602ac80148cde3d293aaa12140 Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Wed, 17 Aug 2022 15:17:26 +0800 Subject: [PATCH 21/28] ANDROID: GKI: rockchip: update fragment file Sync the latest fragment file. Bug: 239396464 Signed-off-by: Kever Yang Change-Id: I2e0afd0c4ff7a60b712e642cbe8a914c4407602d --- arch/arm64/configs/rockchip_gki.fragment | 141 ++++++++++++++++++++--- build.config.rockchip | 2 +- 2 files changed, 124 insertions(+), 19 deletions(-) diff --git a/arch/arm64/configs/rockchip_gki.fragment b/arch/arm64/configs/rockchip_gki.fragment index 36645c46d0b4..6253108101a8 100644 --- a/arch/arm64/configs/rockchip_gki.fragment +++ b/arch/arm64/configs/rockchip_gki.fragment @@ -1,20 +1,24 @@ +CONFIG_AP6XXX=m CONFIG_ARCH_ROCKCHIP=y CONFIG_ARM_ROCKCHIP_BUS_DEVFREQ=m CONFIG_ARM_ROCKCHIP_CPUFREQ=m -# CONFIG_ATA_SFF is not set +CONFIG_ARM_ROCKCHIP_DMC_DEVFREQ=m CONFIG_BACKLIGHT_PWM=m CONFIG_BATTERY_CW2015=m +CONFIG_BATTERY_CW2017=m +CONFIG_BATTERY_CW221X=m CONFIG_BATTERY_RK817=m CONFIG_BATTERY_RK818=m CONFIG_BLK_DEV_NVME=m CONFIG_BMA2XX_ACC=m CONFIG_CHARGER_BQ25700=m +CONFIG_CHARGER_BQ25890=m CONFIG_CHARGER_RK817=m CONFIG_CHARGER_RK818=m +CONFIG_CHARGER_SC89890=m +CONFIG_CHARGER_SGM41542=m CONFIG_CHR_DEV_SCH=m CONFIG_CHR_DEV_SG=m -# CONFIG_CLK_RK1808 is not set -# CONFIG_CLK_RK3308 is not set CONFIG_COMMON_CLK_PWM=m CONFIG_COMMON_CLK_RK808=m CONFIG_COMMON_CLK_ROCKCHIP=m @@ -25,12 +29,10 @@ CONFIG_COMPASS_DEVICE=m CONFIG_CPUFREQ_DT=m CONFIG_CPU_FREQ_GOV_ONDEMAND=m CONFIG_CPU_FREQ_GOV_USERSPACE=m -CONFIG_CPU_PX30=y -CONFIG_CPU_RK3328=y -CONFIG_CPU_RK3368=y -CONFIG_CPU_RK3399=y -CONFIG_CPU_RK3568=y +CONFIG_CPU_RK3588=y CONFIG_CRYPTO_AES_ARM64_CE_CCM=m +CONFIG_CRYPTO_DEV_ROCKCHIP=m +CONFIG_CRYPTO_DEV_ROCKCHIP_DEV=m CONFIG_CRYPTO_GHASH_ARM64_CE=m CONFIG_CRYPTO_SHA1_ARM64_CE=m CONFIG_CRYPTO_TWOFISH=m @@ -38,13 +40,20 @@ CONFIG_DEVFREQ_EVENT_ROCKCHIP_NOCP=m CONFIG_DMABUF_HEAPS_CMA=m CONFIG_DMABUF_HEAPS_SYSTEM=m CONFIG_DRAGONRISE_FF=y +CONFIG_DRM_DISPLAY_CONNECTOR=m CONFIG_DRM_DW_HDMI_CEC=m CONFIG_DRM_DW_HDMI_I2S_AUDIO=m +CONFIG_DRM_MAXIM_MAX96745=m +CONFIG_DRM_MAXIM_MAX96752F=m +CONFIG_DRM_MAXIM_MAX96755F=m CONFIG_DRM_PANEL_SIMPLE=m +CONFIG_DRM_RK1000_TVE=m +CONFIG_DRM_RK630_TVE=m CONFIG_DRM_ROCKCHIP=m +CONFIG_DRM_ROCKCHIP_RK628=m +CONFIG_DRM_ROHM_BU18XL82=m CONFIG_DRM_SII902X=m CONFIG_DTC_SYMBOLS=y -# CONFIG_DWMAC_GENERIC is not set CONFIG_DW_WATCHDOG=m CONFIG_GPIO_ROCKCHIP=m CONFIG_GREENASIA_FF=y @@ -116,13 +125,12 @@ CONFIG_I2C_CHARDEV=m CONFIG_I2C_GPIO=m CONFIG_I2C_HID=m CONFIG_I2C_RK3X=m +CONFIG_IEP=m CONFIG_IIO_BUFFER_CB=m CONFIG_INPUT_RK805_PWRKEY=m -CONFIG_ION=y -CONFIG_ION_SYSTEM_HEAP=y -CONFIG_JOLIET=y CONFIG_KEYBOARD_ADC=m CONFIG_LEDS_GPIO=m +CONFIG_LEDS_RGB13H=m CONFIG_LEDS_TRIGGER_BACKLIGHT=m CONFIG_LEDS_TRIGGER_DEFAULT_ON=m CONFIG_LEDS_TRIGGER_HEARTBEAT=m @@ -131,7 +139,16 @@ CONFIG_LSM330_ACC=m CONFIG_LS_CM3217=m CONFIG_LS_CM3218=m CONFIG_LS_STK3410=m -# CONFIG_MALI400_PROFILING is not set +CONFIG_LS_UCS14620=m +CONFIG_MALI_BIFROST=m +CONFIG_MALI_BIFROST_DEBUG=y +CONFIG_MALI_BIFROST_EXPERT=y +CONFIG_MALI_CSF_SUPPORT=y +CONFIG_MALI_PLATFORM_NAME="rk" +CONFIG_MALI_PWRSOFT_765=y +CONFIG_MFD_RK628=m +CONFIG_MFD_RK630_I2C=m +CONFIG_MFD_RK806_SPI=m CONFIG_MFD_RK808=m CONFIG_MMC_DW=m CONFIG_MMC_DW_ROCKCHIP=m @@ -141,22 +158,33 @@ CONFIG_MPU6500_ACC=m CONFIG_MPU6880_ACC=m CONFIG_OPTEE=m CONFIG_PANTHERLORD_FF=y +CONFIG_PCIEASPM_EXT=m +CONFIG_PCIE_DW_ROCKCHIP=m +CONFIG_PCIE_ROCKCHIP_HOST=m +CONFIG_PHY_ROCKCHIP_CSI2_DPHY=m CONFIG_PHY_ROCKCHIP_DP=m CONFIG_PHY_ROCKCHIP_EMMC=m CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY=m +CONFIG_PHY_ROCKCHIP_INNO_HDMI=m CONFIG_PHY_ROCKCHIP_INNO_USB2=m CONFIG_PHY_ROCKCHIP_INNO_USB3=m CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=m CONFIG_PHY_ROCKCHIP_NANENG_EDP=m CONFIG_PHY_ROCKCHIP_PCIE=m +CONFIG_PHY_ROCKCHIP_SAMSUNG_DCPHY=m +CONFIG_PHY_ROCKCHIP_SAMSUNG_HDPTX=m +CONFIG_PHY_ROCKCHIP_SAMSUNG_HDPTX_HDMI=m CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=m CONFIG_PHY_ROCKCHIP_TYPEC=m CONFIG_PHY_ROCKCHIP_USB=m +CONFIG_PHY_ROCKCHIP_USBDP=m CONFIG_PINCTRL_RK805=m +CONFIG_PINCTRL_RK806=m CONFIG_PINCTRL_ROCKCHIP=m CONFIG_PL330_DMA=m CONFIG_PROXIMITY_DEVICE=m CONFIG_PS_STK3410=m +CONFIG_PS_UCS14620=m CONFIG_PWM_ROCKCHIP=m CONFIG_REGULATOR_ACT8865=m CONFIG_REGULATOR_FAN53555=m @@ -164,25 +192,43 @@ CONFIG_REGULATOR_GPIO=m CONFIG_REGULATOR_LP8752=m CONFIG_REGULATOR_MP8865=m CONFIG_REGULATOR_PWM=m +CONFIG_REGULATOR_RK806=m CONFIG_REGULATOR_RK808=m +CONFIG_REGULATOR_RK860X=m CONFIG_REGULATOR_TPS65132=m +CONFIG_REGULATOR_WL2868C=m CONFIG_REGULATOR_XZ3216=m +CONFIG_RFKILL_RK=m CONFIG_RK_CONSOLE_THREAD=y -CONFIG_RK_NAND=m +CONFIG_RK_HEADSET=m CONFIG_ROCKCHIP_ANALOGIX_DP=y CONFIG_ROCKCHIP_CDN_DP=y CONFIG_ROCKCHIP_CPUINFO=m CONFIG_ROCKCHIP_DEBUG=m +CONFIG_ROCKCHIP_DW_DP=y +CONFIG_ROCKCHIP_DW_HDCP2=m CONFIG_ROCKCHIP_DW_HDMI=y CONFIG_ROCKCHIP_DW_MIPI_DSI=y CONFIG_ROCKCHIP_EFUSE=m -CONFIG_ROCKCHIP_FIQ_DEBUGGER=m CONFIG_ROCKCHIP_GRF=m CONFIG_ROCKCHIP_INNO_HDMI=y CONFIG_ROCKCHIP_IODOMAIN=m CONFIG_ROCKCHIP_IOMMU=m CONFIG_ROCKCHIP_IPA=m CONFIG_ROCKCHIP_LVDS=y +CONFIG_ROCKCHIP_MPP_AV1DEC=y +CONFIG_ROCKCHIP_MPP_IEP2=y +CONFIG_ROCKCHIP_MPP_JPGDEC=y +CONFIG_ROCKCHIP_MPP_RKVDEC=y +CONFIG_ROCKCHIP_MPP_RKVDEC2=y +CONFIG_ROCKCHIP_MPP_RKVENC=y +CONFIG_ROCKCHIP_MPP_RKVENC2=y +CONFIG_ROCKCHIP_MPP_SERVICE=m +CONFIG_ROCKCHIP_MPP_VDPU1=y +CONFIG_ROCKCHIP_MPP_VDPU2=y +CONFIG_ROCKCHIP_MPP_VEPU1=y +CONFIG_ROCKCHIP_MPP_VEPU2=y +CONFIG_ROCKCHIP_MULTI_RGA=m CONFIG_ROCKCHIP_OPP=m CONFIG_ROCKCHIP_OTP=m CONFIG_ROCKCHIP_PHY=m @@ -191,14 +237,19 @@ CONFIG_ROCKCHIP_PVTM=m CONFIG_ROCKCHIP_REMOTECTL=m CONFIG_ROCKCHIP_REMOTECTL_PWM=m CONFIG_ROCKCHIP_RGB=y +CONFIG_ROCKCHIP_RKNPU=m CONFIG_ROCKCHIP_SARADC=m CONFIG_ROCKCHIP_SIP=m +CONFIG_ROCKCHIP_SUSPEND_MODE=m CONFIG_ROCKCHIP_SYSTEM_MONITOR=m CONFIG_ROCKCHIP_THERMAL=m +CONFIG_ROCKCHIP_TIMER=m CONFIG_ROCKCHIP_VENDOR_STORAGE=m CONFIG_ROCKCHIP_VENDOR_STORAGE_UPDATE_LOADER=y +CONFIG_RTC_DRV_HYM8563=m CONFIG_RTC_DRV_RK808=m CONFIG_SENSOR_DEVICE=m +CONFIG_SERIAL_8250_DW=m CONFIG_SMARTJOYPLUS_FF=y CONFIG_SND_SIMPLE_CARD=m CONFIG_SND_SOC_BT_SCO=m @@ -209,13 +260,20 @@ CONFIG_SND_SOC_ES7210=m CONFIG_SND_SOC_ES7243E=m CONFIG_SND_SOC_ES8311=m CONFIG_SND_SOC_ES8316=m +CONFIG_SND_SOC_ES8323=m +CONFIG_SND_SOC_ES8326=m CONFIG_SND_SOC_ES8396=m CONFIG_SND_SOC_RK3328=m CONFIG_SND_SOC_RK817=m CONFIG_SND_SOC_RK_CODEC_DIGITAL=m CONFIG_SND_SOC_ROCKCHIP=m +CONFIG_SND_SOC_ROCKCHIP_HDMI=m +CONFIG_SND_SOC_ROCKCHIP_I2S=m +CONFIG_SND_SOC_ROCKCHIP_I2S_TDM=m +CONFIG_SND_SOC_ROCKCHIP_MULTICODECS=m CONFIG_SND_SOC_ROCKCHIP_PDM=m CONFIG_SND_SOC_ROCKCHIP_SPDIF=m +CONFIG_SND_SOC_ROCKCHIP_SPDIFRX=m CONFIG_SND_SOC_RT5640=m CONFIG_SND_SOC_SPDIF=m CONFIG_SPI_ROCKCHIP=m @@ -224,14 +282,61 @@ CONFIG_SW_SYNC=m CONFIG_SYSCON_REBOOT_MODE=m CONFIG_TEE=m CONFIG_TEST_POWER=m +CONFIG_TOUCHSCREEN_ELAN5515=m +CONFIG_TOUCHSCREEN_GSL3673=m CONFIG_TOUCHSCREEN_GSLX680_PAD=m -CONFIG_TOUCHSCREEN_GT1X=m CONFIG_TYPEC_DP_ALTMODE=m CONFIG_TYPEC_FUSB302=m +CONFIG_TYPEC_HUSB311=m +CONFIG_UCS12CM0=m +CONFIG_USB_DWC2=m +CONFIG_USB_NET_CDC_MBIM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_KALMIA=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=m +CONFIG_USB_OHCI_HCD=m +# CONFIG_USB_OHCI_HCD_PCI is not set +CONFIG_USB_OHCI_HCD_PLATFORM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_TRANCEVIBRATOR=m +CONFIG_VIDEO_AW36518=m +CONFIG_VIDEO_AW8601=m +CONFIG_VIDEO_CN3927V=m CONFIG_VIDEO_DW9714=m -CONFIG_VIDEO_OV2680=m +CONFIG_VIDEO_FP5510=m +CONFIG_VIDEO_GC2145=m +CONFIG_VIDEO_GC2385=m +CONFIG_VIDEO_GC4C33=m +CONFIG_VIDEO_GC8034=m +CONFIG_VIDEO_IMX415=m +CONFIG_VIDEO_LT6911UXC=m +CONFIG_VIDEO_LT7911D=m +CONFIG_VIDEO_NVP6188=m +CONFIG_VIDEO_OV02B10=m +CONFIG_VIDEO_OV13850=m +CONFIG_VIDEO_OV13855=m +CONFIG_VIDEO_OV50C40=m CONFIG_VIDEO_OV5695=m -CONFIG_ZISOFS=y +CONFIG_VIDEO_OV8858=m +CONFIG_VIDEO_RK628_BT1120=m +CONFIG_VIDEO_RK628_CSI=m +CONFIG_VIDEO_RK_IRCUT=m +CONFIG_VIDEO_ROCKCHIP_CIF=m +CONFIG_VIDEO_ROCKCHIP_ISP=m +CONFIG_VIDEO_ROCKCHIP_ISPP=m +CONFIG_VIDEO_S5K3L6XX=m +CONFIG_VIDEO_S5KJN1=m +CONFIG_VIDEO_SGM3784=m +CONFIG_VIDEO_THCV244=m +CONFIG_VL6180=m +CONFIG_WIFI_BUILD_MODULE=y +CONFIG_WL_ROCKCHIP=m CONFIG_ZRAM=m CONFIG_ZSMALLOC=m # CONFIG_USB_DUMMY_HCD is not set diff --git a/build.config.rockchip b/build.config.rockchip index e7f08311793b..297c4c95a14b 100644 --- a/build.config.rockchip +++ b/build.config.rockchip @@ -3,6 +3,6 @@ DEFCONFIG=rockchip_aarch64_gki_defconfig KMI_SYMBOL_LIST=android/abi_gki_aarch64_rockchip -PRE_DEFCONFIG_CMDS="KCONFIG_CONFIG=${ROOT_DIR}/common/arch/arm64/configs/${DEFCONFIG} ${ROOT_DIR}/common/scripts/kconfig/merge_config.sh -m -r ${ROOT_DIR}/common/arch/arm64/configs/gki_defconfig ${ROOT_DIR}/common/arch/arm64/configs/rockchip_gki.config" +PRE_DEFCONFIG_CMDS="KCONFIG_CONFIG=${ROOT_DIR}/common/arch/arm64/configs/${DEFCONFIG} ${ROOT_DIR}/common/scripts/kconfig/merge_config.sh -m -r ${ROOT_DIR}/common/arch/arm64/configs/gki_defconfig ${ROOT_DIR}/common/arch/arm64/configs/rockchip_gki.fragment" POST_DEFCONFIG_CMDS="rm ${ROOT_DIR}/common/arch/arm64/configs/${DEFCONFIG}" From a47cec9c434191698c1ef04f98f90aa7cad7d2b2 Mon Sep 17 00:00:00 2001 From: Peifeng Li Date: Mon, 22 Aug 2022 12:47:27 +0800 Subject: [PATCH 22/28] ANDROID: GKI: Update symbols to symbol list Leaf changes summary: 2 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable 1 Added function: [A] 'function int __traceiter_android_vh_remove_vmalloc_stack(void*, vm_struct*)' 1 Added variable: [A] 'tracepoint __tracepoint_android_vh_remove_vmalloc_stack' Bug: 193384408 Signed-off-by: Peifeng Li Change-Id: I73fed5d8689959d4dc28d811b35570c87ac7336d --- android/abi_gki_aarch64.xml | 85 +++++++++++++++++++++++++++-------- android/abi_gki_aarch64_oplus | 2 + 2 files changed, 68 insertions(+), 19 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index bf6dc0f308a8..671db57b96e6 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -549,6 +549,7 @@ + @@ -6459,6 +6460,7 @@ + @@ -44022,7 +44024,23 @@ - + + + + + + + + + + + + + + + + + @@ -48313,6 +48331,7 @@ + @@ -53196,6 +53215,13 @@ + + + + + + + @@ -65762,6 +65788,13 @@ + + + + + + + @@ -90279,6 +90312,7 @@ + @@ -101920,6 +101954,12 @@ + + + + + + @@ -110156,6 +110196,7 @@ + @@ -118552,6 +118593,11 @@ + + + + + @@ -119742,6 +119788,7 @@ + @@ -122093,9 +122140,9 @@ - - - + + + @@ -122105,14 +122152,14 @@ - - - + + + - - - + + + @@ -123017,9 +123064,9 @@ - - - + + + @@ -123519,14 +123566,14 @@ - - - + + + - - - + + + diff --git a/android/abi_gki_aarch64_oplus b/android/abi_gki_aarch64_oplus index fc00ead539dc..c34ab7b965e0 100644 --- a/android/abi_gki_aarch64_oplus +++ b/android/abi_gki_aarch64_oplus @@ -2856,6 +2856,7 @@ __traceiter_android_vh_rwsem_write_finished __traceiter_android_vh_save_track_hash __traceiter_android_vh_save_vmalloc_stack + __traceiter_android_vh_remove_vmalloc_stack __traceiter_android_vh_sched_stat_runtime_rt __traceiter_android_vh_scheduler_tick __traceiter_android_vh_selinux_avc_insert @@ -3088,6 +3089,7 @@ __tracepoint_android_vh_rwsem_write_finished __tracepoint_android_vh_save_track_hash __tracepoint_android_vh_save_vmalloc_stack + __tracepoint_android_vh_remove_vmalloc_stack __tracepoint_android_vh_sched_stat_runtime_rt __tracepoint_android_vh_scheduler_tick __tracepoint_android_vh_selinux_avc_insert From a3e8b0479685fbd2d584aaafe09ce7670d65cdc5 Mon Sep 17 00:00:00 2001 From: Manaf Meethalavalappu Pallikunhi Date: Mon, 6 Jun 2022 02:10:38 +0530 Subject: [PATCH 23/28] ANDROID: thermal: vendor hook to disable thermal cooling stats Add vendor hook to thermal to allow vendor to selectively disable thermal cooling device stats feature based on requirement. It helps vendor to optimize memory footprint due to this feature especially for low memory devices. Bug: 218825214 Change-Id: I2ec72505f03575e09229c54765584614b16a3904 Signed-off-by: Manaf Meethalavalappu Pallikunhi (cherry picked from commit f6e47fd00f24d5e814d316b03974e970dd87879e) --- drivers/android/vendor_hooks.c | 1 + drivers/thermal/thermal_sysfs.c | 22 +++++++++++++++++++++- include/trace/hooks/thermal.h | 5 +++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 9ba5ee6016cf..2f821f4b7c7e 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -401,6 +401,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_udp_recvmsg); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_tcp_recvmsg_stat); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_pci_d3_sleep); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_kmalloc_slab); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_disable_thermal_cooling_stats); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmap_region); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_update_page_mapcount); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_add_page_to_lrulist); diff --git a/drivers/thermal/thermal_sysfs.c b/drivers/thermal/thermal_sysfs.c index f52708f310e0..3251b27fc5df 100644 --- a/drivers/thermal/thermal_sysfs.c +++ b/drivers/thermal/thermal_sysfs.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "thermal_core.h" @@ -886,9 +887,22 @@ static struct attribute *cooling_device_stats_attrs[] = { NULL }; +static umode_t cooling_device_stats_is_visible(struct kobject *kobj, + struct attribute *attr, int attrno) +{ + struct thermal_cooling_device *cdev = to_cooling_device( + kobj_to_dev(kobj)); + + if (!cdev->stats) + return 0; + + return attr->mode; +} + static const struct attribute_group cooling_device_stats_attr_group = { .attrs = cooling_device_stats_attrs, - .name = "stats" + .name = "stats", + .is_visible = cooling_device_stats_is_visible, }; static void cooling_device_stats_setup(struct thermal_cooling_device *cdev) @@ -896,6 +910,12 @@ static void cooling_device_stats_setup(struct thermal_cooling_device *cdev) struct cooling_dev_stats *stats; unsigned long states; int var; + bool disable_cdev_stats = false; + + trace_android_vh_disable_thermal_cooling_stats(cdev, + &disable_cdev_stats); + if (disable_cdev_stats) + return; if (cdev->ops->get_max_state(cdev, &states)) return; diff --git a/include/trace/hooks/thermal.h b/include/trace/hooks/thermal.h index 5e61ecd38425..c438ab6ef5b6 100644 --- a/include/trace/hooks/thermal.h +++ b/include/trace/hooks/thermal.h @@ -24,6 +24,11 @@ DECLARE_HOOK(android_vh_thermal_pm_notify_suspend, TP_PROTO(struct thermal_zone_device *tz, int *irq_wakeable), TP_ARGS(tz, irq_wakeable)); +struct thermal_cooling_device; +DECLARE_HOOK(android_vh_disable_thermal_cooling_stats, + TP_PROTO(struct thermal_cooling_device *cdev, bool *disable_stats), + TP_ARGS(cdev, disable_stats)); + #endif /* _TRACE_HOOK_THERMAL_H */ /* This part must be outside protection */ #include From 97e5ac2b5519f70c5e853652762d8ee084ab3280 Mon Sep 17 00:00:00 2001 From: Manaf Meethalavalappu Pallikunhi Date: Mon, 22 Aug 2022 18:18:02 +0530 Subject: [PATCH 24/28] ANDROID: abi_gki_aarch64_qcom: Add android_vh_disable_thermal_cooling_stats Add android_vh_disable_thermal_cooling_stats symbol so that vendor module is able to disable thermal cooling device stats. Leaf changes summary: 1 artifact changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable 1 Added variable: [A] 'tracepoint __tracepoint_android_vh_disable_thermal_cooling_stats' Bug: 218825214 Signed-off-by: Manaf Meethalavalappu Pallikunhi Change-Id: I38e56b2cf9b5bc78ac7ebefe2861d7a8932c09b2 --- android/abi_gki_aarch64.xml | 2 ++ android/abi_gki_aarch64_qcom | 1 + 2 files changed, 3 insertions(+) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index 671db57b96e6..be4ae4669da6 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -6362,6 +6362,7 @@ + @@ -119690,6 +119691,7 @@ + diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index 4dedb32d9661..a73748d1b9e4 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -2685,6 +2685,7 @@ __tracepoint_android_vh_cpu_idle_exit __tracepoint_android_vh_cpuidle_psci_enter __tracepoint_android_vh_cpuidle_psci_exit + __tracepoint_android_vh_disable_thermal_cooling_stats __tracepoint_android_vh_dump_throttled_rt_tasks __tracepoint_android_vh_freq_table_limits __tracepoint_android_vh_ftrace_dump_buffer From 3c2f107ad286964b19d2c318b7c942e6f2223eec Mon Sep 17 00:00:00 2001 From: Vijayanand Jitta Date: Thu, 11 Aug 2022 20:05:52 +0530 Subject: [PATCH 25/28] ANDROID: mm: memblock: avoid to create memmap for memblock nomap regions This 'commit 86588296acbf ("fdt: Properly handle "no-map" field in the memory region")' is keeping the no-map regions in memblock.memory with MEMBLOCK_NOMAP flag set to use no-map memory for EFI using memblock api's, but during the initialization sparse_init mark all memblock.memory as present using for_each_mem_pfn_range, which is creating the memmap for no-map memblock regions. Upstream has suggested to make use of bootloader to pass this as not a memory,but because of possibility that some bootloaders might not support this and also due to time constraints in evaluating this approach on 5.10, Use command line parameter as a temporary solution. Get in the appropriate solution later after further discussion with upstream. Add kernel param "android12_only.will_be_removed_soon.memblock_nomap_remove" which when enabled will remove page structs for these regions using memblock_remove. With this change we will be able to save ~11MB memory for ~612MB carve out. android12_only.will_be_removed_soon.memblock_nomap_remove=true: [ 0.000000] memblock_alloc_exact_nid_raw: 115343360 bytes align=0x200000 nid=0 from=0x0000000080000000 max_addr=0x0000000000000000 sparse_buffer_init+0x60/0x8c [ 0.000000] memblock_reserve: [0x0000000932c00000-0x00000009399fffff] memblock_alloc_range_nid+0xbc/0x1a0 [ 0.000000] On node 0 totalpages: 1627824 [ 0.000000] DMA32 zone: 5383 pages used for memmap [ 0.000000] Normal zone: 20052 pages used for memmap Default or android12_only.will_be_removed_soon.memblock_nomap_remove=false: [ 0.000000] memblock_alloc_exact_nid_raw: 117440512 bytes align=0x200000 nid=0 from=0x0000000080000000 max_addr=0x0000000000000000 sparse_buffer_init+0x60/0x8c [ 0.000000] memblock_reserve: [0x0000000932a00000-0x00000009399fffff] memblock_alloc_range_nid+0xbc/0x1a0 [ 0.000000] On node 0 totalpages: 1788416 [ 0.000000] DMA32 zone: 8192 pages used for memmap [ 0.000000] Normal zone: 20052 pages used for memmap. Change-Id: I34a7d46f02a6df7c769af3e53e44e49d6fc515af Bug: 227974747 Link: https://lore.kernel.org/all/20210115172949.GA1495225@robh.at.kernel.org Signed-off-by: Faiyaz Mohammed Signed-off-by: Vijayanand Jitta --- Documentation/admin-guide/kernel-parameters.txt | 6 ++++++ drivers/of/fdt.c | 3 +++ include/linux/memblock.h | 1 + mm/memblock.c | 13 +++++++++++++ 4 files changed, 23 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 858dd038499d..ce9e964d7bfb 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -2533,6 +2533,12 @@ memblock=debug [KNL] Enable memblock debug messages. + android12_only.will_be_removed_soon.memblock_nomap_remove= [KNL] + Setting this to true through kernel command line will + call memblock_remove on the regions marked with no-map + property thereby saving memory by removing page structs + for those regions. By default this is set to false. + load_ramdisk= [RAM] [Deprecated] lockd.nlm_grace_period=P [NFS] Assign grace period. diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 74d2bd7a6550..01e14ac13571 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1181,6 +1181,9 @@ int __init __weak early_init_dt_reserve_memory_arch(phys_addr_t base, if (memblock_is_region_reserved(base, size)) return -EBUSY; + if (memblock_is_nomap_remove()) + return memblock_remove(base, size); + return memblock_mark_nomap(base, size); } return memblock_reserve(base, size); diff --git a/include/linux/memblock.h b/include/linux/memblock.h index ff08bb433c16..3d2351b43d3b 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -487,6 +487,7 @@ bool memblock_is_map_memory(phys_addr_t addr); bool memblock_is_region_memory(phys_addr_t base, phys_addr_t size); bool memblock_is_reserved(phys_addr_t addr); bool memblock_is_region_reserved(phys_addr_t base, phys_addr_t size); +bool memblock_is_nomap_remove(void); void memblock_dump_all(void); diff --git a/mm/memblock.c b/mm/memblock.c index e0c166463ab4..3b559ce0869b 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -152,6 +152,7 @@ static __refdata struct memblock_type *memblock_memory = &memblock.memory; } while (0) static int memblock_debug __initdata_memblock; +static bool memblock_nomap_remove __initdata_memblock; static bool system_has_some_mirror __initdata_memblock = false; static int memblock_can_resize __initdata_memblock; static int memblock_memory_in_slab __initdata_memblock = 0; @@ -1904,6 +1905,18 @@ static int __init early_memblock(char *p) } early_param("memblock", early_memblock); +static int __init early_memblock_nomap(char *str) +{ + kstrtobool(str, &memblock_nomap_remove); + return 0; +} +early_param("android12_only.will_be_removed_soon.memblock_nomap_remove", early_memblock_nomap); + +bool __init memblock_is_nomap_remove(void) +{ + return memblock_nomap_remove; +} + static void __init __free_pages_memory(unsigned long start, unsigned long end) { int order; From 548da5d23d98b796cf9a478675622a606b3307c8 Mon Sep 17 00:00:00 2001 From: xieliujie Date: Fri, 19 Aug 2022 16:16:25 +0800 Subject: [PATCH 26/28] ANDROID: vendor_hooks: Add hooks for oem futex optimization If an important task is going to sleep through do_futex(), find out it's futex-owner by the pid comes from userspace, and boost the owner by some means to shorten the sleep time. How to boost? Depends on these hooks: 53e809978443 ("ANDROID: vendor_hooks: Add hooks for scheduler") Bug: 243110112 Signed-off-by: xieliujie Change-Id: I9a315cfb414fd34e0ef7a2cf9d57df50d4dd984f --- drivers/android/vendor_hooks.c | 6 ++++++ include/trace/hooks/futex.h | 34 ++++++++++++++++++++++++++++++++++ kernel/futex.c | 7 +++++++ 3 files changed, 47 insertions(+) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 2f821f4b7c7e..1a22772d64f1 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -106,6 +106,12 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_write_finished); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_rwsem_list_add); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_futex_plist_add); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_futex_sleep_start); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_futex); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_futex_wait_start); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_futex_wait_end); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_futex_wake_traverse_plist); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_futex_wake_this); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_futex_wake_up_q_finish); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_wait_start); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_wait_finish); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rtmutex_wait_start); diff --git a/include/trace/hooks/futex.h b/include/trace/hooks/futex.h index f8bf394ea013..829fe5605b02 100644 --- a/include/trace/hooks/futex.h +++ b/include/trace/hooks/futex.h @@ -8,6 +8,10 @@ #include #include #include +#ifndef __GENKSYMS__ +#include +#endif + /* * Following tracepoints are not exported in tracefs and provide a * mechanism for vendor modules to hook and extend functionality @@ -22,6 +26,36 @@ DECLARE_HOOK(android_vh_futex_sleep_start, TP_PROTO(struct task_struct *p), TP_ARGS(p)); +DECLARE_HOOK(android_vh_do_futex, + TP_PROTO(int cmd, + unsigned int *flags, + u32 __user *uaddr2), + TP_ARGS(cmd, flags, uaddr2)); + +DECLARE_HOOK(android_vh_futex_wait_start, + TP_PROTO(unsigned int flags, + u32 bitset), + TP_ARGS(flags, bitset)); + +DECLARE_HOOK(android_vh_futex_wait_end, + TP_PROTO(unsigned int flags, + u32 bitset), + TP_ARGS(flags, bitset)); + +DECLARE_HOOK(android_vh_futex_wake_traverse_plist, + TP_PROTO(struct plist_head *chain, int *target_nr, + union futex_key key, u32 bitset), + TP_ARGS(chain, target_nr, key, bitset)); + +DECLARE_HOOK(android_vh_futex_wake_this, + TP_PROTO(int ret, int nr_wake, int target_nr, + struct task_struct *p), + TP_ARGS(ret, nr_wake, target_nr, p)); + +DECLARE_HOOK(android_vh_futex_wake_up_q_finish, + TP_PROTO(int nr_wake, int target_nr), + TP_ARGS(nr_wake, target_nr)); + /* macro versions of hooks are no longer required */ #endif /* _TRACE_HOOK_FUTEX_H */ diff --git a/kernel/futex.c b/kernel/futex.c index 29bd9cd92468..b223cc525032 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -1594,6 +1594,7 @@ futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset) struct futex_q *this, *next; union futex_key key = FUTEX_KEY_INIT; int ret; + int target_nr; DEFINE_WAKE_Q(wake_q); if (!bitset) @@ -1611,6 +1612,7 @@ futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset) spin_lock(&hb->lock); + trace_android_vh_futex_wake_traverse_plist(&hb->chain, &target_nr, key, bitset); plist_for_each_entry_safe(this, next, &hb->chain, list) { if (match_futex (&this->key, &key)) { if (this->pi_state || this->rt_waiter) { @@ -1622,6 +1624,7 @@ futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset) if (!(this->bitset & bitset)) continue; + trace_android_vh_futex_wake_this(ret, nr_wake, target_nr, this->task); mark_wake_futex(&wake_q, this); if (++ret >= nr_wake) break; @@ -1630,6 +1633,7 @@ futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset) spin_unlock(&hb->lock); wake_up_q(&wake_q); + trace_android_vh_futex_wake_up_q_finish(nr_wake, target_nr); return ret; } @@ -2699,6 +2703,7 @@ static int futex_wait(u32 __user *uaddr, unsigned int flags, u32 val, if (!bitset) return -EINVAL; q.bitset = bitset; + trace_android_vh_futex_wait_start(flags, bitset); to = futex_setup_timer(abs_time, &timeout, flags, current->timer_slack_ns); @@ -2748,6 +2753,7 @@ out: hrtimer_cancel(&to->timer); destroy_hrtimer_on_stack(&to->timer); } + trace_android_vh_futex_wait_end(flags, bitset); return ret; } @@ -3733,6 +3739,7 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, return -ENOSYS; } + trace_android_vh_do_futex(cmd, &flags, uaddr2); switch (cmd) { case FUTEX_WAIT: val3 = FUTEX_BITSET_MATCH_ANY; From 9ecb2fcca3b3e2e38423f6eda468b05ee04614ff Mon Sep 17 00:00:00 2001 From: Peifeng Li Date: Mon, 22 Aug 2022 18:21:29 +0800 Subject: [PATCH 27/28] ANDROID: avoid huge-page not to clear trylock-bit after shrink_page_list. Clearing trylock-bit of page shrinked by shrnk_page_list in advance which avoids huge-page not to clear trylock-bit after shrink_page_list. Fixes: 1f8f6d59a298 ("ANDROID: vendor_hook: Add hook to not be stuck ro rmap lock in kswapd or direct_reclaim") Bug: 240003372 Signed-off-by: Peifeng Li Change-Id: Iac4d60ec3497d9bb7ba1f001a5c08a604daf4f5a --- mm/vmscan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 0f82957c4de7..e3a885f6a1b5 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1490,12 +1490,11 @@ free_it: * Is there need to periodically free_page_list? It would * appear not as the counts should be low */ + trace_android_vh_page_trylock_clear(page); if (unlikely(PageTransHuge(page))) destroy_compound_page(page); - else { - trace_android_vh_page_trylock_clear(page); + else list_add(&page->lru, &free_pages); - } continue; activate_locked_split: From 568ee90a7ec5c8670edd71a98f85a264d9fdc308 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 24 Aug 2022 12:54:36 +0200 Subject: [PATCH 28/28] ANDROID: fix execute bit on android/abi_gki_aarch64_asus The file android/abi_gki_aarch64_asus should not have execute permissions set on it, so fix that up. Fixes: 428d0bb76207 ("ANDROID: Add initial ASUS symbol list") Signed-off-by: Greg Kroah-Hartman Change-Id: I96b96ed6a93e4aa13de07e1f225de79a78a30867 --- android/abi_gki_aarch64_asus | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 android/abi_gki_aarch64_asus diff --git a/android/abi_gki_aarch64_asus b/android/abi_gki_aarch64_asus old mode 100755 new mode 100644