diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml
index e08fb6906bcd..8720cb9c767e 100755
--- a/android/abi_gki_aarch64.xml
+++ b/android/abi_gki_aarch64.xml
@@ -108,6 +108,8 @@
+
+
@@ -370,6 +372,8 @@
+
+
@@ -437,6 +441,7 @@
+
@@ -455,6 +460,7 @@
+
@@ -747,6 +753,7 @@
+
@@ -891,6 +898,11 @@
+
+
+
+
+
@@ -947,6 +959,7 @@
+
@@ -2445,6 +2458,7 @@
+
@@ -2472,7 +2486,9 @@
+
+
@@ -2833,6 +2849,7 @@
+
@@ -2905,6 +2922,7 @@
+
@@ -3042,6 +3060,7 @@
+
@@ -3451,6 +3470,7 @@
+
@@ -3472,6 +3492,7 @@
+
@@ -5050,6 +5071,7 @@
+
@@ -5114,6 +5136,8 @@
+
+
@@ -5153,6 +5177,7 @@
+
@@ -5199,6 +5224,7 @@
+
@@ -5213,6 +5239,7 @@
+
@@ -5521,6 +5548,7 @@
+
@@ -5730,6 +5758,8 @@
+
+
@@ -5799,6 +5829,7 @@
+
@@ -5820,6 +5851,7 @@
+
@@ -6042,6 +6074,8 @@
+
+
@@ -9076,14 +9110,7 @@
-
-
-
-
-
-
-
-
+
@@ -9091,6 +9118,13 @@
+
+
+
+
+
+
+
@@ -11270,6 +11304,7 @@
+
@@ -22572,6 +22607,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -24419,6 +24465,7 @@
+
@@ -25672,7 +25719,7 @@
-
+
@@ -27151,100 +27198,100 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -28064,6 +28111,7 @@
+
@@ -36402,6 +36450,7 @@
+
@@ -36759,153 +36808,153 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -49418,7 +49467,7 @@
-
+
@@ -54976,39 +55025,39 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -55815,6 +55864,11 @@
+
+
+
+
+
@@ -56874,6 +56928,7 @@
+
@@ -83757,6 +83812,7 @@
+
@@ -91496,6 +91552,7 @@
+
@@ -94693,7 +94750,7 @@
-
+
@@ -109951,7 +110008,7 @@
-
+
@@ -113115,10 +113172,10 @@
-
-
-
-
+
+
+
+
@@ -113460,6 +113517,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -114126,9 +114200,9 @@
-
-
-
+
+
+
@@ -115067,6 +115141,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -115484,6 +115573,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -115590,9 +115689,14 @@
-
-
-
+
+
+
+
+
+
+
+
@@ -116303,8 +116407,8 @@
-
-
+
+
@@ -116422,6 +116526,8 @@
+
+
@@ -116491,6 +116597,7 @@
+
@@ -116511,7 +116618,8 @@
-
+
+
@@ -117252,13 +117360,13 @@
-
-
+
+
-
-
-
+
+
+
@@ -117581,6 +117689,11 @@
+
+
+
+
+
@@ -118391,6 +118504,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -118686,6 +118821,11 @@
+
+
+
+
+
@@ -119368,13 +119508,13 @@
-
-
-
-
+
+
+
+
-
+
@@ -119424,9 +119564,9 @@
-
-
-
+
+
+
@@ -119441,12 +119581,12 @@
-
-
+
+
-
-
+
+
@@ -119468,12 +119608,12 @@
-
-
+
+
-
-
+
+
@@ -119481,12 +119621,12 @@
-
-
+
+
-
-
+
+
@@ -121929,12 +122069,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -125775,32 +125915,32 @@
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
@@ -126571,6 +126711,10 @@
+
+
+
+
@@ -126691,10 +126835,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -128576,6 +128733,12 @@
+
+
+
+
+
+
@@ -128972,6 +129135,12 @@
+
+
+
+
+
+
@@ -129632,6 +129801,10 @@
+
+
+
+
@@ -129660,6 +129833,8 @@
+
+
@@ -131689,6 +131864,14 @@
+
+
+
+
+
+
+
+
@@ -131812,6 +131995,10 @@
+
+
+
+
@@ -135315,38 +135502,38 @@
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -135417,8 +135604,8 @@
-
-
+
+
@@ -135441,19 +135628,19 @@
-
-
-
-
-
+
+
+
+
+
-
-
+
+
@@ -135470,17 +135657,17 @@
-
-
-
+
+
+
-
-
+
+
-
-
+
+
@@ -135495,8 +135682,8 @@
-
-
+
+
@@ -135515,16 +135702,16 @@
-
-
+
+
-
-
+
+
-
-
+
+
@@ -135540,8 +135727,8 @@
-
-
+
+
@@ -138659,63 +138846,63 @@
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
@@ -138727,8 +138914,8 @@
-
-
+
+
@@ -139021,15 +139208,15 @@
-
-
-
-
-
+
+
+
+
+
-
-
+
+
@@ -139054,12 +139241,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -139621,28 +139808,28 @@
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
@@ -139650,19 +139837,19 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -139672,9 +139859,9 @@
-
-
-
+
+
+
@@ -139687,12 +139874,12 @@
-
-
+
+
-
-
+
+
@@ -139700,18 +139887,18 @@
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
@@ -139743,91 +139930,91 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
+
+
+
+
@@ -139900,6 +140087,10 @@
+
+
+
+
@@ -140198,6 +140389,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -140381,6 +140583,10 @@
+
+
+
+
@@ -140466,8 +140672,8 @@
-
-
+
+
@@ -140598,6 +140804,10 @@
+
+
+
+
@@ -140618,8 +140828,8 @@
-
-
+
+
@@ -140660,6 +140870,10 @@
+
+
+
+
@@ -142298,6 +142512,11 @@
+
+
+
+
+
@@ -142500,15 +142719,15 @@
-
-
-
-
+
+
+
+
-
-
-
+
+
+
@@ -142532,19 +142751,19 @@
-
-
-
+
+
+
-
-
-
-
+
+
+
+
@@ -142557,13 +142776,13 @@
-
-
-
+
+
+
-
-
+
+
@@ -142581,9 +142800,9 @@
-
-
-
+
+
+
@@ -142606,14 +142825,14 @@
-
-
-
+
+
+
-
-
-
+
+
+
@@ -142643,9 +142862,9 @@
-
-
-
+
+
+
@@ -142658,8 +142877,8 @@
-
-
+
+
diff --git a/android/abi_gki_aarch64_galaxy b/android/abi_gki_aarch64_galaxy
index 8fc8f58f678d..343a40594e66 100644
--- a/android/abi_gki_aarch64_galaxy
+++ b/android/abi_gki_aarch64_galaxy
@@ -2354,6 +2354,9 @@
irq_work_sync
is_dma_buf_file
is_vmalloc_addr
+ iwe_stream_add_event
+ iwe_stream_add_point
+ iwe_stream_add_value
jiffies
jiffies64_to_msecs
jiffies_64_to_clock_t
@@ -2362,6 +2365,7 @@
kasan_flag_enabled
kasprintf
kern_mount
+ kern_path
kern_unmount
kernel_bind
kernel_connect
@@ -2430,6 +2434,7 @@
kstrtoint_from_user
kstrtol_from_user
kstrtoll
+ kstrtos16
kstrtos8
kstrtos8_from_user
kstrtou16
@@ -2887,6 +2892,7 @@
part_end_io_acct
part_start_io_acct
passthru_features_check
+ path_put
pause_cpus
pci_alloc_irq_vectors_affinity
pci_assign_resource
diff --git a/android/abi_gki_aarch64_oplus b/android/abi_gki_aarch64_oplus
index 5476614fa58e..793058c27644 100644
--- a/android/abi_gki_aarch64_oplus
+++ b/android/abi_gki_aarch64_oplus
@@ -134,6 +134,7 @@
cdev_device_del
cdev_init
__cfi_slowpath
+ cgroup_add_legacy_cftypes
cgroup_path_ns
cgroup_taskset_first
cgroup_taskset_next
@@ -1421,6 +1422,7 @@
memblock_end_of_DRAM
__memcat_p
memcg_kmem_enabled_key
+ mem_cgroup_from_id
memchr
memchr_inv
memcmp
@@ -1430,6 +1432,8 @@
memdup_user
memmove
memory_block_size_bytes
+ memory_cgrp_subsys
+ memory_cgrp_subsys_enabled_key
memory_read_from_buffer
memparse
mempool_alloc
@@ -1575,6 +1579,7 @@
of_count_phandle_with_args
of_cpufreq_cooling_register
of_cpu_node_to_id
+ of_css
of_devfreq_cooling_register
of_device_get_match_data
of_device_is_available
@@ -2898,6 +2903,7 @@
trace_seq_putc
tracing_off
try_module_get
+ try_to_free_mem_cgroup_pages
try_wait_for_completion
tty_flip_buffer_push
__tty_insert_flip_char
@@ -2991,6 +2997,7 @@
unregister_inetaddr_notifier
unregister_kprobe
unregister_kretprobe
+ unregister_memory_notifier
unregister_module_notifier
unregister_netdev
unregister_netdevice_many
diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom
index 65fefcad59f9..be9112998f23 100644
--- a/android/abi_gki_aarch64_qcom
+++ b/android/abi_gki_aarch64_qcom
@@ -2569,6 +2569,7 @@
__traceiter_android_vh_logbuf_pr_cont
__traceiter_android_vh_printk_hotplug
__traceiter_android_vh_rproc_recovery
+ __traceiter_android_vh_rproc_recovery_set
__traceiter_android_vh_scheduler_tick
__traceiter_android_vh_show_max_freq
__traceiter_android_vh_show_resume_epoch_val
@@ -2686,6 +2687,7 @@
__tracepoint_android_vh_psi_event
__tracepoint_android_vh_psi_group
__tracepoint_android_vh_rproc_recovery
+ __tracepoint_android_vh_rproc_recovery_set
__tracepoint_android_vh_scheduler_tick
__tracepoint_android_vh_shmem_alloc_page
__tracepoint_android_vh_show_max_freq
diff --git a/android/abi_gki_aarch64_virtual_device b/android/abi_gki_aarch64_virtual_device
index 33752fac64a8..3b7e4f52cab4 100644
--- a/android/abi_gki_aarch64_virtual_device
+++ b/android/abi_gki_aarch64_virtual_device
@@ -34,6 +34,9 @@
bpf_trace_run4
bpf_trace_run5
bpf_trace_run6
+ bt_err
+ bt_info
+ bt_warn
bus_register
bus_unregister
cancel_delayed_work
@@ -90,6 +93,7 @@
device_create
device_del
device_initialize
+ device_init_wakeup
device_register
device_release_driver
device_unregister
@@ -145,6 +149,12 @@
get_random_bytes
get_unused_fd_flags
gic_nonsecure_priorities
+ hci_alloc_dev
+ __hci_cmd_sync
+ hci_free_dev
+ hci_recv_frame
+ hci_register_dev
+ hci_unregister_dev
hwrng_register
hwrng_unregister
ida_alloc_range
@@ -313,6 +323,7 @@
pm_runtime_set_autosuspend_delay
__pm_runtime_suspend
__pm_runtime_use_autosuspend
+ pm_wakeup_dev_event
preempt_schedule
preempt_schedule_notrace
prepare_to_wait
@@ -490,6 +501,15 @@
unregister_virtio_driver
up_read
up_write
+ usb_alloc_urb
+ usb_anchor_urb
+ usb_control_msg
+ usb_deregister
+ usb_free_urb
+ usb_kill_anchored_urbs
+ usb_register_driver
+ usb_submit_urb
+ usb_unanchor_urb
__usecs_to_jiffies
usleep_range
vabits_actual
@@ -562,6 +582,46 @@
sg_miter_start
sg_miter_stop
+# required by btintel.ko
+ bt_to_errno
+ hci_cmd_sync
+ request_firmware_direct
+
+# required by btusb.ko
+ bit_wait_timeout
+ btbcm_set_bdaddr
+ btbcm_setup_apple
+ btbcm_setup_patchram
+ device_wakeup_disable
+ disable_irq
+ disable_irq_nosync
+ enable_irq
+ gpiod_get_optional
+ gpiod_put
+ gpiod_set_value_cansleep
+ __hci_cmd_sync_ev
+ hci_recv_diag
+ irq_modify_status
+ irq_set_irq_wake
+ of_irq_get_byname
+ of_match_device
+ of_property_read_variable_u16_array
+ out_of_line_wait_on_bit_timeout
+ pm_system_wakeup
+ usb_autopm_get_interface
+ usb_autopm_put_interface
+ usb_bulk_msg
+ usb_driver_claim_interface
+ usb_driver_release_interface
+ usb_enable_autosuspend
+ usb_get_from_anchor
+ usb_ifnum_to_if
+ usb_match_id
+ usb_queue_reset_device
+ usb_scuttle_anchored_urbs
+ usb_set_interface
+ wake_up_bit
+
# required by cfg80211.ko
bpf_trace_run10
bpf_trace_run7
@@ -669,25 +729,10 @@
register_candev
unregister_candev
usb_alloc_coherent
- usb_alloc_urb
- usb_anchor_urb
- usb_control_msg
- usb_deregister
usb_free_coherent
- usb_free_urb
- usb_kill_anchored_urbs
- usb_register_driver
- usb_submit_urb
- usb_unanchor_urb
# required by hci_vhci.ko
- bt_err
_copy_from_iter_full
- hci_alloc_dev
- hci_free_dev
- hci_recv_frame
- hci_register_dev
- hci_unregister_dev
# required by ledtrig-audio.ko
led_set_brightness_nosleep
@@ -901,7 +946,6 @@
input_mt_sync_frame
input_set_capability
kstrtou8
- pm_wakeup_dev_event
ps2_begin_command
ps2_cmd_aborted
ps2_command
@@ -930,7 +974,6 @@
# required by rtc-test.ko
add_timer
- device_init_wakeup
devm_rtc_allocate_device
platform_device_add
platform_device_alloc
diff --git a/android/abi_gki_aarch64_vivo b/android/abi_gki_aarch64_vivo
index d8703539183d..f464cbad7f17 100644
--- a/android/abi_gki_aarch64_vivo
+++ b/android/abi_gki_aarch64_vivo
@@ -54,6 +54,8 @@
__bitmap_set
blk_alloc_queue
blk_bio_list_merge
+ blkcg_policy_register
+ blkcg_policy_unregister
blk_cleanup_queue
blk_execute_rq
blk_execute_rq_nowait
@@ -1001,6 +1003,7 @@
of_count_phandle_with_args
of_cpufreq_cooling_register
of_cpu_node_to_id
+ of_css
of_devfreq_cooling_register
of_device_get_match_data
of_device_is_available
@@ -1711,6 +1714,8 @@
__traceiter_android_vh_binder_restore_priority
__traceiter_android_vh_binder_set_priority
__traceiter_android_vh_binder_wakeup_ilocked
+ __traceiter_android_vh_blk_alloc_rqs
+ __traceiter_android_vh_blk_rq_ctx_init
__traceiter_android_vh_cpu_idle_enter
__traceiter_android_vh_cpu_idle_exit
__traceiter_android_vh_filemap_fault_cache_page
@@ -1728,6 +1733,7 @@
__traceiter_android_vh_mmc_blk_mq_rw_recovery
__traceiter_android_vh_mmc_blk_reset
__traceiter_android_vh_mmc_gpio_cd_irqt
+ __traceiter_android_vh_mm_dirty_limits
__traceiter_android_vh_printk_hotplug
__traceiter_android_vh_scheduler_tick
__traceiter_android_vh_sdhci_get_cd
@@ -1806,6 +1812,8 @@
__tracepoint_android_vh_binder_set_priority
__tracepoint_android_vh_binder_trans
__tracepoint_android_vh_binder_wakeup_ilocked
+ __tracepoint_android_vh_blk_alloc_rqs
+ __tracepoint_android_vh_blk_rq_ctx_init
__tracepoint_android_vh_cpu_idle_enter
__tracepoint_android_vh_cpu_idle_exit
__tracepoint_android_vh_dup_task_struct
@@ -1825,6 +1833,7 @@
__tracepoint_android_vh_mmc_blk_mq_rw_recovery
__tracepoint_android_vh_mmc_blk_reset
__tracepoint_android_vh_mmc_gpio_cd_irqt
+ __tracepoint_android_vh_mm_dirty_limits
__tracepoint_android_vh_printk_hotplug
__tracepoint_android_vh_scheduler_tick
__tracepoint_android_vh_sdhci_get_cd
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index e5e65f785c43..6c39a61ec115 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -414,6 +414,7 @@ NOKPROBE_SYMBOL(do_undefinstr);
void do_bti(struct pt_regs *regs)
{
+ trace_android_rvh_do_bti(regs, user_mode(regs));
BUG_ON(!user_mode(regs));
force_signal_inject(SIGILL, ILL_ILLOPC, regs->pc, 0);
}
@@ -425,6 +426,7 @@ void do_ptrauth_fault(struct pt_regs *regs, unsigned int esr)
* Unexpected FPAC exception or pointer authentication failure in
* the kernel: kill the task before it does any more harm.
*/
+ trace_android_rvh_do_ptrauth_fault(regs, esr, user_mode(regs));
BUG_ON(!user_mode(regs));
force_signal_inject(SIGILL, ILL_ILLOPN, regs->pc, esr);
}
diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c
index 46f71a3def2b..1f6ac9318411 100644
--- a/drivers/android/vendor_hooks.c
+++ b/drivers/android/vendor_hooks.c
@@ -243,6 +243,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_mutex_list_add);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_unlock_slowpath);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rwsem_wake_finish);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_undefinstr);
+EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_bti);
+EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_ptrauth_fault);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_bad_mode);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_arm64_serror_panic);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_selinux_avc_insert);
@@ -364,6 +366,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_force_compatible_post);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_binder_print_transaction_info);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_setscheduler_uclamp);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery);
+EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery_set);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ptype_head);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_kfree_skb);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_mmap_file);
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index a7b43780ebf0..f0ec98dbfc96 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -2106,6 +2106,7 @@ unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy,
arch_set_freq_scale(policy->related_cpus, freq,
policy->cpuinfo.max_freq);
cpufreq_stats_record_transition(policy, freq);
+ cpufreq_times_record_transition(policy, freq);
trace_android_rvh_cpufreq_transition(policy);
if (trace_cpu_frequency_enabled()) {
diff --git a/drivers/remoteproc/remoteproc_sysfs.c b/drivers/remoteproc/remoteproc_sysfs.c
index d1cf7bf277c4..e3dc6ee27e58 100644
--- a/drivers/remoteproc/remoteproc_sysfs.c
+++ b/drivers/remoteproc/remoteproc_sysfs.c
@@ -5,6 +5,7 @@
#include
#include
+#include
#include "remoteproc_internal.h"
@@ -51,9 +52,11 @@ static ssize_t recovery_store(struct device *dev,
if (sysfs_streq(buf, "enabled")) {
/* change the flag and begin the recovery process if needed */
rproc->recovery_disabled = false;
+ trace_android_vh_rproc_recovery_set(rproc);
rproc_trigger_recovery(rproc);
} else if (sysfs_streq(buf, "disabled")) {
rproc->recovery_disabled = true;
+ trace_android_vh_rproc_recovery_set(rproc);
} else if (sysfs_streq(buf, "recover")) {
/* begin the recovery process without changing the flag */
rproc_trigger_recovery(rproc);
diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index d664c4650b2d..6d5a8c5835e1 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -220,10 +220,6 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev,
goto fail;
}
- /* Use min_t(int, ...) in case shost->can_queue exceeds SHRT_MAX */
- shost->cmd_per_lun = min_t(int, shost->cmd_per_lun,
- shost->can_queue);
-
error = scsi_init_sense_cache(shost);
if (error)
goto fail;
@@ -232,6 +228,12 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev,
if (error)
goto fail;
+ shost->can_queue = shost->tag_set.queue_depth;
+
+ /* Use min_t(int, ...) in case shost->can_queue exceeds SHRT_MAX */
+ shost->cmd_per_lun = min_t(int, shost->cmd_per_lun,
+ shost->can_queue);
+
if (!shost->shost_gendev.parent)
shost->shost_gendev.parent = dev ? dev : &platform_bus;
if (!dma_dev)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index d89db29fa829..ffe075dae0ef 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1909,6 +1909,10 @@ int scsi_mq_setup_tags(struct Scsi_Host *shost)
tag_set->ops = &scsi_mq_ops_no_commit;
tag_set->nr_hw_queues = shost->nr_hw_queues ? : 1;
tag_set->queue_depth = shost->can_queue;
+ if (shost->hostt->name && strcmp(shost->hostt->name, "ufshcd") == 0) {
+ tag_set->queue_depth--;
+ tag_set->reserved_tags++;
+ }
tag_set->cmd_size = cmd_size;
tag_set->numa_node = NUMA_NO_NODE;
tag_set->flags = BLK_MQ_F_SHOULD_MERGE;
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index dbd888f929c4..5c2a617de004 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -2931,12 +2931,7 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba,
down_read(&hba->clk_scaling_lock);
- /*
- * Get free slot, sleep if slots are unavailable.
- * Even though we use wait_event() which sleeps indefinitely,
- * the maximum wait time is bounded by SCSI request timeout.
- */
- req = blk_get_request(q, REQ_OP_DRV_OUT, 0);
+ req = blk_mq_alloc_request(q, REQ_OP_DRV_OUT, BLK_MQ_REQ_RESERVED);
if (IS_ERR(req)) {
err = PTR_ERR(req);
goto out_unlock;
@@ -4903,11 +4898,7 @@ static int ufshcd_slave_alloc(struct scsi_device *sdev)
*/
static int ufshcd_change_queue_depth(struct scsi_device *sdev, int depth)
{
- struct ufs_hba *hba = shost_priv(sdev->host);
-
- if (depth > hba->nutrs)
- depth = hba->nutrs;
- return scsi_change_queue_depth(sdev, depth);
+ return scsi_change_queue_depth(sdev, min(depth, sdev->host->can_queue));
}
static void ufshcd_hpb_destroy(struct ufs_hba *hba, struct scsi_device *sdev)
diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
index 3cce91d1e63f..a869668f3061 100644
--- a/drivers/scsi/ufs/ufshpb.c
+++ b/drivers/scsi/ufs/ufshpb.c
@@ -184,9 +184,19 @@ next_srgn:
set_bit_len = cnt;
spin_lock_irqsave(&hpb->rgn_state_lock, flags);
- if (set_dirty && rgn->rgn_state != HPB_RGN_INACTIVE &&
- srgn->srgn_state == HPB_SRGN_VALID)
- bitmap_set(srgn->mctx->ppn_dirty, srgn_offset, set_bit_len);
+ if (rgn->rgn_state != HPB_RGN_INACTIVE) {
+ if (set_dirty) {
+ if (srgn->srgn_state == HPB_SRGN_VALID)
+ bitmap_set(srgn->mctx->ppn_dirty, srgn_offset,
+ set_bit_len);
+ } else if (hpb->is_hcm) {
+ /* rewind the read timer for lru regions */
+ rgn->read_timeout = ktime_add_ms(ktime_get(),
+ rgn->hpb->params.read_timeout_ms);
+ rgn->read_timeout_expiries =
+ rgn->hpb->params.read_timeout_expiries;
+ }
+ }
spin_unlock_irqrestore(&hpb->rgn_state_lock, flags);
if (hpb->is_hcm && prev_srgn != srgn) {
@@ -753,6 +763,7 @@ static struct ufshpb_req *ufshpb_get_map_req(struct ufshpb_lu *hpb,
{
struct ufshpb_req *map_req;
struct bio *bio;
+ unsigned long flags;
if (hpb->is_hcm &&
hpb->num_inflight_map_req >= hpb->params.inflight_map_req) {
@@ -777,7 +788,10 @@ static struct ufshpb_req *ufshpb_get_map_req(struct ufshpb_lu *hpb,
map_req->rb.srgn_idx = srgn->srgn_idx;
map_req->rb.mctx = srgn->mctx;
+
+ spin_lock_irqsave(&hpb->param_lock, flags);
hpb->num_inflight_map_req++;
+ spin_unlock_irqrestore(&hpb->param_lock, flags);
return map_req;
}
@@ -785,9 +799,14 @@ static struct ufshpb_req *ufshpb_get_map_req(struct ufshpb_lu *hpb,
static void ufshpb_put_map_req(struct ufshpb_lu *hpb,
struct ufshpb_req *map_req)
{
+ unsigned long flags;
+
bio_put(map_req->bio);
ufshpb_put_req(hpb, map_req);
+
+ spin_lock_irqsave(&hpb->param_lock, flags);
hpb->num_inflight_map_req--;
+ spin_unlock_irqrestore(&hpb->param_lock, flags);
}
static int ufshpb_clear_dirty_bitmap(struct ufshpb_lu *hpb,
@@ -1372,7 +1391,8 @@ static int ufshpb_add_region(struct ufshpb_lu *hpb, struct ufshpb_region *rgn)
victim_rgn = ufshpb_victim_lru_info(hpb);
if (!victim_rgn) {
dev_warn(&hpb->sdev_ufs_lu->sdev_dev,
- "cannot get victim region error\n");
+ "cannot get victim region %s\n",
+ hpb->is_hcm ? "" : "error");
ret = -ENOMEM;
goto out;
}
@@ -2386,6 +2406,7 @@ static int ufshpb_lu_hpb_init(struct ufs_hba *hba, struct ufshpb_lu *hpb)
spin_lock_init(&hpb->rgn_state_lock);
spin_lock_init(&hpb->rsp_list_lock);
+ spin_lock_init(&hpb->param_lock);
INIT_LIST_HEAD(&hpb->lru_info.lh_lru_rgn);
INIT_LIST_HEAD(&hpb->lh_act_srgn);
diff --git a/drivers/scsi/ufs/ufshpb.h b/drivers/scsi/ufs/ufshpb.h
index c74a6c35a446..a79e07398970 100644
--- a/drivers/scsi/ufs/ufshpb.h
+++ b/drivers/scsi/ufs/ufshpb.h
@@ -32,7 +32,7 @@
/* hpb support chunk size */
#define HPB_LEGACY_CHUNK_HIGH 1
#define HPB_MULTI_CHUNK_LOW 7
-#define HPB_MULTI_CHUNK_HIGH 256
+#define HPB_MULTI_CHUNK_HIGH 255
/* hpb vender defined opcode */
#define UFSHPB_READ 0xF8
@@ -237,7 +237,9 @@ struct ufshpb_lu {
struct ufshpb_req *pre_req;
int num_inflight_pre_req;
int throttle_pre_req;
- int num_inflight_map_req;
+ int num_inflight_map_req; /* hold param_lock */
+ spinlock_t param_lock;
+
struct list_head lh_pre_req_free;
int cur_read_id;
int pre_req_min_tr_len;
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index c02dadc0f005..48a993d2236a 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -476,6 +476,8 @@ static void thermal_zone_device_init(struct thermal_zone_device *tz)
{
struct thermal_instance *pos;
tz->temperature = THERMAL_TEMP_INVALID;
+ tz->prev_low_trip = -INT_MAX;
+ tz->prev_high_trip = INT_MAX;
list_for_each_entry(pos, &tz->thermal_instances, tz_node)
pos->initialized = false;
}
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
index 950c9435beec..73a28f8a38a7 100644
--- a/drivers/usb/gadget/function/f_mass_storage.c
+++ b/drivers/usb/gadget/function/f_mass_storage.c
@@ -2301,6 +2301,16 @@ static void fsg_disable(struct usb_function *f)
{
struct fsg_dev *fsg = fsg_from_func(f);
+ /* Disable the endpoints */
+ if (fsg->bulk_in_enabled) {
+ usb_ep_disable(fsg->bulk_in);
+ fsg->bulk_in_enabled = 0;
+ }
+ if (fsg->bulk_out_enabled) {
+ usb_ep_disable(fsg->bulk_out);
+ fsg->bulk_out_enabled = 0;
+ }
+
__raise_exception(fsg->common, FSG_STATE_CONFIG_CHANGE, NULL);
}
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
index edb83c8825de..24d0ace3ed3c 100644
--- a/drivers/usb/gadget/udc/core.c
+++ b/drivers/usb/gadget/udc/core.c
@@ -89,7 +89,7 @@ EXPORT_SYMBOL_GPL(usb_ep_set_maxpacket_limit);
* configurable, with more generic names like "ep-a". (remember that for
* USB, "in" means "towards the USB host".)
*
- * This routine must be called in process context.
+ * This routine may be called in an atomic (interrupt) context.
*
* returns zero, or a negative error code.
*/
@@ -134,7 +134,7 @@ EXPORT_SYMBOL_GPL(usb_ep_enable);
* gadget drivers must call usb_ep_enable() again before queueing
* requests to the endpoint.
*
- * This routine must be called in process context.
+ * This routine may be called in an atomic (interrupt) context.
*
* returns zero, or a negative error code.
*/
diff --git a/include/trace/hooks/remoteproc.h b/include/trace/hooks/remoteproc.h
index 7cc5e93d2ebe..c39c2c1bffb3 100644
--- a/include/trace/hooks/remoteproc.h
+++ b/include/trace/hooks/remoteproc.h
@@ -12,10 +12,16 @@
struct rproc;
+/* When recovery succeeds */
DECLARE_HOOK(android_vh_rproc_recovery,
TP_PROTO(struct rproc *rproc),
TP_ARGS(rproc));
+/* When recovery mode is enabled or disabled by sysfs */
+DECLARE_HOOK(android_vh_rproc_recovery_set,
+ TP_PROTO(struct rproc *rproc),
+ TP_ARGS(rproc));
+
#endif /* _TRACE_HOOK_RPROC_H */
/* This part must be outside protection */
#include
diff --git a/include/trace/hooks/traps.h b/include/trace/hooks/traps.h
index 350a14369acc..f8d56a207afc 100644
--- a/include/trace/hooks/traps.h
+++ b/include/trace/hooks/traps.h
@@ -17,6 +17,16 @@ DECLARE_RESTRICTED_HOOK(android_rvh_do_undefinstr,
TP_ARGS(regs, user),
TP_CONDITION(!user));
+DECLARE_RESTRICTED_HOOK(android_rvh_do_bti,
+ TP_PROTO(struct pt_regs *regs, bool user),
+ TP_ARGS(regs, user),
+ TP_CONDITION(!user));
+
+DECLARE_RESTRICTED_HOOK(android_rvh_do_ptrauth_fault,
+ TP_PROTO(struct pt_regs *regs, unsigned int esr, bool user),
+ TP_ARGS(regs, esr, user),
+ TP_CONDITION(!user));
+
DECLARE_RESTRICTED_HOOK(android_rvh_bad_mode,
TP_PROTO(struct pt_regs *regs, unsigned int esr, int reason),
TP_ARGS(regs, reason, esr), 1);
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 939cdcbbf780..74ee2d1d16ce 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3871,7 +3871,9 @@ static void sync_entity_load_avg(struct sched_entity *se)
u64 last_update_time;
last_update_time = cfs_rq_last_update_time(cfs_rq);
+ trace_android_vh_prepare_update_load_avg_se(se, 0);
__update_load_avg_blocked_se(last_update_time, se);
+ trace_android_vh_finish_update_load_avg_se(se, 0);
}
/*
diff --git a/kernel/trace/tracing_map.c b/kernel/trace/tracing_map.c
index 4b50fc0cb12c..d63e51dde0d2 100644
--- a/kernel/trace/tracing_map.c
+++ b/kernel/trace/tracing_map.c
@@ -834,29 +834,35 @@ int tracing_map_init(struct tracing_map *map)
return err;
}
-static int cmp_entries_dup(const struct tracing_map_sort_entry **a,
- const struct tracing_map_sort_entry **b)
+static int cmp_entries_dup(const void *A, const void *B)
{
+ const struct tracing_map_sort_entry *a, *b;
int ret = 0;
- if (memcmp((*a)->key, (*b)->key, (*a)->elt->map->key_size))
+ a = *(const struct tracing_map_sort_entry **)A;
+ b = *(const struct tracing_map_sort_entry **)B;
+
+ if (memcmp(a->key, b->key, a->elt->map->key_size))
ret = 1;
return ret;
}
-static int cmp_entries_sum(const struct tracing_map_sort_entry **a,
- const struct tracing_map_sort_entry **b)
+static int cmp_entries_sum(const void *A, const void *B)
{
const struct tracing_map_elt *elt_a, *elt_b;
+ const struct tracing_map_sort_entry *a, *b;
struct tracing_map_sort_key *sort_key;
struct tracing_map_field *field;
tracing_map_cmp_fn_t cmp_fn;
void *val_a, *val_b;
int ret = 0;
- elt_a = (*a)->elt;
- elt_b = (*b)->elt;
+ a = *(const struct tracing_map_sort_entry **)A;
+ b = *(const struct tracing_map_sort_entry **)B;
+
+ elt_a = a->elt;
+ elt_b = b->elt;
sort_key = &elt_a->map->sort_key;
@@ -873,18 +879,21 @@ static int cmp_entries_sum(const struct tracing_map_sort_entry **a,
return ret;
}
-static int cmp_entries_key(const struct tracing_map_sort_entry **a,
- const struct tracing_map_sort_entry **b)
+static int cmp_entries_key(const void *A, const void *B)
{
const struct tracing_map_elt *elt_a, *elt_b;
+ const struct tracing_map_sort_entry *a, *b;
struct tracing_map_sort_key *sort_key;
struct tracing_map_field *field;
tracing_map_cmp_fn_t cmp_fn;
void *val_a, *val_b;
int ret = 0;
- elt_a = (*a)->elt;
- elt_b = (*b)->elt;
+ a = *(const struct tracing_map_sort_entry **)A;
+ b = *(const struct tracing_map_sort_entry **)B;
+
+ elt_a = a->elt;
+ elt_b = b->elt;
sort_key = &elt_a->map->sort_key;
@@ -989,10 +998,8 @@ static void sort_secondary(struct tracing_map *map,
struct tracing_map_sort_key *primary_key,
struct tracing_map_sort_key *secondary_key)
{
- int (*primary_fn)(const struct tracing_map_sort_entry **,
- const struct tracing_map_sort_entry **);
- int (*secondary_fn)(const struct tracing_map_sort_entry **,
- const struct tracing_map_sort_entry **);
+ int (*primary_fn)(const void *, const void *);
+ int (*secondary_fn)(const void *, const void *);
unsigned i, start = 0, n_sub = 1;
if (is_key(map, primary_key->field_idx))
@@ -1061,8 +1068,7 @@ int tracing_map_sort_entries(struct tracing_map *map,
unsigned int n_sort_keys,
struct tracing_map_sort_entry ***sort_entries)
{
- int (*cmp_entries_fn)(const struct tracing_map_sort_entry **,
- const struct tracing_map_sort_entry **);
+ int (*cmp_entries_fn)(const void *, const void *);
struct tracing_map_sort_entry *sort_entry, **entries;
int i, n_entries, ret;
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 0d1e0b97d1c9..d5615977e7f3 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1749,7 +1749,7 @@ static void _vm_unmap_aliases(unsigned long start, unsigned long end, int flush)
rcu_read_lock();
list_for_each_entry_rcu(vb, &vbq->free, free_list) {
spin_lock(&vb->lock);
- if (vb->dirty) {
+ if (vb->dirty && vb->dirty != VMAP_BBMAP_BITS) {
unsigned long va_start = vb->va->va_start;
unsigned long s, e;