From 28de74186185e339123c86984729818d0d2d7f43 Mon Sep 17 00:00:00 2001 From: zhengding chen Date: Wed, 1 Dec 2021 11:03:40 +0800 Subject: [PATCH 1/6] ANDROID: workqueue: export symbol of the function wq_worker_comm() Export symbol of the function wq_worker_comm() in kernel/workqueue.c for dlkm to get the description of the kworker process. Bug: 208394207 Signed-off-by: zhengding chen Change-Id: I2e7ddd52a15e22e99e6596f16be08243af1bb473 --- kernel/workqueue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 6e15757cc073..4d09cece5cb9 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -4898,6 +4898,7 @@ void wq_worker_comm(char *buf, size_t size, struct task_struct *task) mutex_unlock(&wq_pool_attach_mutex); } +EXPORT_SYMBOL_GPL(wq_worker_comm); #ifdef CONFIG_SMP From 9e5446d7de8624a98069c6042daa3720d7387354 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 29 Nov 2021 10:36:12 -0800 Subject: [PATCH 2/6] FROMGIT: f2fs: show number of pending discard commands This information can be used to check how much time we need to give to issue all the discard commands. Bug: 206863097 Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim (cherry picked from commit fc4ae5492ca4afd7a8a9d261f4908b09f221d314 git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev) Change-Id: Ibd2f1d6c171f584ec9ca3817d9ea561db98f4693 --- Documentation/ABI/testing/sysfs-fs-f2fs | 5 +++++ fs/f2fs/sysfs.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs b/Documentation/ABI/testing/sysfs-fs-f2fs index 3d1f853c6681..759a8291ff4a 100644 --- a/Documentation/ABI/testing/sysfs-fs-f2fs +++ b/Documentation/ABI/testing/sysfs-fs-f2fs @@ -113,6 +113,11 @@ Contact: "Jaegeuk Kim" Description: Set timeout to issue discard commands during umount. Default: 5 secs +What: /sys/fs/f2fs//pending_discard +Date: November 2021 +Contact: "Jaegeuk Kim" +Description: Shows the number of pending discard commands in the queue. + What: /sys/fs/f2fs//max_victim_search Date: January 2014 Contact: "Jaegeuk Kim" diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index 15fe30d3aeb5..78c6c67b43d7 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sysfs.c @@ -117,6 +117,15 @@ static ssize_t sb_status_show(struct f2fs_attr *a, return sprintf(buf, "%lx\n", sbi->s_flag); } +static ssize_t pending_discard_show(struct f2fs_attr *a, + struct f2fs_sb_info *sbi, char *buf) +{ + if (!SM_I(sbi)->dcc_info) + return -EINVAL; + return sprintf(buf, "%llu\n", (unsigned long long)atomic_read( + &SM_I(sbi)->dcc_info->discard_cmd_cnt)); +} + static ssize_t features_show(struct f2fs_attr *a, struct f2fs_sb_info *sbi, char *buf) { @@ -713,6 +722,7 @@ F2FS_GENERAL_RO_ATTR(unusable); F2FS_GENERAL_RO_ATTR(encoding); F2FS_GENERAL_RO_ATTR(mounted_time_sec); F2FS_GENERAL_RO_ATTR(main_blkaddr); +F2FS_GENERAL_RO_ATTR(pending_discard); #ifdef CONFIG_F2FS_STAT_FS F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, cp_foreground_calls, cp_count); F2FS_STAT_ATTR(STAT_INFO, f2fs_stat_info, cp_background_calls, bg_cp_count); @@ -778,6 +788,7 @@ static struct attribute *f2fs_attrs[] = { ATTR_LIST(main_blkaddr), ATTR_LIST(max_small_discards), ATTR_LIST(discard_granularity), + ATTR_LIST(pending_discard), ATTR_LIST(batched_trim_sections), ATTR_LIST(ipu_policy), ATTR_LIST(min_ipu_util), From 84881c68b172533d3b92ce4d323106db310f1c5e Mon Sep 17 00:00:00 2001 From: Jindong Yue Date: Tue, 30 Nov 2021 13:41:27 +0800 Subject: [PATCH 3/6] ANDROID: GKI: Export sched_clock_register clocksource driver may use sched_clock_register to resigter itself as a sched_clock source. Export it to support building such driver as module, like timer-imx-tpm.c Bug: 194108974 Signed-off-by: Jindong Yue Change-Id: Id23f3da624a1e70fc1a44daf6f827c03dc1d053d --- kernel/time/sched_clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c index d5ab3fbc191c..6740dd02a402 100644 --- a/kernel/time/sched_clock.c +++ b/kernel/time/sched_clock.c @@ -150,8 +150,7 @@ static enum hrtimer_restart sched_clock_poll(struct hrtimer *hrt) return HRTIMER_RESTART; } -void __init -sched_clock_register(u64 (*read)(void), int bits, unsigned long rate) +void sched_clock_register(u64 (*read)(void), int bits, unsigned long rate) { u64 res, wrap, new_mask, new_epoch, cyc, ns; u32 new_mult, new_shift; @@ -225,6 +224,7 @@ sched_clock_register(u64 (*read)(void), int bits, unsigned long rate) pr_debug("Registered %pS as sched_clock source\n", read); } +EXPORT_SYMBOL_GPL(sched_clock_register); void __init generic_sched_clock_init(void) { From 80c1cef2d15078ea1edccba6e9320da7c4dbf6e5 Mon Sep 17 00:00:00 2001 From: Jindong Yue Date: Tue, 30 Nov 2021 13:42:25 +0800 Subject: [PATCH 4/6] ANDROID: GKI: Export clocksource_mmio_init Export clocksource_mmio_init and clocksource_mmio_readl_up to support building clocksource driver as module. Bug: 194108974 Signed-off-by: Jindong Yue Change-Id: I63bab35efa6ca2c8b0c6283f6d42c13db66568af --- drivers/clocksource/mmio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c index 9de751531831..826dcc42629c 100644 --- a/drivers/clocksource/mmio.c +++ b/drivers/clocksource/mmio.c @@ -21,6 +21,7 @@ u64 clocksource_mmio_readl_up(struct clocksource *c) { return (u64)readl_relaxed(to_mmio_clksrc(c)->reg); } +EXPORT_SYMBOL_GPL(clocksource_mmio_readl_up); u64 clocksource_mmio_readl_down(struct clocksource *c) { @@ -46,7 +47,7 @@ u64 clocksource_mmio_readw_down(struct clocksource *c) * @bits: Number of valid bits * @read: One of clocksource_mmio_read*() above */ -int __init clocksource_mmio_init(void __iomem *base, const char *name, +int clocksource_mmio_init(void __iomem *base, const char *name, unsigned long hz, int rating, unsigned bits, u64 (*read)(struct clocksource *)) { @@ -68,3 +69,4 @@ int __init clocksource_mmio_init(void __iomem *base, const char *name, return clocksource_register_hz(&cs->clksrc, hz); } +EXPORT_SYMBOL_GPL(clocksource_mmio_init); From 686cd3b2d83f17703d40013b5980c5f86788a74e Mon Sep 17 00:00:00 2001 From: Jindong Yue Date: Tue, 30 Nov 2021 10:52:01 +0800 Subject: [PATCH 5/6] ANDROID: ABI: Add symbols used by clocksource driver Export three symbols required by timer-imx-tpm.ko Leaf changes summary: 3 artifacts changed Changed leaf types summary: 0 leaf type changed Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable 3 Added functions: [A] 'function int clocksource_mmio_init(void*, const char*, unsigned long int, int, unsigned int, long long unsigned int (clocksource*)*)' [A] 'function u64 clocksource_mmio_readl_up(clocksource*)' [A] 'function void sched_clock_register(long long unsigned int ()*, int, unsigned long int)' Bug: 194108974 Signed-off-by: Jindong Yue Change-Id: I123996fc08740d3e4bf242a1913b22ca83b2e2b9 --- android/abi_gki_aarch64.xml | 48 +++++++++++++++++++++++++++---------- android/abi_gki_aarch64_imx | 11 +++++---- 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/android/abi_gki_aarch64.xml b/android/abi_gki_aarch64.xml index e1b6fe8384a7..05df1e0ec177 100644 --- a/android/abi_gki_aarch64.xml +++ b/android/abi_gki_aarch64.xml @@ -1050,6 +1050,8 @@ + + @@ -4223,6 +4225,7 @@ + @@ -6907,6 +6910,7 @@ + @@ -23291,7 +23295,7 @@ - + @@ -24514,6 +24518,7 @@ + @@ -30885,6 +30890,9 @@ + + + @@ -33566,7 +33574,7 @@ - + @@ -35808,6 +35816,10 @@ + + + + @@ -57831,7 +57843,7 @@ - + @@ -64894,9 +64906,6 @@ - - - @@ -75240,11 +75249,7 @@ - - - - - + @@ -112207,7 +112212,7 @@ - + @@ -119540,6 +119545,19 @@ + + + + + + + + + + + + + @@ -135874,6 +135892,12 @@ + + + + + + diff --git a/android/abi_gki_aarch64_imx b/android/abi_gki_aarch64_imx index d9b45b8fc993..fdff2573a2fc 100644 --- a/android/abi_gki_aarch64_imx +++ b/android/abi_gki_aarch64_imx @@ -67,6 +67,7 @@ clk_set_parent clk_set_rate clk_unprepare + clockevents_config_and_register complete complete_all completion_done @@ -590,6 +591,7 @@ of_alias_get_id of_clk_add_hw_provider of_clk_get + of_clk_get_by_name of_clk_hw_onecell_get of_count_phandle_with_args of_device_get_match_data @@ -911,6 +913,7 @@ tasklet_init tasklet_kill __tasklet_schedule + timer_of_init trace_event_buffer_commit trace_event_buffer_reserve trace_event_ignore_this_pid @@ -1822,7 +1825,6 @@ clk_unregister divider_get_val divider_recalc_rate - of_clk_get_by_name of_clk_get_from_provider # required by mxc-jpeg-encdec.ko @@ -2236,9 +2238,10 @@ dmabuf_page_pool_destroy dmabuf_page_pool_free -# required by timer-imx-sysctr.ko - clockevents_config_and_register - timer_of_init +# required by timer-imx-tpm.ko + clocksource_mmio_init + clocksource_mmio_readl_up + sched_clock_register # required by trusty-ipc.ko _copy_from_iter From 672d51b2a7fa01a15c9d55f33884808a115db18d Mon Sep 17 00:00:00 2001 From: Shuming Fan Date: Mon, 8 Feb 2021 17:40:42 -0600 Subject: [PATCH 6/6] UPSTREAM: ASoC: dapm: use component prefix when checking widget names commit ae4fc532244b3bb4d86c397418d980b0c6be1dfd upstream. On a TigerLake SoundWire platform, we see these warnings: [ 27.360086] rt5682 sdw:0:25d:5682:0: ASoC: DAPM unknown pin MICBIAS [ 27.360092] rt5682 sdw:0:25d:5682:0: ASoC: DAPM unknown pin Vref2 This is root-caused to the addition of a component prefix in the machine driver. The tests in soc-dapm should account for a prefix instead of reporting an invalid issue. Reported-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Shuming Fan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210208234043.59750-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Robert Lee Signed-off-by: Greg Kroah-Hartman Change-Id: I058fc8542e520d99dfa93fb47f49b43228ef43c6 Signed-off-by: Robert Lee --- sound/soc/soc-dapm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 148c095df27b..f4b380d6aecf 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2528,9 +2528,20 @@ static struct snd_soc_dapm_widget *dapm_find_widget( { struct snd_soc_dapm_widget *w; struct snd_soc_dapm_widget *fallback = NULL; + char prefixed_pin[80]; + const char *pin_name; + const char *prefix = soc_dapm_prefix(dapm); + + if (prefix) { + snprintf(prefixed_pin, sizeof(prefixed_pin), "%s %s", + prefix, pin); + pin_name = prefixed_pin; + } else { + pin_name = pin; + } for_each_card_widgets(dapm->card, w) { - if (!strcmp(w->name, pin)) { + if (!strcmp(w->name, pin_name)) { if (w->dapm == dapm) return w; else