From 33d546a1e1f8c28f1da411c769e155e771514b53 Mon Sep 17 00:00:00 2001 From: David Chao Date: Wed, 7 Apr 2021 17:49:53 +0800 Subject: [PATCH 1/4] ANDROID: thermal: Add vendor thermal_pm_notify_suspend function Currently, most of the thermal_zones are IRQ capable and they do not need to be updated while resuming. To improve the system performance and reduce the resume time. Add a vendor function to check if the thermal_zone is not IRQ capable and needs to be updated. Bug: 170905417 Bug: 336700210 Bug: 332221925 Test: boot and vendor function worked properly. Change-Id: I9389985bba29b551a7a20b55e1ed26b6c4da9b3d Signed-off-by: David Chao Signed-off-by: Dylan Chang (cherry picked from commit 353c3de3f112132e10d8649a97f0a03fad28c745) --- drivers/android/vendor_hooks.c | 1 + drivers/thermal/thermal_core.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 50c64db5d63d..2780a685e9f7 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -136,6 +136,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ftrace_oops_exit); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ftrace_size_check); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ftrace_format_check); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ftrace_dump_buffer); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_thermal_pm_notify_suspend); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_fill_prdt); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ufs_reprogram_all_keys); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_ufs_complete_init); diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index f334960f34e6..fa838001e6a7 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1454,6 +1454,7 @@ static int thermal_pm_notify(struct notifier_block *nb, unsigned long mode, void *_unused) { struct thermal_zone_device *tz; + int irq_wakeable = 0; switch (mode) { case PM_HIBERNATION_PREPARE: @@ -1466,6 +1467,11 @@ static int thermal_pm_notify(struct notifier_block *nb, case PM_POST_SUSPEND: atomic_set(&in_suspend, 0); list_for_each_entry(tz, &thermal_tz_list, node) { + + trace_android_vh_thermal_pm_notify_suspend(tz, &irq_wakeable); + if (irq_wakeable) + continue; + thermal_zone_device_init(tz); thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED); From 941f2779d6933e4b30fa9689870c96b637f67f06 Mon Sep 17 00:00:00 2001 From: Dylan Chang Date: Mon, 1 Apr 2024 14:44:44 +0800 Subject: [PATCH 2/4] ANDROID: GKI: Add symbol list for Nothing Add symbol list for Nothing at the first time 1 Added function: [A] 'function int __traceiter_android_vh_thermal_pm_notify_suspend(void*, thermal_zone_device*, int*)' 1 Added variable: [A] 'tracepoint __tracepoint_android_vh_thermal_pm_notify_suspend' Bug: 336700210 Bug: 332221925 Change-Id: I07b727a5c340f8f1cc7fb72e16a1c47881aa348b Signed-off-by: Dylan Chang (cherry picked from commit 931187cc187d01074d388bd52a621ae92aa9bfad) --- android/abi_gki_aarch64.stg | 27 +++++++++++++++++++++++++++ android/abi_gki_aarch64_nothing | 5 +++++ 2 files changed, 32 insertions(+) diff --git a/android/abi_gki_aarch64.stg b/android/abi_gki_aarch64.stg index e0461281b165..1a76ec6869df 100644 --- a/android/abi_gki_aarch64.stg +++ b/android/abi_gki_aarch64.stg @@ -319521,6 +319521,13 @@ function { parameter_id: 0x1aeeade4 parameter_id: 0x052fac00 } +function { + id: 0x9b30f926 + return_type_id: 0x6720d32f + parameter_id: 0x18bd6530 + parameter_id: 0x26e55184 + parameter_id: 0x13580d6c +} function { id: 0x9b326937 return_type_id: 0x6720d32f @@ -341021,6 +341028,15 @@ elf_symbol { type_id: 0x9bb5b719 full_name: "__traceiter_android_vh_test_clear_look_around_ref" } +elf_symbol { + id: 0x40d428a7 + name: "__traceiter_android_vh_thermal_pm_notify_suspend" + is_defined: true + symbol_type: FUNCTION + crc: 0x8d0ef19f + type_id: 0x9b30f926 + full_name: "__traceiter_android_vh_thermal_pm_notify_suspend" +} elf_symbol { id: 0x6befbf23 name: "__traceiter_android_vh_thermal_power_cap" @@ -345206,6 +345222,15 @@ elf_symbol { type_id: 0x18ccbd2c full_name: "__tracepoint_android_vh_test_clear_look_around_ref" } +elf_symbol { + id: 0xafd4e4b1 + name: "__tracepoint_android_vh_thermal_pm_notify_suspend" + is_defined: true + symbol_type: OBJECT + crc: 0x8224984a + type_id: 0x18ccbd2c + full_name: "__tracepoint_android_vh_thermal_pm_notify_suspend" +} elf_symbol { id: 0x6f25dd05 name: "__tracepoint_android_vh_thermal_power_cap" @@ -404377,6 +404402,7 @@ interface { symbol_id: 0x34a01a22 symbol_id: 0xdd9dd67b symbol_id: 0x48f0cf25 + symbol_id: 0x40d428a7 symbol_id: 0x6befbf23 symbol_id: 0x226cc38b symbol_id: 0xeecc1529 @@ -404842,6 +404868,7 @@ interface { symbol_id: 0x3fe0157c symbol_id: 0xe5bf742d symbol_id: 0x4ef2c337 + symbol_id: 0xafd4e4b1 symbol_id: 0x6f25dd05 symbol_id: 0xa5c71571 symbol_id: 0xfa3284c7 diff --git a/android/abi_gki_aarch64_nothing b/android/abi_gki_aarch64_nothing index 9058fe53da49..ae40328eb56b 100644 --- a/android/abi_gki_aarch64_nothing +++ b/android/abi_gki_aarch64_nothing @@ -217,3 +217,8 @@ # required by mount_state.ko get_fs_type iterate_supers_type + +# required by thermal_core_skip_irq.ko + __traceiter_android_vh_thermal_pm_notify_suspend + __tracepoint_android_vh_thermal_pm_notify_suspend + tracepoint_probe_register From e119fea05420e9f514fe030848e05e0995d990c2 Mon Sep 17 00:00:00 2001 From: Dylan Chang Date: Fri, 12 Apr 2024 19:41:27 +0800 Subject: [PATCH 3/4] ANDROID: GKI: Add symbol list for Nothing 2 function symbol(s) added 'char* dentry_path_raw(const struct dentry*, char*, int)' 'int fscrypt_file_open(struct inode*, struct file*)' Bug: 336700210 Change-Id: I20b224d5336753a1fa8783178be60dbaae35b3ba Signed-off-by: Dylan Chang --- android/abi_gki_aarch64.stg | 27 +++++++++++++++++++++++++++ android/abi_gki_aarch64_nothing | 2 ++ 2 files changed, 29 insertions(+) diff --git a/android/abi_gki_aarch64.stg b/android/abi_gki_aarch64.stg index 1a76ec6869df..d156ed53ae07 100644 --- a/android/abi_gki_aarch64.stg +++ b/android/abi_gki_aarch64.stg @@ -301484,6 +301484,13 @@ function { return_type_id: 0x27b71910 parameter_id: 0x1d44326e } +function { + id: 0x30d98140 + return_type_id: 0x0483e6f8 + parameter_id: 0x3bb11c92 + parameter_id: 0x0483e6f8 + parameter_id: 0x6720d32f +} function { id: 0x30dc6fbb return_type_id: 0x17dabdcd @@ -354059,6 +354066,15 @@ elf_symbol { type_id: 0x1f15d172 full_name: "delayed_work_timer_fn" } +elf_symbol { + id: 0x431b7cda + name: "dentry_path_raw" + is_defined: true + symbol_type: FUNCTION + crc: 0xa4942c22 + type_id: 0x30d98140 + full_name: "dentry_path_raw" +} elf_symbol { id: 0x1ef313dc name: "des_expand_key" @@ -364555,6 +364571,15 @@ elf_symbol { type_id: 0x96b04c18 full_name: "fs_param_is_u32" } +elf_symbol { + id: 0xbc2aa09b + name: "fscrypt_file_open" + is_defined: true + symbol_type: FUNCTION + crc: 0x54e4c19d + type_id: 0x9b022eae + full_name: "fscrypt_file_open" +} elf_symbol { id: 0x196ad62a name: "fsg_common_create_luns" @@ -405851,6 +405876,7 @@ interface { symbol_id: 0xf666562b symbol_id: 0xa5179b7b symbol_id: 0xc1583575 + symbol_id: 0x431b7cda symbol_id: 0x1ef313dc symbol_id: 0x67daf3cf symbol_id: 0xe5161e20 @@ -407015,6 +407041,7 @@ interface { symbol_id: 0x9a2423a0 symbol_id: 0x6c9f28bc symbol_id: 0x35a180e7 + symbol_id: 0xbc2aa09b symbol_id: 0x196ad62a symbol_id: 0x804c5038 symbol_id: 0x07715f1a diff --git a/android/abi_gki_aarch64_nothing b/android/abi_gki_aarch64_nothing index ae40328eb56b..2a1b010e4b86 100644 --- a/android/abi_gki_aarch64_nothing +++ b/android/abi_gki_aarch64_nothing @@ -42,6 +42,7 @@ create_empty_buffers current_time current_umask + dentry_path_raw d_find_alias d_instantiate discard_new_inode @@ -69,6 +70,7 @@ __folio_lock __folio_put fs_bio_set + fscrypt_file_open fs_param_is_string fs_param_is_u32 __fs_parse From 5b80c8852557d24c2771da11044933210a92f543 Mon Sep 17 00:00:00 2001 From: Andre Ding Date: Wed, 17 Apr 2024 20:23:20 +0530 Subject: [PATCH 4/4] ANDROID: abi_gki_aarch64_qcom: Update symbol list Symbols updated to QCOM abi symbol list for Marvell Phy and Mdio Bus Mux: ethnl_cable_test_amplitude ethnl_cable_test_pulse ethnl_cable_test_step genphy_check_and_restart_aneg genphy_read_status_fixed of_mdio_find_bus phy_config_aneg phy_gbit_fibre_features Bug: 335414016 Bug: 336924764 Change-Id: I1fa732935cb1a33bcde782fdfe38f5b3fcfae4cb Signed-off-by: Andre Ding (cherry picked from commit 692e3553d2e90f8605312e75deecb939bb1659ab) --- android/abi_gki_aarch64.stg | 106 +++++++++++++++++++++++++++++++++++ android/abi_gki_aarch64_qcom | 8 +++ 2 files changed, 114 insertions(+) diff --git a/android/abi_gki_aarch64.stg b/android/abi_gki_aarch64.stg index d156ed53ae07..bd1dac8140ea 100644 --- a/android/abi_gki_aarch64.stg +++ b/android/abi_gki_aarch64.stg @@ -308496,6 +308496,13 @@ function { parameter_id: 0x6720d32f parameter_id: 0x6720d32f } +function { + id: 0x91725507 + return_type_id: 0x6720d32f + parameter_id: 0x3176a085 + parameter_id: 0x295c7202 + parameter_id: 0x29bf06ba +} function { id: 0x91726dda return_type_id: 0x6720d32f @@ -310757,6 +310764,14 @@ function { parameter_id: 0x3c07fb40 parameter_id: 0x11cfee5a } +function { + id: 0x92c80d88 + return_type_id: 0x6720d32f + parameter_id: 0x3176a085 + parameter_id: 0xc9082b19 + parameter_id: 0xc9082b19 + parameter_id: 0xc9082b19 +} function { id: 0x92cb9949 return_type_id: 0xf435685e @@ -311777,6 +311792,12 @@ function { return_type_id: 0x6720d32f parameter_id: 0x3863a91c } +function { + id: 0x93987df1 + return_type_id: 0x6720d32f + parameter_id: 0x3176a085 + parameter_id: 0x914dbfdc +} function { id: 0x9398dfdf return_type_id: 0x6720d32f @@ -329509,6 +329530,11 @@ function { parameter_id: 0xac0d3a85 parameter_id: 0x92233392 } +function { + id: 0xa395744b + return_type_id: 0x35d510c3 + parameter_id: 0x347303b4 +} function { id: 0xa3adbe6c return_type_id: 0x25b73daa @@ -363491,6 +363517,15 @@ elf_symbol { type_id: 0x1c31d966 full_name: "ether_setup" } +elf_symbol { + id: 0xc2ec4486 + name: "ethnl_cable_test_amplitude" + is_defined: true + symbol_type: FUNCTION + crc: 0xcaa7ffcf + type_id: 0x91725507 + full_name: "ethnl_cable_test_amplitude" +} elf_symbol { id: 0x592619b0 name: "ethnl_cable_test_fault_length" @@ -363500,6 +363535,15 @@ elf_symbol { type_id: 0x914a78cc full_name: "ethnl_cable_test_fault_length" } +elf_symbol { + id: 0xd3d73b52 + name: "ethnl_cable_test_pulse" + is_defined: true + symbol_type: FUNCTION + crc: 0xeed4092e + type_id: 0x93987df1 + full_name: "ethnl_cable_test_pulse" +} elf_symbol { id: 0xc00e9f7c name: "ethnl_cable_test_result" @@ -363509,6 +363553,15 @@ elf_symbol { type_id: 0x91726dda full_name: "ethnl_cable_test_result" } +elf_symbol { + id: 0x4d66a0fd + name: "ethnl_cable_test_step" + is_defined: true + symbol_type: FUNCTION + crc: 0xc62cb5bc + type_id: 0x92c80d88 + full_name: "ethnl_cable_test_step" +} elf_symbol { id: 0xfe219f57 name: "ethtool_convert_legacy_u32_to_link_mode" @@ -365507,6 +365560,15 @@ elf_symbol { type_id: 0x91dd4b0e full_name: "genphy_c45_read_status" } +elf_symbol { + id: 0x07b1add0 + name: "genphy_check_and_restart_aneg" + is_defined: true + symbol_type: FUNCTION + crc: 0x23d24b71 + type_id: 0x9068b671 + full_name: "genphy_check_and_restart_aneg" +} elf_symbol { id: 0x618539bc name: "genphy_handle_interrupt_no_ack" @@ -365552,6 +365614,15 @@ elf_symbol { type_id: 0x91dd4b0e full_name: "genphy_read_status" } +elf_symbol { + id: 0x97ef6102 + name: "genphy_read_status_fixed" + is_defined: true + symbol_type: FUNCTION + crc: 0x6761e7a9 + type_id: 0x91dd4b0e + full_name: "genphy_read_status_fixed" +} elf_symbol { id: 0xa94a7a92 name: "genphy_restart_aneg" @@ -378215,6 +378286,15 @@ elf_symbol { type_id: 0xd0b47295 full_name: "of_match_node" } +elf_symbol { + id: 0x62a72fbe + name: "of_mdio_find_bus" + is_defined: true + symbol_type: FUNCTION + crc: 0x5ab1b075 + type_id: 0xa395744b + full_name: "of_mdio_find_bus" +} elf_symbol { id: 0x23d1db24 name: "of_modalias_node" @@ -380567,6 +380647,15 @@ elf_symbol { type_id: 0x9f7fc723 full_name: "phy_calibrate" } +elf_symbol { + id: 0x4219bd3e + name: "phy_config_aneg" + is_defined: true + symbol_type: FUNCTION + crc: 0xd4984810 + type_id: 0x91dd4b0e + full_name: "phy_config_aneg" +} elf_symbol { id: 0xc278f4fa name: "phy_configure" @@ -380756,6 +380845,15 @@ elf_symbol { type_id: 0xbeab1c63 full_name: "phy_find_first" } +elf_symbol { + id: 0xd23d219e + name: "phy_gbit_fibre_features" + is_defined: true + symbol_type: OBJECT + crc: 0x9de31b2a + type_id: 0x607419c2 + full_name: "phy_gbit_fibre_features" +} elf_symbol { id: 0x0dfe21ad name: "phy_get" @@ -406921,8 +407019,11 @@ interface { symbol_id: 0x9c46e3cf symbol_id: 0xd4d3c19b symbol_id: 0x3276ffad + symbol_id: 0xc2ec4486 symbol_id: 0x592619b0 + symbol_id: 0xd3d73b52 symbol_id: 0xc00e9f7c + symbol_id: 0x4d66a0fd symbol_id: 0xfe219f57 symbol_id: 0x6e69a2b9 symbol_id: 0xd3082d07 @@ -407145,11 +407246,13 @@ interface { symbol_id: 0x607c937c symbol_id: 0xd99708c7 symbol_id: 0xa3a0e5a9 + symbol_id: 0x07b1add0 symbol_id: 0x618539bc symbol_id: 0xe00705b3 symbol_id: 0xcaf802e6 symbol_id: 0xbaba47ed symbol_id: 0x67f44b83 + symbol_id: 0x97ef6102 symbol_id: 0xa94a7a92 symbol_id: 0x855de755 symbol_id: 0xb3b7ca78 @@ -408557,6 +408660,7 @@ interface { symbol_id: 0x318c8fe5 symbol_id: 0x16c4cdb3 symbol_id: 0x3965b143 + symbol_id: 0x62a72fbe symbol_id: 0x23d1db24 symbol_id: 0x8ac60fa1 symbol_id: 0xc9f43d6f @@ -408818,6 +408922,7 @@ interface { symbol_id: 0x5fa10488 symbol_id: 0x9db95d0c symbol_id: 0x81e2991f + symbol_id: 0x4219bd3e symbol_id: 0xc278f4fa symbol_id: 0x9c15bd7a symbol_id: 0x866cf90c @@ -408839,6 +408944,7 @@ interface { symbol_id: 0xcd9e585e symbol_id: 0x69eeb51b symbol_id: 0x6cf83bd0 + symbol_id: 0xd23d219e symbol_id: 0x0dfe21ad symbol_id: 0x7de90fab symbol_id: 0x30e87de6 diff --git a/android/abi_gki_aarch64_qcom b/android/abi_gki_aarch64_qcom index da4958245f91..0fafde6e16e1 100644 --- a/android/abi_gki_aarch64_qcom +++ b/android/abi_gki_aarch64_qcom @@ -1094,8 +1094,11 @@ ether_setup eth_header_parse eth_mac_addr + ethnl_cable_test_amplitude ethnl_cable_test_fault_length + ethnl_cable_test_pulse ethnl_cable_test_result + ethnl_cable_test_step eth_platform_get_mac_address eth_prepare_mac_addr_change ethtool_convert_legacy_u32_to_link_mode @@ -1212,10 +1215,12 @@ genphy_c45_check_and_restart_aneg genphy_c45_pma_setup_forced genphy_c45_read_status + genphy_check_and_restart_aneg __genphy_config_aneg genphy_read_abilities genphy_read_mmd_unsupported genphy_read_status + genphy_read_status_fixed genphy_restart_aneg genphy_resume genphy_soft_reset @@ -2197,6 +2202,7 @@ of_match_device of_match_node __of_mdiobus_register + of_mdio_find_bus of_modalias_node of_n_addr_cells of_node_name_eq @@ -2337,6 +2343,7 @@ perf_trace_run_bpf_submit phy_attached_info phy_calibrate + phy_config_aneg phy_device_free phy_device_register phy_do_ioctl_running @@ -2346,6 +2353,7 @@ phy_ethtool_get_wol phy_ethtool_set_wol phy_exit + phy_gbit_fibre_features phy_init phy_init_eee phy_init_hw