Commit Graph

1055962 Commits

Author SHA1 Message Date
Ramji Jiyani 08a1879c87 ANDROID: GKI: remove info print for header generation
Script doesn't honor the Kernel's quiet command
mechanism with KBuild; so need to remove info
only echo. Added set -x in case make V=1 for keeping
debugging handy for script in the future.

Bug: 234116152
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: Iea881816b9bc8c47157a33da67d6cf5f8357a7be
2022-06-10 11:48:01 +00:00
Andreas Gruenbacher 5452f089f9 UPSTREAM: gup: Introduce FOLL_NOFAULT flag to disable page faults
commit 55b8fe703bc51200d4698596c90813453b35ae63 upstream

Introduce a new FOLL_NOFAULT flag that causes get_user_pages to return
-EFAULT when it would otherwise trigger a page fault.  This is roughly
similar to FOLL_FAST_ONLY but available on all architectures, and less
fragile.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6e213bc614)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9042539b7125cfbbd60f2329b19a3016031a81a0
2022-06-10 08:12:04 +02:00
Andreas Gruenbacher 18e16d6365 UPSTREAM: iomap: Support partial direct I/O on user copy failures
commit 97308f8b0d867e9ef59528cd97f0db55ffdf5651 upstream

In iomap_dio_rw, when iomap_apply returns an -EFAULT error and the
IOMAP_DIO_PARTIAL flag is set, complete the request synchronously and
return a partial result.  This allows the caller to deal with the page
fault and retry the remainder of the request.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit ea7a578588)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5de5ec3e55f18305f76e78ab4c72ce3ee1272522
2022-06-10 08:12:03 +02:00
Andreas Gruenbacher 89f91db7ae UPSTREAM: iomap: Fix iomap_dio_rw return value for user copies
commit 42c498c18a94eed79896c50871889af52fa0822e upstream

When a user copy fails in one of the helpers of iomap_dio_rw, fail with
-EFAULT instead of returning 0.  This matches what iomap_dio_bio_actor
returns when it gets an -EFAULT from bio_iov_iter_get_pages.  With these
changes, iomap_dio_actor now consistently fails with -EFAULT when a user
page cannot be faulted in.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a00cc46f97)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib80793f127fe9e0a72195802fcb5a865834c05fc
2022-06-10 08:12:03 +02:00
Andreas Gruenbacher 9d16bdb659 UPSTREAM: gfs2: Fix mmap + page fault deadlocks for buffered I/O
commit 00bfe02f479688a67a29019d1228f1470e26f014 upstream

In the .read_iter and .write_iter file operations, we're accessing
user-space memory while holding the inode glock.  There is a possibility
that the memory is mapped to the same file, in which case we'd recurse
on the same glock.

We could detect and work around this simple case of recursive locking,
but more complex scenarios exist that involve multiple glocks,
processes, and cluster nodes, and working around all of those cases
isn't practical or even possible.

Avoid these kinds of problems by disabling page faults while holding the
inode glock.  If a page fault would occur, we either end up with a
partial read or write or with -EFAULT if nothing could be read or
written.  In either case, we know that we're not done with the
operation, so we indicate that we're willing to give up the inode glock
and then we fault in the missing pages.  If that made us lose the inode
glock, we return a partial read or write.  Otherwise, we resume the
operation.

This locking problem was originally reported by Jan Kara.  Linus came up
with the idea of disabling page faults.  Many thanks to Al Viro and
Matthew Wilcox for their feedback.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 81a7fc397a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia00865e0cd79d269d8b6be204a529eb97d0a632e
2022-06-10 08:12:03 +02:00
Andreas Gruenbacher 64ef40ba87 UPSTREAM: gfs2: Eliminate ip->i_gh
commit 1b223f7065bc7d89c4677c27381817cc95b117a8 upstream

Now that gfs2_file_buffered_write is the only remaining user of
ip->i_gh, we can move the glock holder to the stack (or rather, use the
one we already have on the stack); there is no need for keeping the
holder in the inode anymore.

This is slightly complicated by the fact that we're using ip->i_gh for
the statfs inode in gfs2_file_buffered_write as well.  Writing to the
statfs inode isn't very common, so allocate the statfs holder
dynamically when needed.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 38b5849881)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Icf91ad1960e8dec76e009059fd8ead472920971e
2022-06-10 08:12:03 +02:00
Andreas Gruenbacher f0a127f84b UPSTREAM: gfs2: Move the inode glock locking to gfs2_file_buffered_write
commit b924bdab7445946e2ed364a0e6e249d36f1f1158 upstream

So far, for buffered writes, we were taking the inode glock in
gfs2_iomap_begin and dropping it in gfs2_iomap_end with the intention of
not holding the inode glock while iomap_write_actor faults in user
pages.  It turns out that iomap_write_actor is called inside iomap_begin
... iomap_end, so the user pages were still faulted in while holding the
inode glock and the locking code in iomap_begin / iomap_end was
completely pointless.

Move the locking into gfs2_file_buffered_write instead.  We'll take care
of the potential deadlocks due to faulting in user pages while holding a
glock in a subsequent patch.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 8d363d8173)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4ab7278f9255974aa5b4ae0d9dc3157909145fff
2022-06-10 08:12:03 +02:00
Bob Peterson 4e70d7c309 UPSTREAM: gfs2: Introduce flag for glock holder auto-demotion
commit dc732906c2450939c319fec6e258aa89ecb5a632 upstream

This patch introduces a new HIF_MAY_DEMOTE flag and infrastructure that
will allow glocks to be demoted automatically on locking conflicts.
When a locking request comes in that isn't compatible with the locking
state of an active holder and that holder has the HIF_MAY_DEMOTE flag
set, the holder will be demoted before the incoming locking request is
granted.

Note that this mechanism demotes active holders (with the HIF_HOLDER
flag set), while before we were only demoting glocks without any active
holders.  This allows processes to keep hold of locks that may form a
cyclic locking dependency; the core glock logic will then break those
dependencies in case a conflicting locking request occurs.  We'll use
this to avoid giving up the inode glock proactively before faulting in
pages.

Processes that allow a glock holder to be taken away indicate this by
calling gfs2_holder_allow_demote(), which sets the HIF_MAY_DEMOTE flag.
Later, they call gfs2_holder_disallow_demote() to clear the flag again,
and then they check if their holder is still queued: if it is, they are
still holding the glock; if it isn't, they can re-acquire the glock (or
abort).

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 416a705304)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ief7088f69c59f2bbe73867846ee53c0735e514bc
2022-06-10 08:12:03 +02:00
Andreas Gruenbacher d0e98c116d UPSTREAM: gfs2: Clean up function may_grant
commit 6144464937fe1e6135b13a30502a339d549bf093 upstream

Pass the first current glock holder into function may_grant and
deobfuscate the logic there.

While at it, switch from BUG_ON to GLOCK_BUG_ON in may_grant.  To make
that build cleanly, de-constify the may_grant arguments.

We're now using function find_first_holder in do_promote, so move the
function's definition above do_promote.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b25cfbc0e7)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib02a752cdf8da470494fa06782bc92ca3f047a6f
2022-06-10 08:12:03 +02:00
Andreas Gruenbacher 3b46c843f2 UPSTREAM: gfs2: Add wrapper for iomap_file_buffered_write
commit 2eb7509a05443048fb4df60b782de3f03c6c298b upstream

Add a wrapper around iomap_file_buffered_write.  We'll add code for when
the operation needs to be retried here later.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b88b998579)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I144fa4b02e35bb8a1c9ac1f1f0ed149c5cdf91b6
2022-06-10 08:12:03 +02:00
Andreas Gruenbacher 6603584106 UPSTREAM: iov_iter: Introduce fault_in_iov_iter_writeable
commit cdd591fc86e38ad3899196066219fbbd845f3162 upstream

Introduce a new fault_in_iov_iter_writeable helper for safely faulting
in an iterator for writing.  Uses get_user_pages() to fault in the pages
without actually writing to them, which would be destructive.

We'll use fault_in_iov_iter_writeable in gfs2 once we've determined that
the iterator passed to .read_iter isn't in memory.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1d91c912e7)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4c9027acdfe20703b210ca1f49de39d46813fb64
2022-06-10 08:12:03 +02:00
Andreas Gruenbacher e1c331f4ec UPSTREAM: iov_iter: Turn iov_iter_fault_in_readable into fault_in_iov_iter_readable
commit a6294593e8a1290091d0b078d5d33da5e0cd3dfe upstream

Turn iov_iter_fault_in_readable into a function that returns the number
of bytes not faulted in, similar to copy_to_user, instead of returning a
non-zero value when any of the requested pages couldn't be faulted in.
This supports the existing users that require all pages to be faulted in
as well as new users that are happy if any pages can be faulted in.

Rename iov_iter_fault_in_readable to fault_in_iov_iter_readable to make
sure this change doesn't silently break things.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 30e66b1dfc)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idc687713cf0585664c6eae5a075b3b067ba76b5e
2022-06-10 08:12:03 +02:00
Andreas Gruenbacher d9fb814064 UPSTREAM: gup: Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable}
commit bb523b406c849eef8f265a07cd7f320f1f177743 upstream

Turn fault_in_pages_{readable,writeable} into versions that return the
number of bytes not faulted in, similar to copy_to_user, instead of
returning a non-zero value when any of the requested pages couldn't be
faulted in.  This supports the existing users that require all pages to
be faulted in as well as new users that are happy if any pages can be
faulted in.

Rename the functions to fault_in_{readable,writeable} to make sure
this change doesn't silently break things.

Neither of these functions is entirely trivial and it doesn't seem
useful to inline them, so move them to mm/gup.c.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 923f05a660)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If7387298a868e4e72244bd9c123e5ef9cf833629
2022-06-10 08:12:03 +02:00
xiaofeng 4d242c3433 ANDROID: vendor_hooks: tune reclaim swappiness or scan type
Add hooks for reclaim

Bug: 185438290
Change-Id: Ib9eec302b1df4da7e98c77b94541af28c34a8613
Signed-off-by: xiaofeng <xiaofeng5@xiaomi.com>
(cherry picked from commit 35dafe72dd7f7802f941f441f32b9d85efce8803)
2022-06-09 14:40:08 -07:00
Manaf Meethalavalappu Pallikunhi 113b63538c FROMLIST: power_supply: Register cooling device outside of probe
Registering the cooling device from the probe can result in the
execution of get_property() function before it gets initialized.

To avoid this, register the cooling device from a workqueue
instead of registering in the probe.

Signed-off-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>

Bug: 211709650
Link: https://lore.kernel.org/linux-pm/1640162489-7847-1-git-send-email-quic_manafm@quicinc.com/
Change-Id: Id1aa63da9c4e43272c78b50b8b61a92b2d4f617d
Signed-off-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>
2022-06-09 21:37:50 +00:00
Liangliang Li e4e3aadd01 ANDROID: vendor_hooks: Add hooks to tcp/udp send/recv msg functions.
Add hook to tcp/udp to collect network info and do performance tuning.

Bug: 190523684

Change-Id: Id790a381d5ce6c35a747697510f14678ccf3ff2f
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit 81c8161bed77ae0da88c78ff822220ba1a2a7a8a)
2022-06-09 21:32:54 +00:00
Liangliang Li cabca1b98e ANDROID: GKI: Add vendor hook to binder transaction
We want to get binder free space information in the binder
transaction, but this needs to hold the mutex lock. So we add
this restrict hook to do this.

Bug: 205648032
Change-Id: Ie1f377018da686bd62f5ac2d1e5421899741e6d5
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit 2f3f5731de0536a6a1048ae01e129cebec48e664)
2022-06-09 21:27:46 +00:00
Carlos Llamas d1367b5473 ANDROID: binder: fix race in priority restore
During a reply, the target gets woken up and then the priority of the
replier is restored. The order is such to allow the target to process
the reply ASAP. Otherwise, we risk the sender getting scheduled out
before the wakeup happens. This strategy reduces transaction latency.

However, a subsequent transaction from the same target could be started
before the priority of the replier gets restored. At this point we save
the wrong priority and it gets reinstated at the end of the transaction.

This patch allows the incoming transaction to detect the race condition
and save the correct next priority. Additionally, the replier will abort
its pending priority restore which allows the new transaction to always
run at the desired priority.

Bug: 148101660
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I6fec41ae1a1342023f78212ab1f984e26f068221
(cherry picked from commit cac827f2619b280d418e546a09f25da600dafe5a)
[cmllamas: fixed trivial merge conflict]
2022-06-09 21:16:56 +00:00
Carlos Llamas e8fcc17a57 ANDROID: binder: switch task argument for binder_thread
Refactor binder priority functions to take in 'struct binder_thread *'
instead of just 'struct task_struct *'. This allows access to other
thread fields used in subsequent patches. In any case, the same task
reference is still available under thread->task.

There is no functional impact from this patch.

Bug: 148101660
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I67b599884580d957d776500e467827e5035c99f6
(cherry picked from commit 759d98484b5b51932d3d11651fa83c6bb268ce03)
2022-06-09 21:16:56 +00:00
Carlos Llamas 16c04a2732 ANDROID: binder: pass desired priority by reference
Avoid making unnecessary stack copies of struct binder_priority and pass
the argument by reference instead. Rename 'desired_prio' to 'desired' to
match the usage in other priority functions.

There is no functional impact from this patch.

Bug: 148101660
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I66ff5305296e7b9dba56ed265236f2af518f66e0
(cherry picked from commit 52d85f8a16467ce0bca374f885de24918f017371)
2022-06-09 21:16:56 +00:00
Carlos Llamas 7da5987f5d ANDROID: binder: fold common setup of node_prio
The setup of node_prio is always the same, so just fold this logic into
binder_transaction_priority() to avoid duplication. Let's pass the node
reference instead, which also gives access to node->inherit_rt.

There is no functional impact from this patch.

Bug: 148101660
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: Ib390204556e69c4bc8492cd9cd873773f9cdce42
(cherry picked from commit 498bf715b77c68e54d0289fa66e3f112278f87dc)
2022-06-09 21:16:55 +00:00
Liujie Xie 6fbdd5a252 ANDROID: vendor_hooks: Add hooks for account process tick
Add a hook in account_process_tick, which help us to get information
about the high load task and the cpu they running on.

Bug: 183260319
Change-Id: I54162ce3c65bd69e08d2d4747e4d4883efe4c442
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit 63399b4e2e25b0a1522deb724f1de269ac4c8f8b)
2022-06-09 18:57:17 +00:00
xieliujie 0902cc73b7 ANDROID: vendor_hooks: Add hooks for rwsem and mutex
Add hooks to apply oem's optimization of rwsem and mutex

Bug: 182237112
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I6332623732e2d6826b8b61087ca74e55393e0c3d
(cherry picked from commit 80b4341d0520dce2ef1e33aef06c6a2bc8ada518)
2022-06-09 18:25:12 +00:00
Roger Quadros 3e3677f8f1 UPSTREAM: usb: gadget: f_mass_storage: Make CD-ROM emulation work with Mac OS-X
Mac OS-X expects CD-ROM TOC in raw format (i.e. format:2). It also
sends the READ_TOC CDB in old style SFF8020i format. i.e. 2 format bits
are encoded in MSBs of CDB byte 9.

This patch will enable CD-ROM emulation to work with Mac OS-X. Tested on
Mac OS X v10.6.3.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Jack Pham <quic_jackp@quicinc.com>
Link: https://lore.kernel.org/r/20220124160150.19499-1-quic_jackp@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235304500
(cherry picked from commit 89ada0fe669a7abf8777b793b874202a0767a24f)
Change-Id: Ibc4b89260f3ca788edae401d60e1392322e785a0
2022-06-09 17:46:07 +00:00
Chun-Hung Wu e0a580025c ANDROID: Update symbol list for mtk
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 int down_write_killable(rw_semaphore*)'
  [A] 'function int security_file_ioctl(file*, unsigned int, unsigned long int)'

Bug: 228415386
Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
Change-Id: Ib620603544740859e8e82fc5d703bdce463d3811
2022-06-09 15:37:20 +00:00
HongCheol Shim 9a7732c0b2 ANDROID: input: Add vendor hook for __pass_event in evdev.c
Add vendor hook for passing events to client drivers.

We have some limitation to achieve the goal of input performance
without modification of kernel. So I would like you to add vendor
hook and please review the reason why I want to add it.

As the users trigger input actions, we need to support the input
operation and the what the users want to do so that there's no delay.
So we've developed and used "input booster" controling some resources
properly during input operations according to input type.

Android already has the booster in framework to support input actions
however this way has a long latency to control resources.

To reduce latency, we've placed the booster in kernel side for high
responsiveness and it guarantees faster than framework booster.
In addtion, I applied Samsung's own concept to the booster.
And it has been operated stably on all Galaxy models for about 10 years.

So we need
  - add function to notify input events delivered to client in evdev.

Bug: 228927595
Signed-off-by: HongCheol Shim <hongc.shim@samsung.corp-partner.google.com>
Change-Id: Ibe199c148974b6788e02c192f950cb6802745f68
2022-06-09 03:21:26 +00:00
Prasad Sodagudi c555553a40 ANDROID: umh: Enable usermode helper for required use cases
For disabling usermode helper programs config STATIC_USERMODEHELPER_PATH
was set to NULL string. There are few use cases where usermode helper
programs support is needed, such as reboot, poweroff use cases.
So for these supported use cases, dont set the sub_info->path
to null to get usermode helper program support.

Bug: 202192667
Change-Id: I3e4cec94d091b23eda9d2be839cc8f960127575f
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>
2022-06-09 00:42:25 +00:00
Liangliang Li 50a2b178c5 ANDROID: vendor_hooks: Add hooks to dup_task_struct
Add hook to dup_task_struct for vendor data fields initialisation.

Bug: 188004638

Change-Id: I4b58604ee822fb8d1e0cc37bec72e820e7318427
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit f66d96b14aab5051fdf6b5054d87362c17a7b365)
2022-06-09 00:04:53 +00:00
yangshiguang d450a89aa1 ANDROID: GKI: add symbol list file for xiaomi
add abi_gki_aarch64_xiaomi

Leaf changes summary: 47 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 40 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 7 Added variables

40 Added functions:

  [A] 'function int __traceiter_android_rvh_check_preempt_tick(void*, task_struct*, unsigned long int*, bool*, unsigned long int, cfs_rq*, sched_entity*, unsigned int)'
  [A] 'function int __traceiter_android_rvh_dequeue_entity(void*, cfs_rq*, sched_entity*)'
  [A] 'function int __traceiter_android_rvh_enqueue_entity(void*, cfs_rq*, sched_entity*)'
  [A] 'function int __traceiter_android_vh_binder_wait_for_work(void*, bool, binder_thread*, binder_proc*)'
  [A] 'function int __traceiter_android_vh_free_task(void*, task_struct*)'
  [A] 'function int __traceiter_android_vh_map_util_freq(void*, unsigned long int, unsigned long int, unsigned long int, unsigned long int*)'
  [A] 'function void balance_dirty_pages_ratelimited(address_space*)'
  [A] 'function unsigned int blk_ksm_get_slot_idx(blk_ksm_keyslot*)'
  [A] 'function bool blk_ksm_register(blk_keyslot_manager*, request_queue*)'
  [A] 'function void blk_ksm_reprogram_all_keys(blk_keyslot_manager*)'
  [A] 'function void blk_mq_freeze_queue(request_queue*)'
  [A] 'function request_queue* blk_mq_init_queue(blk_mq_tag_set*)'
  [A] 'function void blk_mq_tagset_busy_iter(blk_mq_tag_set*, busy_tag_iter_fn*, void*)'
  [A] 'function void blk_mq_unfreeze_queue(request_queue*)'
  [A] 'function void blk_queue_update_dma_pad(request_queue*, unsigned int)'
  [A] 'function block_device* blkdev_get_by_path(const char*, fmode_t, void*)'
  [A] 'function void bsg_job_done(bsg_job*, int, unsigned int)'
  [A] 'function void bsg_remove_queue(request_queue*)'
  [A] 'function request_queue* bsg_setup_queue(device*, const char*, bsg_job_fn*, bsg_timeout_fn*, int)'
  [A] 'function const char* drm_get_connector_type_name(unsigned int)'
  [A] 'function int gpio_request_array(const gpio*, size_t)'
  [A] 'function void* mempool_alloc_pages(gfp_t, void*)'
  [A] 'function void mempool_free_pages(void*, void*)'
  [A] 'function int mempool_resize(mempool_t*, int)'
  [A] 'function dev_t name_to_dev_t(const char*)'
  [A] 'function void rq_flush_dcache_pages(request*)'
  [A] 'function int scsi_change_queue_depth(scsi_device*, int)'
  [A] 'function scsi_device* scsi_device_lookup(Scsi_Host*, uint, uint, u64)'
  [A] 'function int scsi_dma_map(scsi_cmnd*)'
  [A] 'function Scsi_Host* scsi_host_lookup(unsigned short int)'
  [A] 'function void scsi_print_command(scsi_cmnd*)'
  [A] 'function int ufshcd_alloc_host(device*, ufs_hba**)'
  [A] 'function void ufshcd_dealloc_host(ufs_hba*)'
  [A] 'function void ufshcd_map_desc_id_to_length(ufs_hba*, desc_idn, int*)'
  [A] 'function unsigned long int wait_for_completion_io_timeout(completion*, unsigned long int)'
  [A] 'function void wait_for_device_probe()'
  [A] 'function int wakeup_sources_read_lock()'
  [A] 'function void wakeup_sources_read_unlock(int)'
  [A] 'function wakeup_source* wakeup_sources_walk_next(wakeup_source*)'
  [A] 'function wakeup_source* wakeup_sources_walk_start()'

7 Added variables:

  [A] 'tracepoint __tracepoint_android_rvh_check_preempt_tick'
  [A] 'tracepoint __tracepoint_android_rvh_dequeue_entity'
  [A] 'tracepoint __tracepoint_android_rvh_enqueue_entity'
  [A] 'tracepoint __tracepoint_android_vh_binder_wait_for_work'
  [A] 'tracepoint __tracepoint_android_vh_free_task'
  [A] 'tracepoint __tracepoint_android_vh_map_util_freq'
  [A] 'u64 jiffies_64'

Bug: 234758132
Signed-off-by: yangshiguang <yangshiguang@xiaomi.com>
Change-Id: Iaf7ff7b260fe6cd66b0072fc5af843fbe3e2502b
2022-06-08 14:37:59 -07:00
Jian Gong bfda92e572 ANDROID: ABI: Update symbols to unisoc whitelist for the 7th
Update whitelist for the symbols used by the unisoc device and
update the ABI representation accordingly.

Leaf changes summary: 1 artifact 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, 0 Added variable

1 Added function:

  [A] 'function void nf_ct_destroy(nf_conntrack*)'

Bug: 235311255
Change-Id: Ib963db8ea0159428043b28aa3eaed45fe4e07b16
Signed-off-by: Jian Gong <Jian.Gong@unisoc.com>
Signed-off-by: Giuliano Procida <gprocida@google.com>
2022-06-08 20:15:54 +00:00
kamasali dd4c3a3bc9 ANDROID: GKI: Update abi_gki_aarch64_qcom for pm flag set tracepoint
Add __tracepoint_android_vh_mmc_sdio_pm_flag_set symbol.

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_mmc_sdio_pm_flag_set'

Bug: 231668342
Signed-off-by: Kamasali Satyanarayan <quic_kamasali@quicinc.com>
Change-Id: I396be9250c4d8cb811e6534035870a79772eb5be
2022-06-08 19:35:59 +00:00
kamasali 596dcf7986 ANDROID: vendor_hooks: Add hook in wakeup functionality
Need this verndor hook to support wakeup functionality
for sdio cards.

Bug: 231668342
Change-Id: I1d1a34d6d02f4558edf56eccdd09df57d6232c05
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
Signed-off-by: Kamasali Satyanarayan <quic_kamasali@quicinc.com>
2022-06-08 19:35:41 +00:00
Steve Muckle 388f95c620 ANDROID: gki_defconfig: enable CONFIG_KFENCE_STATIC_KEYS
The default value of this option changed recently in
4f612ed3f748 ("kfence: default to dynamic branch instead of static keys
mode"). As there was no functional change here and no concern posed
about configurations relevant to Android, re-enable this option.

Bug: 234805737
Signed-off-by: Steve Muckle <smuckle@google.com>
Change-Id: I5b20a67225cd247fc54547083b3cbcde0135f1fb
2022-06-08 17:55:22 +00:00
Liangliang Li 53df1b822d ANDROID: vendor_hooks: Add hooks for account irqtime process tick
Add a hook in irqtime_account_process_tick, which helps to get
information about the high load task.

Bug: 187904818

Change-Id: I644f7d66b09d047ca6b0a0fbd2915a6387c8c007
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit fe580539f6cec43ddb0d6ecfd39aa2f4e45754ca)
2022-06-08 02:17:10 +00:00
Vijayanand Jitta 825d9968d9 ANDROID: abi_gki_aarch64_qcom: Update qcom abi symbol list
Update qcom abi symbol list with functions required for
trace_map/unmap and kprobe module.

Leaf changes summary: 7 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 5 Added
functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 2 Added
variables

5 Added functions:

  [A] 'function int __traceiter_map(void*, unsigned long int, phys_addr_t, size_t)'
  [A] 'function int __traceiter_unmap(void*, unsigned long int, size_t, size_t)'
  [A] 'function int synth_event_create(const char*, synth_field_desc*, unsigned int, module*)'
  [A] 'function int synth_event_delete(const char*)'
  [A] 'function trace_event_file* trace_get_event_file(const char*, const char*, const char*)'

2 Added variables:

  [A] 'tracepoint __tracepoint_map'
  [A] 'tracepoint __tracepoint_unmap'

Bug: 233972073
Change-Id: Id10d620b1f7b36d9c67ea5dcc7db9e66bb556836
Signed-off-by: Vijayanand Jitta <quic_vjitta@quicinc.com>
2022-06-07 22:04:55 +00:00
Ram Prakash Gupta 862fbb8517 FROMGIT: mmc: core: Set reset done after hw reset
Set hw reset flag as done after sdcc hw reset else
hw reset as part of recovery happens only once.

md->reset_done flag is set inside mmc_blk_reset function with
flag MMC_BLK_CQE_RECOVERY. And this flag is cleared only
inside function mmc_blk_reset_success. But since mmc_blk_reset
and mmc_blk_reset_success are used with if else condition, code
flow can execute only one of the function, hence if mmc_blk_reset
is executed and not cleared within mmc_blk_reset_success, next
mmc_blk_reset call returns without resetting the hw.

(cherry picked from commit a051246b786af7e4a9d9219cc7038a6e8a411531
https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git devel)
Bug: 235059940
Link: https://lore.kernel.org/linux-mmc/20220531171922.76080-1-adrian.hunter@intel.com/

Change-Id: I14915ae26240769b45cec8d2793e5f8604062eef
Signed-off-by: Ram Prakash Gupta <rampraka@codeaurora.org>
2022-06-07 18:17:34 +00:00
Quentin Perret b9029542be ANDROID: KVM: arm64: Don't update IOMMUs unnecessarily
When handling host stage-2 faults the hypervisor currently updates the
CPU _and_ IOMMUs page-tables. However, since we currently proactively
map accessible PA ranges into IOMMUs, updating them during stage-2
faults is unnecessary -- it only needs to be done during ownership
transitions. Optimize this by skipping the IOMMU updates from the host
memory abort path, which also reduces contention on the host stage-2
lock during boot and saves up to 1.1 sec of boot time on Pixel 6.

Bug: 232879742
Change-Id: I71f439311fe9573005efcc9529a2be53f21993a4
Signed-off-by: Quentin Perret <qperret@google.com>
2022-06-07 13:51:03 +00:00
Bowgo Tsai 39e9847ef0 ANDROID: Creating boot.img for x86_64 GKI
The boot.img will be used for GKI testing.
Also removing BUILD_GKI_CERTIFICATION_TOOLS=1, because
we only need to certify GKI boot-*.img for aarch64.

Bug: 232906147
Test: BUILD_CONFIG=common/build.config.gki.x86_64 build/build.sh
Signed-off-by: Bowgo Tsai <bowgotsai@google.com>
Change-Id: Ia6790dc9faddce7c616411d7ec5c1f60a12aea44
(cherry picked from commit a80c9ffa86c5919c10a73b47c4fe218d72a5838b)
2022-06-07 10:27:57 +00:00
Mayank Rana 3071eda198 ANDROID: abi_gki_aarch64_qcom: Update symbol list with usb_role_string
Add below kernel symbol for vendor modules to qcom symbol list.
usb_role_string

Bug: 235128488
Change-Id: I05b349796a68028099f9d25ed718e8982a33c510
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
2022-06-06 21:20:15 +00:00
Prasad Sodagudi 1ac270abbd ANDROID: gki_defconfig: Enable RCU_BOOST config
Config helps to boost the priority of preempted RCU readers that
block the current preemptible RCU grace period for too long.
Enable CONFIG_RCU_BOOST for both arm64 and x86 architectures
in android13-5.15 kernel.

Bug: 234812192
Change-Id: I97225856dc696382cc78dd1520632d47da3f5f76
Signed-off-by: Prasad Sodagudi <quic_psodagud@quicinc.com>
2022-06-06 11:47:36 -07:00
Manaf Meethalavalappu Pallikunhi af6c1477c3 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 <quic_manafm@quicinc.com>
Change-Id: I38e56b2cf9b5bc78ac7ebefe2861d7a8932c09b2
2022-06-06 18:27:40 +00:00
Manaf Meethalavalappu Pallikunhi f6e47fd00f 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 <quic_manafm@quicinc.com>
2022-06-06 18:26:47 +00:00
Wesley Cheng 2baf6bfef4 UPSTREAM: usb: gadget: f_mass_storage: Disable eps during disconnect
When receiving a disconnect event from the UDC, the mass storage
function driver currently runs the handle_exception() routine
asynchronously.  For UDCs that support runtime PM, there is a
possibility the UDC is already suspended by the time the
do_set_interface() is executed.  This can lead to HW register access
while the UDC is already suspended.

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>

Bug: 204343836
(cherry picked from commit 9fff139aeb11186fd8e75860c959c86cb43ab2f6)
Change-Id: I6c8011baddf02d6b0eadb5934416bc24b8a93f4a
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
(cherry picked from commit 8c9d9d8e44aa69102ed589e66a55e6ef93b834ef)
2022-06-06 17:57:11 +00:00
Maulik Shah c1993b4cbc ANDROID: Update symbols list and ABI for qcom
Whitelist pm_suspend_target_state and pm_suspend_global_flags.
Update ABI representation accordingly.

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] 'suspend_state_t pm_suspend_target_state'

Bug: 234543638
Change-Id: I597a230326572c68fbf60370f39e29f551cf15a7
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
2022-06-06 14:15:27 +00:00
James_Lin 03b512f716 UPSTREAM: media: uvcvideo: Add UVC_GUID_FORMAT_H265
This patch aims to add UVC_GUID_FORMAT_H265
High Efficiency Video Coding (HEVC), also known as H.265 and MPEG-H Part 2.
They describe the same video encoding method.
So for handling their behavior is the same.
However, when external camera device describes this encoding method,
some use hevc, some use h265.
There is no uniform specification to describe this encoding method.
So if an external camera device use h265 to describe this encoding method,
driver will not recognize it.
Therefore, this patch is to enable driver to read HEVC/H265
and convert it to V4L2_PIX_FMT_HEVC.

Signed-off-by: James_Lin <Ping-lei.Lin@mediatek.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

Bug: 235045181
(cherry picked from commit be938c70e292731f81226917fc214683e66da577)
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Change-Id: Ib9a78c2aa900abdd37b08351d56a3815b55ec7f4
2022-06-06 10:15:13 +00:00
Liujie Xie d1b6bd094b ANDROID: vendor_hooks: Add hook in shrink_node_memcgs
Add vendor hook in shrink_node_memcgs to adjust whether
to skip memory reclamation of memcg.

Bug: 226482420
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I925856353e63c5a821027de4f8476c833e21b982
2022-06-03 19:57:21 +00:00
Wesley Cheng 120823bf95 UPSTREAM: usb: dwc3: gadget: Change to dev_dbg() when queuing to inactive gadget/ep
Since function drivers will still be active until dwc3_disconnect_gadget()
is called, some applications will continue to queue packets to DWC3
gadget.  This can lead to a flood of messages regarding failed ep queue,
as the endpoint is in the process of being disabled.  Change the log
level to debug, so that it can be enabled when debugging issues.

Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
Link: https://lore.kernel.org/r/20211018192647.32121-1-wcheng@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit b851f7c7b8fd5365e447bb60e1e18eb6de628507)
Bug: 203763122
Change-Id: I5120890fa12f707ae54da551db9aab02dded0063
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
2022-06-03 16:21:56 +00:00
Yunxian He 7bfb6542ae ANDROID: Add several symbol lists for unisoc
Leaf changes summary: 6 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, 0 Added variable

6 Added functions:

  [A] 'function int phy_pm_runtime_get_sync(phy*)'
  [A] 'function int phy_pm_runtime_put_sync(phy*)'
  [A] 'function int usb_add_gadget(usb_gadget*)'
  [A] 'function void usb_del_gadget(usb_gadget*)'
  [A] 'function usb_ssp_rate usb_get_maximum_ssp_rate(device*)'
  [A] 'function void usb_initialize_gadget(device*, usb_gadget*, void (device*)*)'

Bug: 234533625
Change-Id: Ide5cdd80eb8aae4f80dd3f2e3560416082eec174
Signed-off-by: Yunxian He <yunxian.he@unisoc.com>
2022-06-03 14:01:13 +00:00
Bart Van Assche 78d6de7863 ANDROID: Fix the CONFIG_ANDROID_VENDOR_OEM_DATA=n build
Scripts like
https://github.com/bvanassche/build-scsi-drivers/blob/main/build-scsi-drivers
do not set CONFIG_ANDROID_VENDOR_OEM_DATA. Hence this patch that
unbreaks the CONFIG_ANDROID_VENDOR_OEM_DATA=n build.

Fixes: 291dfda577 ("ANDROID: init_task: Init android vendor and oem data")
Signed-off-by: Bart Van Assche <bvanassche@google.com>
Change-Id: Ic8223e69495fce7e2d0531313856ea5ed21659b7
2022-06-02 16:42:57 -07:00
Venkata Rao Kakani 45a91f3011 ANDROID: abi_gki_aarch64_qcom: Add kobject_get
Add kobject_get to android/abi_gki_aarch64_qcom required by QCOM driver
to create fille in /sys/kernel directory.

Bug: 234545455
Change-Id: I5bd314ee93087c2db9b1c21000506f93d66aadf0
Signed-off-by: Venkata Rao Kakani <quic_vkakani@quicinc.com>
2022-06-02 15:51:11 -07:00