Commit Graph

313 Commits

Author SHA1 Message Date
deyaoren@google.com
496970e9f8 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15-2023-03: (106 commits)
  UPSTREAM: Partially revert "perf/arm-cmn: Optimise DTC counter accesses"
  UPSTREAM: usb: dwc3: gadget: Ignore End Transfer delay on teardown
  UPSTREAM: elfcore: Add a cprm parameter to elf_core_extra_{phdrs,data_size}
  UPSTREAM: arm64: mte: Fix double-freeing of the temporary tag storage during coredump
  UPSTREAM: wifi: nl80211: Add checks for nla_nest_start() in nl80211_send_iface()
  UPSTREAM: mm/page_exit: fix kernel doc warning in page_ext_put()
  UPSTREAM: f2fs: fix gc mode when gc_urgent_high_remaining is 1
  BACKPORT: mm: multi-gen LRU: move lru_gen_add_mm() out of IRQ-off region
  UPSTREAM: KVM: arm64: Use correct accessor to parse stage-1 PTEs
  UPSTREAM: wifi: fix multi-link element subelement iteration
  UPSTREAM: perf/arm-cmn: Add more bits to child node address offset field
  UPSTREAM: perf/arm-cmn: Update watchpoint format
  UPSTREAM: perf/arm-cmn: Hide XP PUB events for CMN-600
  BACKPORT: wifi: cfg80211: move puncturing bitmap validation from mac80211
  UPSTREAM: wifi: nl80211: add MLO_LINK_ID to CMD_STOP_AP event
  BACKPORT: cfg80211: Update Transition Disable policy during port authorization
  ANDROID: ABI: Update db845c symbol list on ufshcd
  ANDROID: usb: gadget: f_accessory: update to usb_gstrings_attach
  UPSTREAM: usb: gadget: composite: Draw 100mA current if not configured
  UPSTREAM: usb: dwc3: gadget: Change condition for processing suspend event
  ...

Change-Id: I34ed8155a6bc7948380fc5f2b6f139f9708b3d9f
2023-03-29 17:35:36 +00:00
Di Shen
683fe954dc ANDROID: thermal: Add a vendor hook for thermal throttle update
Commit 602c233f65 added a conditional for
ops->get_trip_temp(). In the original code,
ops->get_trip_temp() is called unconditionally. So delete
the conditional to fix it. At the same time, modify the
comment of enable. Actually, IPA is always enable, but
sometimes it needs to be disabled for a while. Making
'enable' true or false, IPA can be enabled or disabled by
user requirement.

When the 'override' turns to false from true and current
temperature is below the switch_on_temp(means 'update' is
false), the cooling device state has not changed, also
the power could not be updated to the maximum power. So
add a vendor hook to renew the 'update' value, so that the
cooling device can be updated.

Fixes: 602c233f65 ("ANDROID: thermal: Add a flag for vendor hook enable_thermal_power_throttle")
Bug: 271370056
Signed-off-by: Di Shen <di.shen@unisoc.com>
Change-Id: I43191926f8da9016fe76d7cb78639b1cbd89c53e
2023-03-08 10:13:08 +08:00
Liujie Xie
05b5ff11ad ANDROID: vendor_hooks: Add hooks for mutex and rwsem optimistic spin
These hooks help us do the following things:
a) Record the number of mutex and rwsem optimistic spin.
b) Monitor the time of mutex and rwsem optimistic spin.
c) Make it possible if oems don't want mutex and rwsem to optimistic spin
for a long time.

Bug: 267565260
Change-Id: I2bee30fb17946be85e026213b481aeaeaee2459f
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit d01f7e1269d2651768a0bd91a88f76339a1cb427)
2023-03-06 10:58:22 +08:00
Greg Kroah-Hartman
fda78dabca Revert "ANDROID: GKI: Add vendor hook to binder transaction"
This reverts commit cabca1b98e.

The hook android_rvh_binder_transaction 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: 205648032
Bug: 203756332
Cc: Liangliang Li <liliangliang@vivo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I46394ebf00b7aa882f6df37ee3eec5cdc0263579
2023-02-18 15:20:16 +00:00
Georgi Djakov
5a6502af11 ANDROID: psi: Add vendor hooks for PSI tracing
Add hooks to capture various per-zone memory stats when
a trigger threshold is hit.

Bug: 268290366
Change-Id: Ibe39263ddb05ffc3fa63b5225497a90c6480c8d7
Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
2023-02-17 16:40:43 +00:00
deyaoren@google.com
829dc7e875 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15-2023-01: (95 commits)
  ANDROID: GKI: update xiaomi symbol list
  ANDROID: loop: Add vendor hook to update cmd
  ANDROID: GKI: Update abi_gki_aarch64_qcom
  ANDROID: direct_io: Add a vendor hook to update OEM-specific field of struct bio
  ANDROID: GKI: update xiaomi symbol list
  ANDROID: GKI: Update abi_gki_aarch64_qcom symbols.
  ANDROID: GKI: Update abi_gki_aarch64_qcom
  ANDROID: uid_sys_stats: defer process_notifier work if uid_lock is contended
  FROMGIT: bpf: btf: limit logging of ignored BTF mismatches
  UPSTREAM: skbuff: Account for tail adjustment during pull operations
  ANDROID: Update the ABI symbol list and xml
  ANDROID: mm: Export find_vm_area
  ANDROID: GKI: update xiaomi symbol list
  ANDROID: vendor_hooks:vendor hook for control memory dirty rate
  FROMGIT: mm/cma.c: delete kmemleak objects when freeing CMA areas to buddy at boot
  BACKPORT: FROMGIT: mm/cma.c: make kmemleak aware of all CMA regions
  UPSTREAM: mm: kmemleak: alloc gray object for reserved region with direct map
  UPSTREAM: usb: dwc3: gadget: Don't delay End Transfer on delayed_status
  UPSTREAM: usb: dwc3: gadget: Do not clear ep delayed stop flag during ep disable
  UPSTREAM: usb: dwc3: gadget: Skip waiting for CMDACT cleared during endxfer
  ...

Change-Id: I06fdfe157835609df1a7f8a6d8bf8b82a6e774d4
2023-02-02 20:57:22 +00:00
keystone-kernel-automerger
1239070fb7 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15-2022-12:
  ANDROID: GKI: Update abi_gki_aarch64_qcom
  ANDROID: Update the GKI symbol list and ABI XML
  ANDROID: irqchip/irq-gic-v3: Add vendor hook for gic suspend
  ANDROID: abi_gki_aarch64_qcom: Add secure hibernation APIs
  ANDROID: vendor hooks: Encrypt snapshot for bootloader based hibernation
  ANDROID: vendor hooks: Export symbols for bootloader based hibernation

Change-Id: I22ece403ea8821a1ed9949d1f7c559dc0e71a690
Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
2023-01-17 22:39:22 +00:00
lijiaming
8501db9cda ANDROID: loop: Add vendor hook to update cmd
According to the value of OEM-specific field of struct bio, we need
to update the value of "iocb->ki_flags" or "iocb->ki_ioprio", so that
we can distinguish different IO's in lower level drivers and take
different measures.

Bug: 265611433
Change-Id: Id8ea3c3d064967b7a79fe24c48bf58d92c5d6e41
Signed-off-by: lijiaming <lijiaming3@xiaomi.com>
2023-01-16 21:01:33 +00:00
lijiaming
0f1629ced8 ANDROID: direct_io: Add a vendor hook to update OEM-specific field of struct bio
Based on the value of "dio->iocb->ki_ioprio" and "dio->iocb->ki_flags",
we can update OEM-specific field of struct bio through this hook. then
we can distinguish different IO's in lower level drivers and take different measures

Bug: 262939423
Change-Id: Ie84d737ca72c29737542f3783d27d7231a272cc4
Signed-off-by: lijiaming <lijiaming3@xiaomi.com>
2023-01-13 21:31:41 +00:00
Nagireddy Annem
fe4d27c370 ANDROID: irqchip/irq-gic-v3: Add vendor hook for gic suspend
This change adds vendor hook for gic suspend syscore ops callback.
And it is invoked during deepsleep and hibernation to store
gic register snapshot.

Bug: 259163247
Change-Id: I4e3729afa4daf18d73e00ee9601b6da72a578b4a
Signed-off-by: Nagireddy Annem <quic_nannem@quicinc.com>
(cherry picked from commit 9d0ccb89bc)
2023-01-12 20:57:14 +00:00
xiaofeng
b3084d784b ANDROID: vendor_hooks:vendor hook for control memory dirty rate
When the IO pressure increases or the system performs dirty
page balancing, the frame rate of the foreground application
may become unstable. Therefore, a hook point is added to limit
the buffer IO rate from the source.

Bug: 262189942
Change-Id: I5214d611a388c5e8d87dc44ffde86ead1834ddff
Signed-off-by: xiaofeng <xiaofeng5@xiaomi.com>
2023-01-11 03:39:54 +00:00
Shreyas K K
a5941bf205 ANDROID: vendor hooks: Encrypt snapshot for bootloader based hibernation
Add encryption support to bootloader based hibernation. This will
encrypt the hibernation snapshot image before it is written to the swap
partition.

Bug: 260069271
Change-Id: I07046ad7fb848fc62258871ab41b3e03246c40dc
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
2023-01-10 18:26:33 +00:00
Nagireddy Annem
9d0ccb89bc ANDROID: irqchip/irq-gic-v3: Add vendor hook for gic suspend
This change adds vendor hook for gic suspend syscore ops callback.
And it is invoked during deepsleep and hibernation to store
gic register snapshot.

Bug: 259163247
Change-Id: I4e3729afa4daf18d73e00ee9601b6da72a578b4a
Signed-off-by: Nagireddy Annem <quic_nannem@quicinc.com>
2023-01-04 15:44:09 +00:00
deyaoren@google.com
2891bd2fc0 Merge remote-tracking branch 2022-12 into HEAD
* keystone/mirror-android13-5.15-2022-12: (4470 commits)
  UPSTREAM: binder: Gracefully handle BINDER_TYPE_FDA objects with num_fds=0
  UPSTREAM: binder: Address corner cases in deferred copy and fixup
  UPSTREAM: binder: fix pointer cast warning
  UPSTREAM: binder: defer copies of pre-patched txn data
  UPSTREAM: binder: read pre-translated fds from sender buffer
  ANDROID: irq: put irq_resolve_mapping under protection of __irq_enter_raw
  BACKPORT: UPSTREAM: usb: typec: ucsi: Wait for the USB role switches
  UPSTREAM: rpmsg: char: Avoid double destroy of default endpoint
  BACKPORT: exfat: fix overflow for large capacity partition
  UPSTREAM: usb: gadget: uvc: fix changing interface name via configfs
  UPSTREAM: dma-mapping: Fix build error unused-value
  UPSTREAM: bpf: Ensure correct locking around vulnerable function find_vpid()
  ANDROID: abi_gki_aarch64_qcom: whitelist symbols added for cma retries
  ANDROID: mm/cma: add vendor_hook in cma_alloc for retries
  ANDROID: arm64: mm: perform clean & invalidation in __dma_map_area
  FROMLIST: sched: Fix use-after-free bug in dup_user_cpus_ptr()
  UPSTREAM: HID: roccat: Fix use-after-free in roccat_read()
  UPSTREAM: mm/damon: use set_huge_pte_at() to make huge pte old
  UPSTREAM: usb: gadget: f_mass_storage: Make CD-ROM emulation works with Windows OS
  UPSTREAM: gen_compile_commands: handle multiple lines per .mod file
  ...

Bug: 264204481
Change-Id: I81eda28402450f56d63260f5f2db348bb6e71816
2023-01-03 21:20:10 +00:00
Jia-Wei Chang
cb0ff59972 ANDROID: cpufreq: add vendor hook in cpufreq_offline
Add vendor hook in cpufreq_offline to block uevent pathway before
cpufreq cooling unregister to prevent NETLINK broadcast waking up during
suspend.

The change is because android hardware health service will register
epoll with EPOLLWAKEUP flag [1].  Afterwards, when suspend starts,
NETLINK will hold the wakelock because the EPOLLWAKEUP flag registered
from health service.

One more key factor is the CAP_BLOCK_SUSPEND capability of health
service [2] that may affect suspend flow as well.

Currently only the patch [3] is available but not accepted in upstream.

[1] https://android.googlesource.com/platform/hardware/interfaces/+/master/health/utils/libhealthloop/HealthLoop.cpp#69
[2] https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1461242
[3] https://patchwork.kernel.org/project/linux-pm/list/?series=658300&state=%2A&archive=both

Bug: 260537724
Change-Id: Ifea4bff2d8fdc3b7e60e7f1cb7ec29a8d3c8771a
Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com>
2022-12-21 10:45:13 +08:00
keystone-kernel-automerger
3866c60e80 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15-2022-11:
  FROMGIT: tty: serial: qcom-geni-serial: Add support for Hibernation feature
  ANDROID: ABI: Update allowed list for QCOM
  ANDROID: abi_gki_aarch64_qcom: whitelist symbols added for cma retries
  ANDROID: mm/cma: add vendor_hook in cma_alloc for retries

Change-Id: I83e00587448e99f6244a8caf99281841ffbb1c6b
Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
2022-12-20 18:53:02 +00:00
lijiaming
cac282fc1a ANDROID: dm: Add a vendor hook to update bio after clone
add a vendor hook to update bio after __bio_clone_fast()

Bug: 261942040
Change-Id: I5ff6f6df632bc9690ea588bc1cadbed670b78e5c
Signed-off-by: lijiaming <lijiaming3@xiaomi.com>
2022-12-15 19:36:01 +00:00
Shreyas K K
3cc69a0a0a ANDROID: vendor hooks: Encrypt snapshot for bootloader based hibernation
Add encryption support to bootloader based hibernation. This will
encrypt the hibernation snapshot image before it is written to the swap
partition.

Bug: 260069271
Change-Id: I07046ad7fb848fc62258871ab41b3e03246c40dc
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
2022-12-13 18:07:10 +00:00
keystone-kernel-automerger
d015c747f4 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15-2022-11:
  ANDROID: abi_gki_aarch64_qcom: Add android_vh_madvise_cold_or_pageout
  FROMGIT: mm/madvise: fix madvise_pageout for private file mappings
  ANDROID: vendor_hooks: Allow shared pages reclaim via MADV_PAGEOUT

Change-Id: I58ef3f1a24b0335009958ca0a4675441d68b2b33
Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
2022-12-13 06:22:08 +00:00
Pavankumar Kondeti
9e8f55a75b ANDROID: vendor_hooks: Allow shared pages reclaim via MADV_PAGEOUT
Add a hook in madvise_cold_or_pageout_pte_range() to allow
vendor modules to influence the shared pages reclaim.

Bug: 242678506
Bug: 261993648
Change-Id: I269a385b59f7291c2e96478674bb3d05f94584cb
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
(cherry picked from commit 99e3951ea4)
2022-12-12 06:35:28 -08:00
Charan Teja Kalla
6f0ba6ad99 ANDROID: mm/cma: add vendor_hook in cma_alloc for retries
Add a vendor hook in the cma alloc for the allocation retries that can
be used by clients to control the number of retries before returning.

Bug: 242836407
Change-Id: Iccff0ac2a926d449da5af64086463bd8d93340fc
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
2022-12-08 01:10:32 +00:00
deyaoren@google.com
bab101b0c6 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15-2022-11: (173 commits)
  FROMLIST: f2fs: fix the msg data type
  BACKPORT: FROMLIST: f2fs: fix the assign logic of iocb
  ANDROID: Update the GKI symbol list and ABI XML
  ANDROID: mm/slab: Create 64-byte slab caches if the hardware supports it
  ANDROID: dma-buf: Add vendor hook for deferred dmabuf sysfs stats release
  FROMLIST: cfi: free old cfi shadow asynchronously
  FROMLIST: cfi: enable sanitize for cfi.c
  ANDROID: GKI: Update abi_gki_aarch64_qcom
  ANDROID: ABI: Add usb_pipe_type_check symbol
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: GKI: Update symbol list for Amlogic
  ANDROID: dm-user: Remove bio recount in I/O path
  UPSTREAM: drm/meson: Fix overflow implicit truncation warnings
  UPSTREAM: irqchip/tegra: Fix overflow implicit truncation warnings
  UPSTREAM: video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write
  UPSTREAM: i2c: ismt: prevent memory corruption in ismt_access()
  ANDROID: GKI: Update symbol list for mtk STB projects
  FROMLIST: KVM: arm64: pkvm: Fixup boot mode to reflect that the kernel resumes from EL1
  ANDROID: ABI: Add teace_android_rvh_rto_next_cpu to unisoc whitelist
  BACKPORT: rcu: Remove __read_mostly annotations from rcu_scheduler_active externs
  ...

Change-Id: If131dbb100fa7df0def4ff1f8db59d41d6a39710
2022-12-01 01:59:46 +00:00
andrew.yang
564233e471 ANDROID: mm: add a vendor hook to rmqueue_bulk()
Add a vendor hook to requeme_bulk() to debug and avoid KE problem.

Bug: 259479254
Change-Id: I55353ff205250cbfb7e2f8d9dc2c6ec7718d77ab
Signed-off-by: andrew.yang <andrew.yang@mediatek.com>
2022-11-22 20:57:21 +00:00
Pavankumar Kondeti
99e3951ea4 ANDROID: vendor_hooks: Allow shared pages reclaim via MADV_PAGEOUT
Add a hook in madvise_cold_or_pageout_pte_range() to allow
vendor modules to influence the shared pages reclaim.

Bug: 242678506
Change-Id: I269a385b59f7291c2e96478674bb3d05f94584cb
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
2022-11-22 19:39:44 +00:00
T.J. Mercier
34e03c38fd ANDROID: dma-buf: Add vendor hook for deferred dmabuf sysfs stats release
This vendor hook allows for the sysfs activity associated with
dma-buf-sysfs-stats teardowns to be performed asynchronously similar
to how the initialization works.

Bug: 254192604
Signed-off-by: T.J. Mercier <tjmercier@google.com>
Change-Id: Ie076d0f8f67b96a97c71d9e6bf90539ebd9807bf
2022-11-14 20:41:00 +00:00
deyaoren@google.com
7200586039 Merge android13-5.15-2022-10 branch into HEAD
* keystone/mirror-android13-5.15-2022-10: (107 commits)
  ANDROID: ABI: update allowed list for galaxy
  ANDROID: GKI: Add symbol list file for sunxi
  FROMGIT: arm64: io: Use asm-generic high level MMIO accessors
  ANDROID: GKI: Update abi_gki_aarch64_qcom for trace_mmio
  BACKPORT: FROMLIST: tracing: Add register read/write tracing support
  ANDROID: GKI: Update abi_gki_aarch64_qcom for timespec64_to_jiffies
  BACKPORT: locking/rwsem: Allow slowpath writer to ignore handoff bit if not set by first waiter
  ANDROID: Update mtktv symbol list
  ANDROID: arm64: Reclaim some cpucaps to aid in backporting
  ANDROID: GKI: Update symbol list for mtk STB projects
  ANDROID: debug_symbols: Add put_task_stack
  ANDROID: abi_gki_aarch64_qcom: Add hibernation APIs
  ANDROID: fix kernelci build-break for !CONFIG_ANDROID_VENDOR_OEM_DATA
  ANDROID: mm/filemap: Fix missing put_page() for speculative page fault
  ANDROID: abi_gki_aarch64_qcom: Add clk_restore_context and clk_save_context
  BACKPORT: HID: steam: Prevent NULL pointer dereference in steam_{recv,send}_report
  ANDROID: abi_gki_aarch64_qcom: Add drm driver APIs
  ANDROID: sched: Export sched_domains_mutex for lockdep
  ANDROID: vendor hooks: Add hooks to support bootloader based hibernation
  ANDROID: GKI: Update Amlogic symbol list
  ...

Change-Id: If7b6bf10366dfcbb4a185591349a1689f7c256f5
2022-10-31 19:56:23 +00:00
keystone-kernel-automerger
842ebad6f6 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15-2022-09:
  ANDROID: abi_gki_aarch64_qcom: Add hibernation APIs
  ANDROID: vendor hooks: Add hooks to support bootloader based hibernation
  ANDROID: GKI: Add symbol list file for sunxi

Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
Change-Id: I90eb14b0ae0636a9fbd5164b1ca17f248fe53e82
2022-10-20 06:22:22 +00:00
Shreyas K K
c5dcb9e1e5 ANDROID: vendor hooks: Add hooks to support bootloader based hibernation
Add vendor hooks to disable randomization of swap slot allocation for
swap partition used for saving hibernation image. Another level of
randomization of swap slots takes place at the firmware level as well
in order to address the wear leveling for UFS/MMC devices, so this
vendor hook checks if a block device represents the swap partition being
used for saving hibernation image, if yes, the swap slot allocation for
such partition is serialized at kernel level.

There is a performance advantage of reading contiguous pages of hibernation
image, it makes the restore logic of hibernation image simpler and faster
as there are no seeks involved in the secondary storage to read multiple
contiguous pages of the image.

Bug: 228815136
Change-Id: Id41a25fd15c5b71f8064f1c7d9cac9560fcdde85
Signed-off-by: Vivek Kumar <quic_vivekuma@quicinc.com>
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
2022-10-19 23:38:42 +00:00
Shreyas K K
d2cb755a43 ANDROID: vendor hooks: Add hooks to support bootloader based hibernation
Add vendor hooks to disable randomization of swap slot allocation for
swap partition used for saving hibernation image. Another level of
randomization of swap slots takes place at the firmware level as well
in order to address the wear leveling for UFS/MMC devices, so this
vendor hook checks if a block device represents the swap partition being
used for saving hibernation image, if yes, the swap slot allocation for
such partition is serialized at kernel level.

There is a performance advantage of reading contiguous pages of hibernation
image, it makes the restore logic of hibernation image simpler and faster
as there are no seeks involved in the secondary storage to read multiple
contiguous pages of the image.

Bug: 228815136
Change-Id: Id41a25fd15c5b71f8064f1c7d9cac9560fcdde85
Signed-off-by: Vivek Kumar <quic_vivekuma@quicinc.com>
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
2022-10-11 18:35:52 +00:00
deyaoren@google.com
ce2b7f1ba1 Merge remote-tracking branch into HEAD
* keystone/mirror-android13-5.15-2022-09: (145 commits)
  ANDROID: GKI: Update abi_gki_aarch64_qcom
  ANDROID: abi_gki_aarch64_qcom: Add iio symbol list for qcom
  ANDROID: gki_config: enable F2FS_UNFAIR_RWSEM
  ANDROID: GKI: Update abi_gki_aarch64_qcom symbols.
  ANDROID: abi_gki_aarch64_qcom: Add protocol related symbols
  ANDROID: scsi: ufs: Improve MCQ error handling
  BACKPORT: writeback avoid use-after-free after removing device
  ANDROID: GKI: Add symbol list file for sunxi
  UPSTREAM: usb: dwc3: gadget: Avoid duplicate requests to enable Run/Stop
  Revert "FROMLIST: usb: dwc3: gadget: Avoid duplicate requests to enable Run/Stop"
  ANDROID: fix add vendor hooks for unusual abort cases
  UPSTREAM: Revert "mm: kmemleak: take a full lowmem check in kmemleak_*_phys()"
  UPSTREAM: kbuild: rename cmd_{bzip2,lzma,lzo,lz4,xzkern,zstd22}
  ANDROID: ABI: Update symbols to unisoc whitelist
  ANDROID: ABI: Update symbols to unisoc whitelist for sync from local code
  ANDROID: ABI: Update symbols to unisoc whitelist
  ANDROID: GKI: Update symbol list for sunxi
  ANDROID: GKI: Update symbol list
  ANDROID: ABI: Update symbols for unisoc whitelist Android13-k5.15
  ANDROID: net: export symbol for tracepoint_consume_skb
  ...

Change-Id: I3398f01fd36158fe453000a61851e96440d03588
2022-10-11 03:32:05 +00:00
Charan Teja Kalla
041ffcd941 ANDROID: mm: add a vendor_hook to change the gfp flags
Add a vendorhook to change the gfp flags while doing the file read_ahead
allocations.

Bug: 248404104
Change-Id: Ifcf1b29177eed2fee79f83764278d67dab221bc5
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
2022-10-10 17:49:13 +00:00
Yang Yang
4c1cf366ac ANDROID: vendor_hooks: add new parameter to android_vh_blk_alloc_rqs()
This patch adds a new parameter "unsigned int hctx_idx" to
android_vh_blk_alloc_rqs().

Bug: 251969657
Change-Id: If3ce0daed56d395231d78bec287853cdc088d1f6
Signed-off-by: Yang Yang <yang.yang@vivo.com>
2022-10-10 16:11:59 +00:00
Eddie Huang
fbb99fcb88 ANDROID: scsi: ufs: Improve MCQ error handling
Changes
- Add new android vendor hook: android_vh_ufs_mcq_retry_complete()
- Retry mcq complete on reset in error handling flow
- Check mcq oustanding reqs instead of DB reg under MCQ mode

Bug: 248447556
Change-Id: Ie658edcef0f9b155eefb4462c99f40557cb64c68
Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com>
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
(cherry picked from commit afa76a1c3a)Bug: Bug: 250784408
2022-10-05 16:26:42 +00:00
Konstantin Vyshetsky
285d4132a6 ANDROID: scsi: ufs: add complete init vendor hook
Currently the core UFS driver does not have a vops to notify when the
device is operational. This commit introduces a hook, which serves to
notify device completing initialization and is ready to accept I/O.

This is required by the FIPS140-2 [1] self integrity test of inline
encryption engine, which must run whenever the host controller is reset.
The code requires sleeping while waiting for I/O to complete and allocating
some memory dynamically, which requires the vendor hook to be restricted.

[1] https://csrc.nist.gov/publications/detail/fips/140/2/final

Bug: 185809932
Signed-off-by: Konstantin Vyshetsky <vkon@google.com>
Change-Id: I6f476f9c2e2b50574d2898c3f1ef6b648d92df24
(cherry picked from commit e774e4eca69ce8ab60df04b27f524b586ab74f17)
2022-10-04 16:09:05 +00:00
qizhong cheng
488046f162 ANDROID: fix add vendor hooks for unusual abort cases
Add hooks to check the do_serror can be recover or not.
When PCIe encounters completion timeout, PCIe hardware will
reply slave error to bus,oplus which will causes the system to panic.

Bug: 247846368
Bug: 250331401

Signed-off-by: qizhong cheng <qizhong.cheng@mediatek.com>
Change-Id: Iaef6c9a6ac07e552939c0f8e386213cb930cfb6e
(cherry picked from commit a89fbc0de0)
2022-10-03 09:55:41 +00:00
Chiawei Wang
2a4d271c69 ANDROID: mm: Add vendor hook in rmqueue()
Add a vendor hook for costly order page counting
and other vendor specific functions.

Bug: 244409558
Bug: 250331401

Signed-off-by: Chiawei Wang <chiaweiwang@google.com>
Signed-off-by: Oven <liyangouwen1@oppo.com>
Change-Id: I89206727a462548cc3500b695d85c83ff003eec7
(cherry picked from commit 369de3780428a17e9afece2f5747f03619d589b6)
(cherry picked from commit fb2bb8f3ad)
2022-10-03 07:24:05 +00:00
zhouhuacai
49d2c8fb75 ANDROID: vendor_hooks: tune reclaim inactive ratio
Add hooks to apply oem's memory reclaim optimization

Bug: 186669330
Bug: 250331401

Change-Id: I9a1c713bf3eea2823b2758ee44284a244b1ca7a1
Signed-off-by: zhouhuacai <zhouohuacai@oppo.com>
Signed-off-by: Oven <liyangouwen1@oppo.com>
(cherry picked from commit 577f73412f579ef493e8e67795b3fd93f1a47dfd)
(cherry picked from commit 0226fc2e18)
2022-10-03 07:23:01 +00:00
zhengding chen
738eb285d9 ANDROID: vendor_hooks: Add hooks for cpufreq_acct_update_power
We want to record the cputime of each running process by adding
hooks for cpufreq_acct_update_power.

Bug: 186604985
Bug: 250331401

Signed-off-by: zhengding chen <chenzhengding@oppo.com>
Change-Id: I35e38be4680781df3338b4a01041922294aecaa0
(cherry picked from commit 3983753280987d68138ce249232b3d1b775ab1e6)
(cherry picked from commit 55f112e068)
2022-10-03 07:22:09 +00:00
xieliujie
d4680ffd79 ANDROID: vendor_hooks: Add hooks for ipa
Add hooks to support oem's thermal feature.

Bug: 242662879
Bug: 250331401

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I4731948e92e9becb2dbd1f13851b7f849dcfd57c
(cherry picked from commit a60c2d4f12)
2022-10-03 07:21:39 +00:00
Peifeng Li
eb23b4257d ANDROID: vendor_hook: rename the the name of hooks
Renamed trace_android_vh_record_percpu_rwsem_lock_starttime to
trace_android_vh_record_pcpu_rwsem_starttime.

Because the orignal name is too long, which results to the
compile-err of .ko that uses the symbol:

ERROR: modpost:
too long symbol "__tracepoint_android_vh_record_percpu_rwsem_lock_starttime"

There is not any users of the the orignal hooks so that it is safe to
rename it.

Bug: 241191475
Bug: 250331401

Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: Ie246a933414db5e9e28a65a4c280fae3a1cbefe3
(cherry picked from commit ac82d34706)
2022-10-03 07:21:02 +00:00
Peifeng Li
05acd75c53 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
Bug: 250331401

Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: I0e967a1e8b77c32a1ad588acd54028fae2f90c4e
(cherry picked from commit f729494767)
2022-10-03 07:20:38 +00:00
Peifeng Li
ba1530e237 ANDROID: vendor_hook: Add hook to not be stuck ro rmap lock in kswapd or direct_reclaim
Add hooks to support trylock in rmaplock when reclaiming in kswapd or
direct_reclaim, in order to avoid wait lock for a long time.

- android_vh_handle_failed_page_trylock
- android_vh_page_trylock_set
- android_vh_page_trylock_clear
- android_vh_page_trylock_get_result
- android_vh_do_page_trylock

Bug: 240003372
Bug: 250331401

Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: I0f605b35ae41f15b3ca7bc72cd5f003175c318a5
(cherry picked from commit 309a6bf81a)
2022-10-03 07:20:10 +00:00
xieliujie
912f87af05 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:
commit 53e809978443 ("ANDROID: vendor_hooks: Add hooks for scheduler")

Bug: 243110112
Bug: 250331401

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I9a315cfb414fd34e0ef7a2cf9d57df50d4dd984f
(cherry picked from commit 548da5d23d98b796cf9a478675622a606b3307c8)
(cherry picked from commit cc724041ce)
2022-10-03 07:19:33 +00:00
Liujie Xie
9122cbfc55 ANDROID: Fix lost track action type in save_track_hash
Transmit the track action type to save_track_hash, otherwise we do not know it is allocation stack or free stack.

Fixes: 8bc6337823c6 ("ANDROID: vendor_hooks: add hooks for slab memory leak debugging")
Bug: 184928480
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I74c50c02cfb4ebbf3e9fecdf125e76946ff4e7d1
(cherry picked from commit 7d216e2512082853f4cf0c220a1b48119203144f)
2022-09-28 18:59:15 +00:00
Peifeng Li
ac82d34706 ANDROID: vendor_hook: rename the the name of hooks
Renamed trace_android_vh_record_percpu_rwsem_lock_starttime to
trace_android_vh_record_pcpu_rwsem_starttime.

Because the orignal name is too long, which results to the
compile-err of .ko that uses the symbol:

ERROR: modpost:
too long symbol "__tracepoint_android_vh_record_percpu_rwsem_lock_starttime"

There is not any users of the the orignal hooks so that it is safe to
rename it.

Bug: 241191475
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: Ie246a933414db5e9e28a65a4c280fae3a1cbefe3
2022-09-28 17:07:23 +08:00
Liujie Xie
4a9e3b2ca6 ANDROID: vendor_hooks: Add hook in kmalloc_slab()
Add hook in kmalloc_slab() for debug kmalloc slab memory leak.

Bug: 197614797
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I402a9f968f2bf1e75daa461c05a53a8fabf70028
(cherry picked from commit 94fbab9d6c82befb547f75433dd886f2611071a6)
2022-09-27 22:16:12 +00:00
liuhailong
54f780d093 ANDROID: signal: Add vendor hook for memory reaping
Since commit 3bcdb496f496 ("ANDROID: signal: Add vendor hook
for memory reaping"), but *current* does not need.  Add another
hook here to determine killed process need be reaped.
(e.g. get_mm_counter)

Bug: 232062955
Change-Id: Ide13d3a2e8c199b063f41e071a2bf2fd60a91b04
Signed-off-by: liuhailong <liuhailong@oppo.com>
(cherry picked from commit e27ad1d21124c25259911574775fafb5f60bb53e)
2022-09-27 20:02:43 +00:00
qizhong cheng
6ab200cd45 ANDROID: fix add vendor hooks for unusual abort cases
Add hooks to check the do_serror can be recover or not.
When PCIe encounters completion timeout, PCIe hardware will
reply slave error to bus, which will causes the system to panic.

Bug: 247846368

Signed-off-by: qizhong cheng <qizhong.cheng@mediatek.com>
Change-Id: Iaef6c9a6ac07e552939c0f8e386213cb930cfb6e
(cherry picked from commit a89fbc0de0)
2022-09-27 18:10:13 +00:00
Greg Kroah-Hartman
b80df8c286 Revert "ANDROID: vendor_hooks: Add hooks to tcp/udp send/recv msg functions."
This reverts commit e4e3aadd01.

The hooks android_rvh_tcp_sendmsg_locked, android_rvh_tcp_recvmsg,
android_rvh_udp_sendmsg, android_rvh_udp_recvmsg, and
android_rvh_tcp_recvmsg_stat, are not used by any vendor, so remove it
to help with merge issues with future LTS releases.

If they are needed by any real user, it can easily be reverted to add
them back and then the symbols should be added to the abi list at the
same time to prevent it from being removed again later.

Bug: 190523684
Bug: 203756332
Cc: Liangliang Li <liliangliang@vivo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id562bc858612e059b1605655128783042740ff8a
2022-09-27 11:49:43 +02:00
Greg Kroah-Hartman
8c09081fc0 Revert "ANDROID: sched: Add vendor hook for util-update related functions"
This reverts commit eb994f2728.

The hooks android_rvh_attach_entity_load_avg,
android_rvh_detach_entity_load_avg, android_rvh_update_load_avg,
android_rvh_remove_entity_load_avg, and android_rvh_update_blocked_fair
are not used by any vendor, so remove it to help with merge issues with
future LTS releases.

If they are needed by any real user, it can easily be reverted to add
them back and then the symbols should be added to the abi list at the
same time to prevent it from being removed again later.

Bug: 203756332
Bug: 201260585
Cc: Rick Yiu <rickyiu@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibb6f0d2b71e830092f8d3452fdf34c5d1975e71e
2022-09-27 11:41:40 +02:00