From 1ce2b0454d398b61ddf3509700c36c7b797614ab Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Thu, 12 Dec 2019 10:49:41 -0700 Subject: [PATCH 01/12] PM / devfreq: Export tracepoint symbols The following tracepoints were added to include/trace/events/power.h but not exported: ERROR: "__tracepoint_memlat_dev_update" [drivers/devfreq/governor_memlat.ko] ERROR: "__tracepoint_memlat_dev_meas" [drivers/devfreq/governor_memlat.ko] ERROR: "__tracepoint_cache_hwmon_update" [drivers/devfreq/governor_cache_hwmon.ko] ERROR: "__tracepoint_cache_hwmon_meas" [drivers/devfreq/governor_cache_hwmon.ko] ERROR: "__tracepoint_bw_hwmon_update" [drivers/devfreq/governor_bw_hwmon.ko] ERROR: "__tracepoint_bw_hwmon_meas" [drivers/devfreq/governor_bw_hwmon.ko] Change-Id: Ic0dedbadbee6533cba9ae312ab764873ab72a342 Signed-off-by: Jordan Crouse --- kernel/trace/power-traces.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/trace/power-traces.c b/kernel/trace/power-traces.c index 21bb161c2316..95d81de6589e 100644 --- a/kernel/trace/power-traces.c +++ b/kernel/trace/power-traces.c @@ -19,3 +19,9 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(cpu_idle); EXPORT_TRACEPOINT_SYMBOL_GPL(cpu_frequency); EXPORT_TRACEPOINT_SYMBOL_GPL(powernv_throttle); +EXPORT_TRACEPOINT_SYMBOL(memlat_dev_update); +EXPORT_TRACEPOINT_SYMBOL(memlat_dev_meas); +EXPORT_TRACEPOINT_SYMBOL(cache_hwmon_update); +EXPORT_TRACEPOINT_SYMBOL(cache_hwmon_meas); +EXPORT_TRACEPOINT_SYMBOL(bw_hwmon_update); +EXPORT_TRACEPOINT_SYMBOL(bw_hwmon_meas); From aa46100ccb4fc7fa3a5bd8e02f6ede02c306770f Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Thu, 12 Dec 2019 10:39:26 -0700 Subject: [PATCH 02/12] drivers: pinctrl: Export msm_qup_write Commit 9c0e5c705430 ("drivers: pinctrl: Add support for read/write of QUP registers") added msm_qup_write but didn't export it resulting in the following error: ERROR: "msm_qup_write" [drivers/i3c/master/i3c-master-msm-geni.ko] undefined! Change-Id: Ic0dedbadc6822cc2a8afe69ff71a9cd95e7c8665 Signed-off-by: Jordan Crouse --- drivers/pinctrl/qcom/pinctrl-msm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index a45413de6dff..a43706711b9c 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -1266,6 +1266,7 @@ int msm_qup_write(u32 mode, u32 val) return -ENOENT; } +EXPORT_SYMBOL(msm_qup_write); int msm_qup_read(unsigned int mode) { From 4a8505270f6f44042555e410ac4fc86909bbf3b1 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Thu, 12 Dec 2019 10:28:11 -0700 Subject: [PATCH 03/12] iommu: dma-mapping-fast: Export symbols Export symbols to avoid the following errors: ERROR: "fast_smmu_init_mapping" [drivers/iommu/arm-smmu-mod.ko] undefined! ERROR: "fast_smmu_put_dma_cookie" [drivers/iommu/arm-smmu-mod.ko] undefined! Change-Id: Ic0dedbad2b4f1179ea35d87e8189b316a176d3f2 Signed-off-by: Jordan Crouse --- drivers/iommu/dma-mapping-fast.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/dma-mapping-fast.c b/drivers/iommu/dma-mapping-fast.c index 290ccc4b4032..f1beb0d6e599 100644 --- a/drivers/iommu/dma-mapping-fast.c +++ b/drivers/iommu/dma-mapping-fast.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */ #include @@ -1023,6 +1023,7 @@ void fast_smmu_put_dma_cookie(struct iommu_domain *domain) kfree(fast); domain->iova_cookie = NULL; } +EXPORT_SYMBOL(fast_smmu_put_dma_cookie); const struct dma_map_ops *fast_smmu_get_dma_ops(void) { @@ -1076,3 +1077,4 @@ finish: fast_smmu_reserve_pci_windows(dev, fast); return 0; } +EXPORT_SYMBOL(fast_smmu_init_mapping); From fd7a8f764805161c9b63f08be5cdbb0ec6450b45 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Thu, 12 Dec 2019 10:36:40 -0700 Subject: [PATCH 04/12] dma-buf: Export missing dma_buf_ref_mod symbol Export dma_buf_ref_mod to avoid the following errors: ERROR: "dma_buf_ref_mod" [drivers/gpu/drm/drm.ko] undefined! ERROR: "dma_buf_ref_mod" [drivers/gpu/drm/udl/udl.ko] undefined! ERROR: "dma_buf_ref_mod" [drivers/gpu/drm/tegra/tegra-drm.ko] undefined! ERROR: "dma_buf_ref_mod" [drivers/media/platform/msm/cvp/msm-cvp.ko] undefined! Change-Id: Ic0dedbadd41dbd537198ec22326494d0a3906f52 Signed-off-by: Jordan Crouse --- drivers/dma-buf/dma-buf-ref.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma-buf/dma-buf-ref.c b/drivers/dma-buf/dma-buf-ref.c index 09aa80681ac3..1adbb837d465 100644 --- a/drivers/dma-buf/dma-buf-ref.c +++ b/drivers/dma-buf/dma-buf-ref.c @@ -77,6 +77,7 @@ void dma_buf_ref_mod(struct msm_dma_buf *msm_dma_buf, int nr) dma_buf_ref_insert_handle(msm_dma_buf, handle, nr); } +EXPORT_SYMBOL(dma_buf_ref_mod); /** * Called with dmabuf->lock held From c226b6e61789985a49c380c227941e4973737929 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Wed, 11 Dec 2019 16:08:13 -0700 Subject: [PATCH 05/12] thermal: Fix trace_thermal_zone_trip Commit 50dc9bdad72a ("drivers: thermal: Add a snapshot of thermal framework") changed the API for trace_thermal_zone_trip but didn't update all the callers. Change-Id: Ic0dedbade25d8c1250d389daa3d035dd3522028d Signed-off-by: Jordan Crouse --- drivers/thermal/fair_share.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/fair_share.c b/drivers/thermal/fair_share.c index afd99f668c65..cc22195af8b5 100644 --- a/drivers/thermal/fair_share.c +++ b/drivers/thermal/fair_share.c @@ -40,7 +40,7 @@ static int get_trip_level(struct thermal_zone_device *tz) */ if (count > 0) { tz->ops->get_trip_type(tz, count - 1, &trip_type); - trace_thermal_zone_trip(tz, count - 1, trip_type); + trace_thermal_zone_trip(tz, count - 1, trip_type, true); } return count; From 9b5fe09496751b33c32e3dcc69e4f2fbb2184350 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Wed, 11 Dec 2019 15:52:12 -0700 Subject: [PATCH 06/12] msm: kgsl: Remove unused header from gpu_bwmon Remove a unused header from gpu_bwmon to avoid a compile error. Change-Id: Ic0dedbad123f5b847e97660159c982c59f42a899 Signed-off-by: Jordan Crouse --- drivers/gpu/msm/governor_gpubw_mon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/msm/governor_gpubw_mon.c b/drivers/gpu/msm/governor_gpubw_mon.c index f133b37fb4ca..8813cc60c921 100644 --- a/drivers/gpu/msm/governor_gpubw_mon.c +++ b/drivers/gpu/msm/governor_gpubw_mon.c @@ -1,13 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. */ #include #include #include -#include "devfreq_trace.h" #include "../../devfreq/governor.h" #include "msm_adreno_devfreq.h" From 655e48c303a2648919d0926942d4e97c6462e6d9 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Wed, 11 Dec 2019 14:36:02 -0700 Subject: [PATCH 07/12] PM / devfreq: memlat: Use the cpumask_pr_args macros When using the %*pbl printk format a special macro is needed to decode the cpu mask and format it correctly. Fixes: 74b58a6 ("PM / devfreq: memlat: Aggregate memlat mons under a controller") Change-Id: Ic0dedbada86cf9cec02b1a5292aaf05f50c0c42f Signed-off-by: Jordan Crouse --- drivers/devfreq/arm-memlat-mon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/devfreq/arm-memlat-mon.c b/drivers/devfreq/arm-memlat-mon.c index 9a554cfd3154..6e229ebeda96 100644 --- a/drivers/devfreq/arm-memlat-mon.c +++ b/drivers/devfreq/arm-memlat-mon.c @@ -607,7 +607,8 @@ static int memlat_mon_probe(struct platform_device *pdev, bool is_compute) if (!cpumask_subset(&mon->cpus, &cpu_grp->cpus)) { dev_err(dev, "Mon CPUs must be a subset of cpu_grp CPUs. mon=%*pbl cpu_grp=%*pbl\n", - mon->cpus, cpu_grp->cpus); + cpumask_pr_args(&mon->cpus), + cpumask_pr_args(&cpu_grp->cpus)); ret = -EINVAL; goto unlock_out; } From 38a628d44f5465bad03187d85dbe3416f6866f7c Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Wed, 11 Dec 2019 14:42:27 -0700 Subject: [PATCH 08/12] PM /devfreq: Fix function prototype Replace #ifdef with IS_ENABLED to make sure that the memlat prototypes are available for a module build. Fixes: a4e0d26 ("PM / devfreq: Introduce a memory-latency governor") Change-Id: Ic0dedbade40e23bb148bbb9117c4a9b63e419111 Signed-off-by: Jordan Crouse --- drivers/devfreq/governor_memlat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/governor_memlat.h b/drivers/devfreq/governor_memlat.h index 7fe65f4caf8c..a7e79b241290 100644 --- a/drivers/devfreq/governor_memlat.h +++ b/drivers/devfreq/governor_memlat.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2015-2017, 2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2017, 2019-2020, The Linux Foundation. All rights reserved. */ #ifndef _GOVERNOR_MEMLAT_H @@ -68,7 +68,7 @@ struct memlat_hwmon { bool should_ignore_df_monitor; }; -#ifdef CONFIG_DEVFREQ_GOV_MEMLAT +#if IS_ENABLED(CONFIG_DEVFREQ_GOV_MEMLAT) int register_memlat(struct device *dev, struct memlat_hwmon *hw); int register_compute(struct device *dev, struct memlat_hwmon *hw); int update_memlat(struct memlat_hwmon *hw); From d54e1fcbed272cb554bbcf857433e907936ecc2d Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Fri, 6 Dec 2019 11:14:47 -0700 Subject: [PATCH 09/12] clocks: Add a missing header to clk/qcom/common.h Add to resolve a dependency for struct clk_hw. Change-Id: Ic0dedbadbece86ff0a5349edec356f9b211c7989 Signed-off-by: Jordan Crouse --- drivers/clk/qcom/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h index 71c714f619b7..8c5db6e098d7 100644 --- a/drivers/clk/qcom/common.h +++ b/drivers/clk/qcom/common.h @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -/* Copyright (c) 2014, 2018-2019, The Linux Foundation. All rights reserved. */ +/* Copyright (c) 2014, 2018-2020, The Linux Foundation. All rights reserved. */ #ifndef __QCOM_CLK_COMMON_H__ #define __QCOM_CLK_COMMON_H__ +#include #include struct platform_device; @@ -12,7 +13,6 @@ struct clk_regmap; struct qcom_reset_map; struct regmap; struct freq_tbl; -struct clk_hw; #define PLL_LOCK_COUNT_SHIFT 8 #define PLL_LOCK_COUNT_MASK 0x3f From 2e840e1daf1cc5cb1bdb4b7598fa86ce5ed8bd02 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Thu, 5 Dec 2019 12:25:07 -0700 Subject: [PATCH 10/12] PM / devfreq: Fix CONFIG check for cache HW monitor prototype Commit 2094bed75267 ("PM / devfreq: Add cache HW monitor governor") brought in the cache HW monitor with an incorrect check for CONFIG_DEVFREQ_GOV_QCOM_CACHE_HWMON that fails when the governor is built as a module. Change-Id: Ic0dedbadefc4885486660d32226e6dd89e006a11 Signed-off-by: Jordan Crouse --- drivers/devfreq/governor_bw_hwmon.h | 4 ++-- drivers/devfreq/governor_cache_hwmon.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/devfreq/governor_bw_hwmon.h b/drivers/devfreq/governor_bw_hwmon.h index 576dafbc651f..8cde9ce4c265 100644 --- a/drivers/devfreq/governor_bw_hwmon.h +++ b/drivers/devfreq/governor_bw_hwmon.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2014-2016, 2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2016, 2019-2020, The Linux Foundation. All rights reserved. */ #ifndef _GOVERNOR_BW_HWMON_H @@ -58,7 +58,7 @@ struct bw_hwmon { struct devfreq *df; }; -#ifdef CONFIG_DEVFREQ_GOV_QCOM_BW_HWMON +#if IS_ENABLED(CONFIG_DEVFREQ_GOV_QCOM_BW_HWMON) int register_bw_hwmon(struct device *dev, struct bw_hwmon *hwmon); int update_bw_hwmon(struct bw_hwmon *hwmon); int bw_hwmon_sample_end(struct bw_hwmon *hwmon); diff --git a/drivers/devfreq/governor_cache_hwmon.h b/drivers/devfreq/governor_cache_hwmon.h index 26e7313a841f..4d5aa3dc7918 100644 --- a/drivers/devfreq/governor_cache_hwmon.h +++ b/drivers/devfreq/governor_cache_hwmon.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2014, 2016, 2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2014, 2016, 2019-2020, The Linux Foundation. All rights reserved. */ #ifndef _GOVERNOR_CACHE_HWMON_H @@ -46,7 +46,7 @@ struct cache_hwmon { struct devfreq *df; }; -#ifdef CONFIG_DEVFREQ_GOV_QCOM_CACHE_HWMON +#if IS_ENABLED(CONFIG_DEVFREQ_GOV_QCOM_CACHE_HWMON) int register_cache_hwmon(struct device *dev, struct cache_hwmon *hwmon); int update_cache_hwmon(struct cache_hwmon *hwmon); #else From 646129c1f1c4faba2c7138b632bf473855b626fa Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Fri, 6 Dec 2019 14:08:36 -0700 Subject: [PATCH 11/12] drivers: qcom: Fix a parameter for sysfs_attr_init() Add back a missing pointer reference. Fixes: 89f1fad ("drivers: qcom: Add SoC sleep stats driver") Change-Id: Ic0dedbad6eb8554f34ee366c68092b623f776714 Signed-off-by: Jordan Crouse --- drivers/soc/qcom/soc_sleep_stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/soc_sleep_stats.c b/drivers/soc/qcom/soc_sleep_stats.c index 3aff2e2983d8..c7beb005a0af 100644 --- a/drivers/soc/qcom/soc_sleep_stats.c +++ b/drivers/soc/qcom/soc_sleep_stats.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2011-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2020, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "%s: " fmt, __func__ @@ -140,7 +140,7 @@ static int soc_sleep_stats_create_sysfs(struct platform_device *pdev, if (!drv->kobj) return -ENOMEM; - sysfs_attr_init(drv->ka.attr); + sysfs_attr_init(&drv->ka.attr); drv->ka.attr.mode = 0444; drv->ka.attr.name = "stats"; drv->ka.show = stats_show; From ea2e374e45f26f88aa8cff26e535ef2664084c28 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Fri, 6 Dec 2019 14:24:42 -0700 Subject: [PATCH 12/12] driver: soc: qcom: Fix function prototype Replace a #ifdef with a IS_ENABLED() to allow rpmh master stat to be built as a module. Fixes: 6d5e000 ("drivers: soc: qcom: snapshot of sleep drivers for Lahaina") Change-Id: Ic0dedbad11812a0bd932a9c0099dfb4632842177 Signed-off-by: Jordan Crouse --- drivers/soc/qcom/rpmh_master_stat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/rpmh_master_stat.h b/drivers/soc/qcom/rpmh_master_stat.h index a281029c18e9..d006f9c58fa8 100644 --- a/drivers/soc/qcom/rpmh_master_stat.h +++ b/drivers/soc/qcom/rpmh_master_stat.h @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #ifndef __QCOM_RPM_STATS_LOG_H__ #define __QCOM_RPM_STATS_LOG_H__ -#if defined(CONFIG_QTI_RPM_STATS_LOG) +#if IS_ENABLED(CONFIG_QTI_RPM_STATS_LOG) void msm_rpmh_master_stats_update(void);