Commit Graph

1058051 Commits

Author SHA1 Message Date
Yunfei Wang
293ec0920f FROMLIST: iommu/io-pgtable-arm-v7s: Add a quirk to allow pgtable PA up to 35bit
Single memory zone feature will remove ZONE_DMA32 and ZONE_DMA and
cause pgtable PA size larger than 32bit.

Since Mediatek IOMMU hardware support at most 35bit PA in pgtable,
so add a quirk to allow the PA of pgtables support up to bit35.

Signed-off-by: Ning Li <ning.li@mediatek.com>
Link: https://lore.kernel.org/linux-mediatek/20220616120713.12728-2-yf.wang@mediatek.com/
Bug: 235767992
Signed-off-by: Yunfei Wang <yf.wang@mediatek.com>
Change-Id: I5dd226507bfbbbe85cb00aa27d03cd3592740055
2022-07-19 12:47:26 +00:00
Zhuguangqing
58e3f869fc ANDROID: Add vendor hooks to signal.
Add vendor hook to get signal for vendor-specific tuning.

Conflicts:
    drivers/android/vendor_hooks.c

Bug: 184898838

Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: I83a28b0a6eb413976f4c57f2314d008ad792fa0d
(cherry picked from commit d623f1ff72)
2022-07-19 12:47:26 +00:00
Liujie Xie
77064627fb ANDROID: ashmem: Export is_ashmem_file
Export is_ashmem_file function which will be used
by the minidump module to get ashmem info.

Bug: 193397560
Change-Id: I5b7816ad4775e5cf2c4f41c28b1c8dacc2c85b7e
Signed-off-by: liuhailong <liuhailong@oppo.com>
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit 7bcfde2601)
2022-07-19 12:47:26 +00:00
wudean
842c68a977 ANDROID: vendor_hooks: bypass shrink slab
Add hooks for bypass shrink slab.

Bug: 185951972
(cherry picked from commit 396a6adfd3)

Change-Id: I343e02ae5cd6d076d525d0e4bfc09ecdfeda1d7b
Signed-off-by: wudean <dean.wu@vivo.com>
2022-07-19 12:47:26 +00:00
Mukesh Ojha
89911c32cf FROMLIST: devcoredump : Serialize devcd_del work
In following scenario(diagram), when one thread X running dev_coredumpm()
adds devcd device to the framework which sends uevent notification to
userspace and another thread Y reads this uevent and call to
devcd_data_write() which eventually try to delete the queued timer that
is not initialized/queued yet.

So, debug object reports some warning and in the meantime, timer is
initialized and queued from X path. and from Y path, it gets reinitialized
again and timer->entry.pprev=NULL and try_to_grab_pending() stucks.

To fix this, introduce mutex and a boolean flag to serialize the behaviour.

 	cpu0(X)			                cpu1(Y)

    dev_coredump() uevent sent to user space
    device_add()  ======================> user space process Y reads the
                                          uevents writes to devcd fd
                                          which results into writes to

                                         devcd_data_write()
                                           mod_delayed_work()
                                             try_to_grab_pending()
                                               del_timer()
                                                 debug_assert_init()
   INIT_DELAYED_WORK()
   schedule_delayed_work()
                                                   debug_object_fixup()
                                                     timer_fixup_assert_init()
                                                       timer_setup()
                                                         do_init_timer()
                                                       /*
                                                        Above call reinitializes
                                                        the timer to
                                                        timer->entry.pprev=NULL
                                                        and this will be checked
                                                        later in timer_pending() call.
                                                       */
                                                 timer_pending()
                                                  !hlist_unhashed_lockless(&timer->entry)
                                                    !h->pprev
                                                /*
                                                  del_timer() checks h->pprev and finds
                                                  it to be NULL due to which
                                                  try_to_grab_pending() stucks.
                                                */
Bug: 235577024
Change-Id: I5e86abf72e8dff6952ba493fd9f43a26b2b40352
Link: https://lore.kernel.org/lkml/2e1f81e2-428c-f11f-ce92-eb11048cb271@quicinc.com/
Link: https://lore.kernel.org/lkml/1653660220-19197-1-git-send-email-quic_mojha@quicinc.com/
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
2022-07-19 12:47:26 +00:00
d wang
104c11e9af ANDROID: ABI: Update symbols used by the unisoc filesystem whitelist for
the 1st

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 blk_stat_enable_accounting(request_queue*)'

Bug: 236086883
Change-Id: I4569707b8548c97ef65f11938e29e53f860faa45
Signed-off-by: d wang <dongwei.wang@unisoc.com>
2022-07-19 12:47:26 +00:00
Patrick Daly
63d1aaef59 FROMLIST: of: of_reserved_mem: Increase limit for reserved_mem regions
The reserved_mem array must be statically allocated because it is used
prior to memblock being aware of all "no-map" or otherwise reserved
regions which have fixed physical addresses. Due to this limitation,
if one architecture/board has a large number of reserved_mem regions,
this limit must be raised for all.

In particular, certain new qcom boards currently have 63 reserved memory
regions, which when new features are added, pushes them over the existing
limit of 64.

A generalized breakdown by region type:
13 for linux-loaded device firmware
9 for guest-vms or inter-vm communication
15 cma heaps/dma-buf heaps
24 for bootloaders/hypervisor/secure-world devices or software
2 misc

Although this number could be reduced by a minor amount by combining
physically adjacent regions, this comes at the cost of losing
documention on what/who the regions are used by. In addition, combining
adjacent regions is not possible if there are phandles in devicetree
refering to the regions in question, such as "memory-region".

Vmlinux size before:
text      data      bss     dec       hex      filename
31030829  15807732  588524  47427085  2d3ae0d  dist/vmlinux

text      data      bss     dec       hex      filename
31030877  15807668  592108  47430653  2d3bbfd  dist/vmlinux

Bug: 229767760
Link: https://lore.kernel.org/linux-devicetree/1650488954-26662-1-git-send-email-quic_pdaly@quicinc.com/T/#u
Change-Id: I2bdc6ad1ecfe273aad3c72390283b6d1247b18c3
Signed-off-by: Patrick Daly <quic_pdaly@quicinc.com>
Signed-off-by: Sukadev Bhattiprolu <quic_sukadev@quicinc.com>
2022-07-19 12:47:25 +00:00
xieliujie
ad2d36f06f ANDROID: vendor_hooks: Add hook for binder
Add hook to support oem's performance feature.

Bug: 186482511

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: Ib495e80e569cc293eaa98d87a050aee8915eb415
(cherry picked from commit 2337b9185a)
2022-07-19 03:54:51 +00:00
Chetan C R
e6e44e9a85 ANDROID: GKI: Update abi_gki_aarch64_qcom for devm_of_clk_del_provider
Add devm_of_clk_del_provider symbol.

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 devm_of_clk_del_provider(device*)'

Bug: 235919751
Change-Id: I14494bf4cab4bbf70eb76d751cdb201f4c4ed65e
Signed-off-by: Chetan C R <quic_cchinnad@quicinc.com>
2022-07-19 03:54:51 +00:00
Greg Kroah-Hartman
3cf5c7059d Revert "ANDROID: umh: Enable usermode helper for required use cases"
This reverts commit c555553a40d6795e0c5d18b8ee94ac516a0aef09.

Reason for revert: The binaries, and /sbin/ is not even present on Android systems.  This patch was never tested :(

Bug: 202192667
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia1c35eba4a89a62ba678d8004742563372d3d920
2022-07-19 03:54:51 +00:00
Eric Biggers
4881c12c76 ANDROID: GKI: update module list for fips140 build
This fixes the following build error:

    ERROR: modules list out of date
    Update it with:
    cp [...]/out/android13-5.15/common/modules.order common/android/gki_aarch64_fips140_modules

Bug: 188620248
Change-Id: I5e06053001a3ea3cf488e9ad0af8f6e4af2de0a2
Signed-off-by: Eric Biggers <ebiggers@google.com>
2022-07-19 03:54:51 +00:00
Liangcai Fan
bf46e6f5db BACKPORT: mm: khugepaged: recalculate min_free_kbytes after stopping khugepaged
When initializing transparent huge pages, min_free_kbytes would be
calculated according to what khugepaged expected.

So when transparent huge pages get disabled, min_free_kbytes should be
recalculated instead of the higher value set by khugepaged.

Link: https://lkml.kernel.org/r/1633937809-16558-1-git-send-email-liangcaifan19@gmail.com
Signed-off-by: Liangcai Fan <liangcaifan19@gmail.com>
Signed-off-by: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

(cherry picked from commit bd3400ea17)

Bug: 235523176
Signed-off-by: Chinwen Chang <chinwen.chang@mediatek.com>
Change-Id: I815893d25186847933db2a0872528fb15a00b3c8
2022-07-19 03:54:51 +00:00
Naina Mehta
62bb81afc5 ANDROID: fault: Add vendor hook for TLB conflict
Add android_vh_handle_tlb_conf vendor hook to gracefully
handle TLB conflict.

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

Bug: 222637802
Change-Id: I3d6814cd950e77e1a15ce444764078692724cd0a
Signed-off-by: Naina Mehta <quic_nainmeht@quicinc.com>
Signed-off-by: Vamsi Krishna Lanka <quic_vamslank@quicinc.com>
2022-07-19 03:54:50 +00:00
Bart Van Assche
4e2d8ca450 BACKPORT: FROMLIST: block/bfq: Enable I/O statistics
BFQ uses io_start_time_ns. That member variable is only set if I/O
statistics are enabled. Hence this patch that enables I/O statistics
at the time BFQ is associated with a request queue.

Compile-tested only.

Reported-by: Cixi Geng <cixi.geng1@unisoc.com>
Cc: Cixi Geng <cixi.geng1@unisoc.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Yu Kuai <yukuai3@huawei.com>
Cc: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
[ bvanassche: Left out the blk_stat_disable_accounting() call since ]
[ commit 68497092bd ("block: make queue stat accounting a         ]
[ reference") from kernel v5.17 has not been backported to the      ]
[ android13-5.15 branch.                                            ]
Bug: 235453574
Link: https://lore.kernel.org/linux-block/20220613163234.3593026-1-bvanassche@acm.org/T/#u
Change-Id: I5fad0fb3c7e9c6007aadd94ebb73d91c41143549
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2022-07-19 03:54:50 +00:00
Ray Chi
3a6c1e3359 ANDROID: usb: dwc3: export tracepoint for dwc3 read/write
There are two tracepoints in dwc3_readl() and dwc3_writel().
This patch will export the tracepoints so that vendor modules
can use them.

Bug: 184920962
Signed-off-by: Ray Chi <raychi@google.com>
Change-Id: I1170d853be1fa1c47afbba133567b1996418d8e8
2022-07-19 03:54:50 +00:00
Oh Eomji
8906b02221 ANDROID: usb: add EXPORT_TRACE_SYMBOL to export tracepoint
To use the tracepoint in kernel module, add EXPORT_TRACE_SYMBOL_GPL to
export the dwc3_ep_queue tracepoint.

Bug: 181736013
Change-Id: I211e747e10d232342cbaf877d7ad670c60e3ad0f
Signed-off-by: Oh Eomji <eomji.oh@samsung.com>
2022-07-19 03:54:50 +00:00
Mayank Rana
4d399cb1d3 UPSTREAM: usb: dwc3: core: Add error log when core soft reset failed
DWC3 controller soft reset is important operation for USB functionality.
In case when it fails, currently there is no failure log. Hence add
error log when core soft reset failed.

Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 235863377
(cherry picked from commit 859bdc3595)
Change-Id: I60500f66af47d93cf9d60bdecab32e6dc48d4b7c
Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
2022-07-19 03:54:50 +00:00
Chao Yu
99caff3b22 ANDROID: GKI: Update symbols to abi_gki_aarch64_oplus
Leaf changes summary: 12 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 12 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

12 Added functions:

  [A] 'function int __bio_crypt_clone(bio*, bio*, gfp_t)'
  [A] 'function int __blkdev_issue_discard(block_device*, sector_t, sector_t, gfp_t, int, bio**)'
  [A] 'function unsigned long int __page_file_index(page*)'
  [A] 'function void address_space_init_once(address_space*)'
  [A] 'function void bio_crypt_set_ctx(bio*, const blk_crypto_key*, const u64*, gfp_t)'
  [A] 'function int blkdev_issue_flush(block_device*)'
  [A] 'function long int congestion_wait(int, long int)'
  [A] 'function void migrate_page_copy(page*, page*)'
  [A] 'function bool prepare_to_wait_exclusive(wait_queue_head*, wait_queue_entry*, int)'
  [A] 'function void* radix_tree_delete_item(xarray*, unsigned long int, void*)'
  [A] 'function void** radix_tree_lookup_slot(const xarray*, unsigned long int)'
  [A] 'function void radix_tree_replace_slot(xarray*, void**, void*)'

Bug: 232178651

Signed-off-by: Chao Yu <chao@kernel.org>
Change-Id: Ie3aa930a0d446f4f9cb0023bd59e92cdbce92c2b
2022-07-19 03:54:50 +00:00
zhang chuang
3c5df4a52e ANDROID: Add hook to show vendor info for transactions
When watchdog or anr occur, we need to read
dev/binderfs/binder_logs/proc/pid or dev/binderfs/binder_logs/state
node to know the time-consuming information of the binder call.
We need to add the time-consuming information of binder transaction.

Bug: 190413570

Signed-off-by: zhang chuang <zhangchuang3@xiaomi.com>
Change-Id: I0423d4e821d5cd725a848584133dc7245cbc233a
(cherry picked from commit eabe9707f2)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[cmllamas: fix trivial merge conflict in vendor_hooks.c]
2022-07-19 03:54:50 +00:00
kamasali
401ae69f82 ANDROID: GKI: Update abi_gki_aarch64_qcom for partial init tracepoint
Add __tracepoint_android_rvh_partial_init symbol
Add __tracepoint_android_rvh_cache_card_csd symbol

Leaf changes summary: 2 artifacts 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, 2 Added variables

2 Added variables:

  [A] 'tracepoint __tracepoint_android_rvh_mmc_cache_card_properties'
  [A] 'tracepoint __tracepoint_android_rvh_partial_init'

Bug: 231654364

Signed-off-by: kamasali <quic_kamasali@quicinc.com>
Change-Id: I1e52438ebac1afe649c1cdf194eb3befba2b7987
2022-07-19 03:54:50 +00:00
kamasali
10bac17ee9 ANDROID: vendor_hooks: Add hook for partial_init
Need this vendor hook to support patial init functionality. This hook needs to be restricted as the additional vendor handling need to perform operations (such as wait_for_completion) in non-atomic context.
One of the main functionality of Partial init feature is to reduce latency during resume.

Bug: 231654364
Link: https://lore.kernel.org/lkml/ea318551ec0b43429ce47bfac9ebf285@quicinc.com/#r

Change-Id: Ia1cb0b7173db3318d2d6686f4bd4719f3cfefd8b
Signed-off-by: kamasali <quic_kamasali@quicinc.com>
2022-07-19 03:54:45 +00:00
Dezhi Huang
0f656fd2a1 ANDROID: mutex: Add vendor hook to init mutex oem data.
Add hooks to init oem data of mutex.

Bug: 231527236
Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com>
Change-Id: Id0aeac168e81bd3d88051657c32ba709c329dbdd
2022-07-19 03:52:57 +00:00
CC Chou
b57c3d8b54 FROMLIST: scsi: ufs-mediatek: Introduce workaround for power mode change
Some MediaTek SoC chips need special flow for power mode change,
especially for chips supporting HS-G5.

Enable the workaround by setting the host-specific capability.

Bug: 235550312
Link: https://lore.kernel.org/linux-scsi/20220609085751.25305-4-stanley.chu@mediatek.com/
Change-Id: I7da0d429f97f89f1c3b08c683102608e720365a9
Signed-off-by: CC Chou <cc.chou@mediatek.com>
Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
Signed-off-by: Dennis Yu <tun-yu.yu@mediatek.com>
Signed-off-by: Peter Wang <peter.want@medaitek.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
2022-07-19 03:52:56 +00:00
Stanley Chu
7d1e95a4ac FROMLIST: scsi: ufs: Fix ADAPT logic for HS-G5
ADAPT now is added not only for HS Gear4 mode but also higher gears.
Fix the logic for higher gears.

Bug: 235550312
Link: https://lore.kernel.org/linux-scsi/20220609085751.25305-3-stanley.chu@mediatek.com/
Change-Id: Ib832610d34e5facf53698337e4ed610a92c772b5
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
2022-07-19 03:52:56 +00:00
Stanley Chu
f18e88a018 FROMLIST: scsi: ufs: Export ufshcd_uic_change_pwr_mode()
Export ufshcd_uic_change_pwr_mode() to allow vendors to
use it for SoC-specific power mode change design limitation.

Bug: 235550312
Link: https://lore.kernel.org/linux-scsi/20220609085751.25305-2-stanley.chu@mediatek.com/
Change-Id: I43a31489ec727199a0e40cfc99202fdfd0a16214
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
2022-07-19 03:52:56 +00:00
Jing-Ting Wu
17b8066964 ANDROID: Update symbol list for mtk
Leaf changes summary: 4 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, 0 Added variable

4 Added functions:

  [A] 'function int __traceiter_android_rvh_get_nohz_timer_target(void*, int*, bool*)'
  [A] 'function int __traceiter_android_rvh_rto_next_cpu(void*, int, cpumask*, int*)'
  [A] 'function int __traceiter_android_rvh_set_cpus_allowed_ptr_locked(void*, const cpumask*, const cpumask*, unsigned int*)'
  [A] 'function int cpumask_any_distribute(const cpumask*)'

Bug: 235429072

Change-Id: Ia6384daf4dff842f4673796b8323412bf0384a3a
Signed-off-by: Jing-Ting Wu <Jing-Ting.Wu@mediatek.com>
2022-07-19 03:52:56 +00:00
Li Jun
dd202bf18a BACKPORT: FROMGIT: usb: dwc3: add power down scale setting
Some SoC(e.g NXP imx8MQ) may have a wrong default power down scale
setting so need init it to be the correct value, the power down
scale setting description in DWC3 databook:

Power Down Scale (PwrDnScale)
The USB3 suspend_clk input replaces pipe3_rx_pclk as a clock source to
a small part of the USB3 core that operates when the SS PHY is in its
lowest power (P3) state, and therefore does not provide a clock.
The Power Down Scale field specifies how many suspend_clk periods fit
into a 16 kHz clock period. When performing the division, round up the
remainder.
For example, when using an 8-bit/16-bit/32-bit PHY and 25-MHz Suspend
clock,
Power Down Scale = 25000 kHz/16 kHz = 13'd1563 (rounder up)

So use the suspend clock rate to calculate it.

Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Link: https://lore.kernel.org/r/1654568404-3461-1-git-send-email-jun.li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 234219431
(cherry picked from commit 3497b9a5c8
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing)
[jindong: rebase to v5.15, get "suspend" clk from of to replace nonexistent dwc->susp_clk]
Change-Id: I0ce2c8041810d4add84b628fc8c3964063aacd5c
Signed-off-by: Jindong Yue <jindong.yue@nxp.com>
2022-07-19 03:52:56 +00:00
Manaf Meethalavalappu Pallikunhi
2d80f682ca 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-07-19 03:52:56 +00:00
Liangliang Li
47fc7fad0e 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 81c8161bed)
2022-07-19 03:52:56 +00:00
Liangliang Li
9a7758d97f 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 2f3f5731de)
2022-07-19 03:52:56 +00:00
Carlos Llamas
f21743ac08 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 cac827f261)
[cmllamas: fixed trivial merge conflict]
2022-07-19 03:52:55 +00:00
Carlos Llamas
748c28bb08 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 759d98484b)
2022-07-19 03:52:55 +00:00
Carlos Llamas
feedc1fbb0 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 52d85f8a16)
2022-07-19 03:52:55 +00:00
Carlos Llamas
11a03007fd 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 498bf715b7)
2022-07-19 03:52:55 +00:00
Liujie Xie
78ac5ea5e3 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 63399b4e2e)
2022-07-19 03:52:55 +00:00
xieliujie
e1960b400c 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 80b4341d05)
2022-07-19 03:52:55 +00:00
Roger Quadros
2a2e84e7b1 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 89ada0fe66)
Change-Id: Ibc4b89260f3ca788edae401d60e1392322e785a0
2022-07-19 03:52:55 +00:00
Chun-Hung Wu
240ff1c932 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-07-19 03:52:54 +00:00
HongCheol Shim
d11cf42a71 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-07-19 03:52:54 +00:00
Prasad Sodagudi
52344a6c37 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-07-19 03:52:54 +00:00
Liangliang Li
bafafe0ec4 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 f66d96b14a)
2022-07-19 03:52:54 +00:00
Jian Gong
6471cc9d48 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-07-19 03:52:54 +00:00
kamasali
d90f0f3fda 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-07-19 03:52:54 +00:00
kamasali
07bd537bb0 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-07-19 03:52:54 +00:00
Steve Muckle
4cc4ec94ff ANDROID: gki_defconfig: enable CONFIG_KFENCE_STATIC_KEYS
The default value of this option changed recently in
4f612ed3f7 ("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-07-19 03:52:54 +00:00
Liangliang Li
bf3b384e08 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 fe580539f6)
2022-07-19 03:52:53 +00:00
Vijayanand Jitta
c6b0ae2853 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-07-19 03:52:53 +00:00
Quentin Perret
dbd1cb3025 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-07-19 03:52:53 +00:00
Bowgo Tsai
49e5b2589b 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 a80c9ffa86)
2022-07-19 03:52:53 +00:00
Mayank Rana
e74c1f2474 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-07-19 03:52:53 +00:00