diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2014-08-19 15:43:52 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 12:00:37 +0900 |
commit | 06e7eaeb3d022d8d345ce7c26b7b692679125fe0 (patch) | |
tree | b4c34f99222a7e5702c2e48a569562a021728560 /include/linux | |
parent | 7e738f5c0f7849bad8181e27bf9fc8d2ab553d35 (diff) | |
download | linux-3.10-06e7eaeb3d022d8d345ce7c26b7b692679125fe0.tar.gz linux-3.10-06e7eaeb3d022d8d345ce7c26b7b692679125fe0.tar.bz2 linux-3.10-06e7eaeb3d022d8d345ce7c26b7b692679125fe0.zip |
cpufreq: Add debugfs directory for cpufreq
This patch create debugfs root directory and child directory according to
the number of CPUs for CPUFreq as below debugfs directory path:
- /sys/kernel/debug/cpufreq/cpuX
If many CPUs share only one cpufreq policy, other CPUs(except for first CPU)
create a symbolic link for debugfs directory of CPU0.
- link: /sys/kernel/debug/cpufreq/cpu[1-(N-1)] -> /sys/kernel/debug/cpufreq/cpu0
And then cpufreq may need to create debugfs specific file below of debugfs
directory of cpufreq. (e.g., /sys/kernel/debug/cpufreq/cpu0/load_table)
Changes since v6:
- Use 'policy->related_cpus' instead of 'policy->cpus' when getting the number
of CPUs included in the same package
- Get correct index of cpu_debugfs[] array according to cpu number
- Refactoring cpufreq_move_debugfs_dir() / cpufreq_create_debugfs_symlink()
- Use for_each_cpu() to support multi cluster instead of for_each_present_cpu()
Changes since v5:
- Refactoring patch v4
- Create again symbolic link of debugfs directory when first CPU dev is removed
(In this case, many CPUs share only one cpufreq policy)
Change-Id: Ibd84118e6dd3b1e3bc624e1871d39425c99b1673
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/cpufreq.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 940f1fed44f..d8f40a14684 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -123,6 +123,8 @@ struct cpufreq_policy { struct kobject kobj; struct completion kobj_unregister; int transition_ongoing; /* Tracks transition status */ + + struct dentry **cpu_debugfs; }; #define CPUFREQ_ADJUST (0) |