Hi,
Linaro kernels include a patch by Tony Lindgren that adds a
printascii() to every printk() call. Currently in
linux-linaro-tracking, that's 892a9def (ARM: Make low-level printk
work). With this patch, every line is printed twice once you've
registered a console driver which is a bit of a pain. Speaking to
him, he acknowledges that this hack is no longer needed since we now
have earlyprintk, so can this patch be removed from linaro kernels?
Cheers,
Javi
PS: Please CC me, I'm not subscribed to the list
The governors are defined as module in the code, but the Kconfig options do not
allow to compile them as module. This is not really a problem but the init
order is: the cpuidle init functions (framework and driver) and then the
governors. That leads to some weirdness in the cpuidle framework because the
function cpuidle_register_device calls cpuidle_enable_device which in turns
fails at the first attempt because no governor is registered. When the
governor is registered, the framework calls cpuidle_enable_device again which
will invoke the __cpuidle_register_device function. Of course, in order to make
this to work, the return code of cpuidle_enable_device is not checked by the
caller in cpuidle_register_device.
Instead of having this cyclic call graph and relying on a positive side effect
of the hackish back and forth call to cpuidle_enable_device, let's fix the
init order for the governor in order to clean up the cpuidle_enable_device
function.
Remove the module init code and replaced it with postcore_initcall, so we have:
* cpuidle framework : core_initcall
* cpuidle governors : postcore_initcall
* cpuidle drivers : device_initcall
Remove exit module code as it is dead code (governors aren't compiled as
module).
Signed-off-by: Daniel Lezcano <daniel.lezcano(a)linaro.org>
---
drivers/cpuidle/governors/ladder.c | 12 +-----------
drivers/cpuidle/governors/menu.c | 12 +-----------
2 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/drivers/cpuidle/governors/ladder.c b/drivers/cpuidle/governors/ladder.c
index 9b78405..9f08e8c 100644
--- a/drivers/cpuidle/governors/ladder.c
+++ b/drivers/cpuidle/governors/ladder.c
@@ -192,14 +192,4 @@ static int __init init_ladder(void)
return cpuidle_register_governor(&ladder_governor);
}
-/**
- * exit_ladder - exits the governor
- */
-static void __exit exit_ladder(void)
-{
- cpuidle_unregister_governor(&ladder_governor);
-}
-
-MODULE_LICENSE("GPL");
-module_init(init_ladder);
-module_exit(exit_ladder);
+postcore_initcall(init_ladder);
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index fe343a0..743138c 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -540,14 +540,4 @@ static int __init init_menu(void)
return cpuidle_register_governor(&menu_governor);
}
-/**
- * exit_menu - exits the governor
- */
-static void __exit exit_menu(void)
-{
- cpuidle_unregister_governor(&menu_governor);
-}
-
-MODULE_LICENSE("GPL");
-module_init(init_menu);
-module_exit(exit_menu);
+postcore_initcall(init_menu);
--
1.7.9.5
From: "Mathieu J. Poirier" <mathieu.poirier(a)linaro.org>
Will Deacon has a better solution and his patch should
be coming in soon. In the mean time please consider for inclusion.
This is an in-between solution that prevents the EVENTEN bit in
the CNTKCTL register from being mask, resulting in events between
clusters being lost.
Bug: LP1188778
Signed-off-by: Mathieu Poirier <mathieu.poirier(a)linaro.org>
Signed-off-by: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha(a)arm.com>
---
arch/arm/include/asm/arch_timer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h
index 7c1bfc0..4928cda 100644
--- a/arch/arm/include/asm/arch_timer.h
+++ b/arch/arm/include/asm/arch_timer.h
@@ -105,7 +105,7 @@ static inline void __cpuinit arch_counter_set_user_access(void)
asm volatile("mrc p15, 0, %0, c14, c1, 0" : "=r" (cntkctl));
/* disable user access to everything */
- cntkctl &= ~((3 << 8) | (7 << 0));
+ cntkctl &= ~((3 << 8) | (3 << 0));
asm volatile("mcr p15, 0, %0, c14, c1, 0" : : "r" (cntkctl));
}
--
1.7.9.5
Dear Members,
I am trying to use systemtap on Pandaboard with Linaro Ubuntu 13.04
version. http://releases.linaro.org/13.04/ubuntu/panda
I have installed systemtap & other dependencies by apt-get. And followed
the instructions below.
https://wiki.linaro.org/Platform/DevPlatform/Tools/Systemtap
Simple script to test systemtap:
stap -k -v -e 'probe vfs.read {printf("read performed\n"); exit()}'
It failed at the step 4(pass) to compile the code.
By default -Werror flag is also enabled by stap. I guess that would be the
cause. Also there are few other errors.
Please find the compilation error message below & let me know how to solve
this.
Thanks in advance.
localhost:~# stap -k -v -e 'probe vfs.read {printf("read performed\n"); exi
Pass 1: parsed user script and 79 library script(s) using
17588virt/12740res/1716shr kb, in 900usr/20sys/912real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 3 embed(s), 0 global(s)
using 188456virt/72220res/2284shr kb, in 9440usr/590sys/10031real ms.
Pass 3: translated to C into "/tmp/staprrXuW5/stap_1871_src.c" using
188456virt/75576res/5640shr kb, in 120usr/20sys/145real ms.
In file included from /usr/share/systemtap/runtime/runtime.h:130:0,
from /tmp/staprrXuW5/stap_1871_src.c:20:
/usr/share/systemtap/runtime/copy.c: In function '_stp_strncpy_from_user':
/usr/share/systemtap/runtime/copy.c:137:3: error: implicit declaration of
function '__strncpy_from_user' [-Werror=implicit-function-declaration]
In file included from /usr/share/systemtap/runtime/stp_utrace.c:32:0,
from /usr/share/systemtap/runtime/task_finder2.c:4,
from /usr/share/systemtap/runtime/task_finder.c:21,
from /usr/share/systemtap/runtime/runtime.h:138,
from /tmp/staprrXuW5/stap_1871_src.c:20:
/usr/share/systemtap/runtime/stp_utrace.h: At top level:
/usr/share/systemtap/runtime/stp_utrace.h:258:14: error: 'struct
linux_binprm' declared inside parameter list [-Werror]
/usr/share/systemtap/runtime/stp_utrace.h:258:14: error: its scope is only
this definition or declaration, which is probably not what you want
[-Werror]
In file included from /usr/share/systemtap/runtime/task_finder2.c:4:0,
from /usr/share/systemtap/runtime/task_finder.c:21,
from /usr/share/systemtap/runtime/runtime.h:138,
from /tmp/staprrXuW5/stap_1871_src.c:20:
/usr/share/systemtap/runtime/stp_utrace.c: In function 'utrace_shutdown':
/usr/share/systemtap/runtime/stp_utrace.c:289:61: error: macro
"hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
/usr/share/systemtap/runtime/stp_utrace.c:289:3: error:
'hlist_for_each_entry_safe' undeclared (first use in this function)
/usr/share/systemtap/runtime/stp_utrace.c:289:3: note: each undeclared
identifier is reported only once for each function it appears in
/usr/share/systemtap/runtime/stp_utrace.c:289:63: error: expected ';'
before '{' token
/usr/share/systemtap/runtime/stp_utrace.c: In function
'__task_utrace_struct':
/usr/share/systemtap/runtime/stp_utrace.c:308:48: error: macro
"hlist_for_each_entry" passed 4 arguments, but takes just 3
/usr/share/systemtap/runtime/stp_utrace.c:308:2: error:
'hlist_for_each_entry' undeclared (first use in this function)
/usr/share/systemtap/runtime/stp_utrace.c:308:50: error: expected ';'
before '{' token
/usr/share/systemtap/runtime/stp_utrace.c:313:1: error: no return statement
in function returning non-void [-Werror=return-type]
In file included from /usr/share/systemtap/runtime/task_finder2.c:13:0,
from /usr/share/systemtap/runtime/task_finder.c:21,
from /usr/share/systemtap/runtime/runtime.h:138,
from /tmp/staprrXuW5/stap_1871_src.c:20:
/usr/share/systemtap/runtime/task_finder_map.c: In function
'__stp_tf_map_get_free_entry':
/usr/share/systemtap/runtime/task_finder_map.c:74:47: error: macro
"hlist_for_each_entry" passed 4 arguments, but takes just 3
/usr/share/systemtap/runtime/task_finder_map.c:74:2: error:
'hlist_for_each_entry' undeclared (first use in this function)
/usr/share/systemtap/runtime/task_finder_map.c:74:49: error: expected ';'
before '{' token
/usr/share/systemtap/runtime/task_finder_map.c: In function
'__stp_tf_get_map_entry':
/usr/share/systemtap/runtime/task_finder_map.c:114:47: error: macro
"hlist_for_each_entry" passed 4 arguments, but takes just 3
/usr/share/systemtap/runtime/task_finder_map.c:114:2: error:
'hlist_for_each_entry' undeclared (first use in this function)
/usr/share/systemtap/runtime/task_finder_map.c:114:49: error: expected ';'
before '{' token
/usr/share/systemtap/runtime/task_finder_map.c: In function
'__stp_tf_add_map':
/usr/share/systemtap/runtime/task_finder_map.c:138:47: error: macro
"hlist_for_each_entry" passed 4 arguments, but takes just 3
/usr/share/systemtap/runtime/task_finder_map.c:138:2: error:
'hlist_for_each_entry' undeclared (first use in this function)
/usr/share/systemtap/runtime/task_finder_map.c:138:49: error: expected ';'
before '{' token
In file included from /usr/share/systemtap/runtime/task_finder.c:21:0,
from /usr/share/systemtap/runtime/runtime.h:138,
from /tmp/staprrXuW5/stap_1871_src.c:20:
/usr/share/systemtap/runtime/task_finder2.c: In function
'stap_register_task_finder_target':
/usr/share/systemtap/runtime/task_finder2.c:152:27: error: assignment from
incompatible pointer type [-Werror]
/usr/share/systemtap/runtime/task_finder2.c: In function
'__stp_get_mm_path':
/usr/share/systemtap/runtime/task_finder2.c:353:24: error: 'VM_EXECUTABLE'
undeclared (first use in this function)
/usr/share/systemtap/runtime/task_finder2.c: At top level:
/usr/share/systemtap/runtime/task_finder2.c:1324:2: error: initialization
from incompatible pointer type [-Werror]
/usr/share/systemtap/runtime/task_finder2.c:1324:2: error: (near
initialization for '__stp_utrace_task_finder_ops.report_exec') [-Werror]
In file included from /usr/share/systemtap/runtime/vma.c:18:0,
from /usr/share/systemtap/runtime/sym.c:16,
from /usr/share/systemtap/runtime/runtime.h:140,
from /tmp/staprrXuW5/stap_1871_src.c:20:
/usr/share/systemtap/runtime/task_finder_vma.c: In function
'stap_destroy_vma_map':
/usr/share/systemtap/runtime/task_finder_vma.c:102:64: error: macro
"hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
/usr/share/systemtap/runtime/task_finder_vma.c:102:11: error:
'hlist_for_each_entry_safe' undeclared (first use in this function)
/usr/share/systemtap/runtime/task_finder_vma.c:102:66: error: expected ';'
before '{' token
/usr/share/systemtap/runtime/task_finder_vma.c: In function
'__stp_tf_get_vma_map_entry_internal':
/usr/share/systemtap/runtime/task_finder_vma.c:131:47: error: macro
"hlist_for_each_entry" passed 4 arguments, but takes just 3
/usr/share/systemtap/runtime/task_finder_vma.c:131:2: error:
'hlist_for_each_entry' undeclared (first use in this function)
/usr/share/systemtap/runtime/task_finder_vma.c:131:49: error: expected ';'
before '{' token
/usr/share/systemtap/runtime/task_finder_vma.c:138:1: error: no return
statement in function returning non-void [-Werror=return-type]
/usr/share/systemtap/runtime/task_finder_vma.c: In function
'__stp_tf_get_vma_map_entry_end_internal':
/usr/share/systemtap/runtime/task_finder_vma.c:152:47: error: macro
"hlist_for_each_entry" passed 4 arguments, but takes just 3
/usr/share/systemtap/runtime/task_finder_vma.c:152:2: error:
'hlist_for_each_entry' undeclared (first use in this function)
/usr/share/systemtap/runtime/task_finder_vma.c:152:49: error: expected ';'
before '{' token
/usr/share/systemtap/runtime/task_finder_vma.c:159:1: error: no return
statement in function returning non-void [-Werror=return-type]
/usr/share/systemtap/runtime/task_finder_vma.c: In function
'stap_find_vma_map_info':
/usr/share/systemtap/runtime/task_finder_vma.c:290:47: error: macro
"hlist_for_each_entry" passed 4 arguments, but takes just 3
/usr/share/systemtap/runtime/task_finder_vma.c:290:2: error:
'hlist_for_each_entry' undeclared (first use in this function)
/usr/share/systemtap/runtime/task_finder_vma.c:290:49: error: expected ';'
before '{' token
/usr/share/systemtap/runtime/task_finder_vma.c: In function
'stap_find_vma_map_info_user':
/usr/share/systemtap/runtime/task_finder_vma.c:334:47: error: macro
"hlist_for_each_entry" passed 4 arguments, but takes just 3
/usr/share/systemtap/runtime/task_finder_vma.c:334:2: error:
'hlist_for_each_entry' undeclared (first use in this function)
/usr/share/systemtap/runtime/task_finder_vma.c:334:49: error: expected ';'
before '{' token
/usr/share/systemtap/runtime/task_finder_vma.c: In function
'stap_drop_vma_maps':
/usr/share/systemtap/runtime/task_finder_vma.c:365:62: error: macro
"hlist_for_each_entry_safe" passed 5 arguments, but takes just 4
/usr/share/systemtap/runtime/task_finder_vma.c:365:9: error:
'hlist_for_each_entry_safe' undeclared (first use in this function)
/usr/share/systemtap/runtime/task_finder_vma.c:365:64: error: expected ';'
before '{' token
cc1: all warnings being treated as errors
make[1]: *** [/tmp/staprrXuW5/stap_1871_src.o] Error 1
make: *** [_module_/tmp/staprrXuW5] Error 2
WARNING: make exited with status: 2
Pass 4: compiled C into "stap_1871.ko" in 22840usr/1690sys/31630real ms.
Pass 4: compilation failed. Try again with another '--vp 0001' option.
Keeping temporary directory "/tmp/staprrXuW5"
root@localhost:~#
Hi all,
I am sure lot of us have this information but just in case someone
missed it, there is a micro conference proposal for Linux Plumbers New
Orleans:
http://wiki.linuxplumbersconf.org/2013:power-efficient_scheduling
If you are interested in it and you could have the opportunity to be
there, please update the wiki page with your name, it is still proposed
not yet accepted.
-- Daniel
This patch series does the following:
1) Factors out possible common code, unifies the clk strutures used
for PLL35xx & PLL36xx and usues clk->base instead of clk->con0
2) Defines a common rate_table which will contain recommended p, m, s and k
values for supported rates that needs to be changed for changing
corresponding PLL's rate
3) Adds set_rate() and round_rate() clk_ops for PLL35xx and PLL36xx
changes since v2:
- Added new patch to reorder the MUX registration for mout_vpllsrc MUX
before the PLL registrations. And to add the alias for the mout_vpllsrc MUX.
- Added a check to confirm parent rate while registrating the PLL
rate tables.
changes since v1:
- removed sorting and bsearch
- modified the definition of struct "samsung_pll_rate_table"
- added generic round_rate()
- rectified the ops assignment for "rate table passed as NULL"
during PLL registration
Is rebased on branch kgene's "for-next"
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h…
And tested these patch on chromebook for EPLL settings for Audio on our chrome tree.
Vikas Sajjan (3):
clk: samsung: Add set_rate() clk_ops for PLL36xx
clk: samsung: Add alias for mout_vpllsrc and reorder MUX registration
for it
clk: samsung: Add EPLL and VPLL freq table for exynos5250 SoC
Yadwinder Singh Brar (3):
clk: samsung: Use clk->base instead of directly using clk->con0 for
PLL3xxx
clk: samsung: Add support to register rate_table for PLL3xxx
clk: samsung: Add set_rate() clk_ops for PLL35xx
drivers/clk/samsung/clk-exynos4.c | 10 +-
drivers/clk/samsung/clk-exynos5250.c | 69 +++++++++--
drivers/clk/samsung/clk-pll.c | 226 ++++++++++++++++++++++++++++++----
drivers/clk/samsung/clk-pll.h | 35 +++++-
drivers/clk/samsung/clk.h | 2 +
5 files changed, 300 insertions(+), 42 deletions(-)
--
1.7.9.5
Current cpufreq stats has got three parts: time_in_state, total_trans and
trans_table.
trans_table was present under a separate macro's from others:
CONFIG_CPU_FREQ_STAT_DETAILS
The reason quoted for that was:
- trans_table goes against the traditional /sysfs rule of one value per
interface. It provides a whole bunch of value in a 2 dimensional matrix form.
I don't understand how necessary it is to keep trans_table inside a separate
macro. These are all cpufreq sysfs stats, probably it doesn't matter if its one
dimensional or two.
Lets remove CONFIG_CPU_FREQ_STAT_DETAILS and use CONFIG_CPU_FREQ_STAT only to
make code more cleaner (i.e. remove unnecessary macros).
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
Documentation/cpu-freq/cpufreq-stats.txt | 18 ++++--------------
arch/mips/configs/lemote2f_defconfig | 1 -
arch/powerpc/configs/ppc6xx_defconfig | 1 -
arch/sh/configs/sh7785lcr_32bit_defconfig | 1 -
drivers/cpufreq/Kconfig | 9 ---------
drivers/cpufreq/cpufreq_stats.c | 12 ------------
6 files changed, 4 insertions(+), 38 deletions(-)
diff --git a/Documentation/cpu-freq/cpufreq-stats.txt b/Documentation/cpu-freq/cpufreq-stats.txt
index fc64749..838f990 100644
--- a/Documentation/cpu-freq/cpufreq-stats.txt
+++ b/Documentation/cpu-freq/cpufreq-stats.txt
@@ -111,18 +111,8 @@ Config Main Menu
cpufreq-stats.
"CPU frequency translation statistics" (CONFIG_CPU_FREQ_STAT) provides the
-basic statistics which includes time_in_state and total_trans.
-
-"CPU frequency translation statistics details" (CONFIG_CPU_FREQ_STAT_DETAILS)
-provides fine grained cpufreq stats by trans_table. The reason for having a
-separate config option for trans_table is:
-- trans_table goes against the traditional /sysfs rule of one value per
- interface. It provides a whole bunch of value in a 2 dimensional matrix
- form.
-
-Once these two options are enabled and your CPU supports cpufrequency, you
-will be able to see the CPU frequency statistics in /sysfs.
-
-
-
+statistics which includes time_in_state, total_trans and fine grained cpufreq
+stats by trans_table.
+Once this option is enabled and your CPU supports cpufrequency, you will be able
+to see the CPU frequency statistics in /sysfs.
diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemote2f_defconfig
index 343bebc..f9229e9 100644
--- a/arch/mips/configs/lemote2f_defconfig
+++ b/arch/mips/configs/lemote2f_defconfig
@@ -41,7 +41,6 @@ CONFIG_PM_RUNTIME=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_DEBUG=y
CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
index be1cb6e..bb7664c 100644
--- a/arch/powerpc/configs/ppc6xx_defconfig
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -58,7 +58,6 @@ CONFIG_GEF_SBC610=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_DEBUG=y
CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
diff --git a/arch/sh/configs/sh7785lcr_32bit_defconfig b/arch/sh/configs/sh7785lcr_32bit_defconfig
index 9bdcf72..7ce136d 100644
--- a/arch/sh/configs/sh7785lcr_32bit_defconfig
+++ b/arch/sh/configs/sh7785lcr_32bit_defconfig
@@ -25,7 +25,6 @@ CONFIG_SH_SH7785LCR=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
CONFIG_SH_CPU_FREQ=y
CONFIG_HEARTBEAT=y
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index 534fcb8..f64ed8a 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -36,15 +36,6 @@ config CPU_FREQ_STAT
If in doubt, say N.
-config CPU_FREQ_STAT_DETAILS
- bool "CPU frequency translation statistics details"
- depends on CPU_FREQ_STAT
- help
- This will show detail CPU frequency translation table in sysfs file
- system.
-
- If in doubt, say N.
-
choice
prompt "Default CPUFreq governor"
default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index fb65dec..c774005 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -33,9 +33,7 @@ struct cpufreq_stats {
unsigned int last_index;
u64 *time_in_state;
unsigned int *freq_table;
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
unsigned int *trans_table;
-#endif
};
static DEFINE_PER_CPU(struct cpufreq_stats *, cpufreq_stats_table);
@@ -86,7 +84,6 @@ static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf)
return len;
}
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf)
{
ssize_t len = 0;
@@ -131,7 +128,6 @@ static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf)
return len;
}
cpufreq_freq_attr_ro(trans_table);
-#endif
cpufreq_freq_attr_ro(total_trans);
cpufreq_freq_attr_ro(time_in_state);
@@ -139,9 +135,7 @@ cpufreq_freq_attr_ro(time_in_state);
static struct attribute *default_attrs[] = {
&total_trans.attr,
&time_in_state.attr,
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
&trans_table.attr,
-#endif
NULL
};
static struct attribute_group stats_attr_group = {
@@ -231,9 +225,7 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy,
alloc_size = count * sizeof(int) + count * sizeof(u64);
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
alloc_size += count * count * sizeof(int);
-#endif
stat->max_state = count;
stat->time_in_state = kzalloc(alloc_size, GFP_KERNEL);
if (!stat->time_in_state) {
@@ -242,9 +234,7 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy,
}
stat->freq_table = (unsigned int *)(stat->time_in_state + count);
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
stat->trans_table = stat->freq_table + count;
-#endif
j = 0;
for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) {
unsigned int freq = table[i].frequency;
@@ -333,9 +323,7 @@ static int cpufreq_stat_notifier_trans(struct notifier_block *nb,
spin_lock(&cpufreq_stats_lock);
stat->last_index = new_index;
-#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
stat->trans_table[old_index * stat->max_state + new_index]++;
-#endif
stat->total_trans++;
spin_unlock(&cpufreq_stats_lock);
return 0;
--
1.7.12.rc2.18.g61b472e
This patch set implements out of the box support of perf tools for
persistent events. For this the kernel must provide necessary
information about existing persistent events via sysfs to userland.
Persistent events are provided by the kernel with readonly event
buffers. To allow the independent usage of the event buffers by any
process without limiting other processes, multiple users of a single
event must be handled too.
The basic concept is to use a pmu as an event container for persistent
events. The pmu registers events in sysfs and provides format and
event information for the userland. The persistent event framework
requires to add events to the pmu dynamically.
With the information in sysfs userland knows about how to setup the
perf_event attribute of a persistent event. Since a persistent event
always has the persistent flag set, a way is needed to express this in
sysfs. A new syntax is used for this. With 'attr<num>:<mask>' any bit
in the attribute structure may be set in a similar way as using
'config<num>', but <num> is an index that points to the u64 value to
change within the attribute.
For persistent events the persistent flag (bit 23 of flag field in
struct perf_event_attr) needs to be set which is expressed in sysfs
with "attr5:23". E.g. the mce_record event is described in sysfs as
follows:
/sys/bus/event_source/devices/persistent/events/mce_record:persistent,config=106
/sys/bus/event_source/devices/persistent/format/persistent:attr5:23
Note that perf tools need to support the 'attr<num>' syntax that is
added in a separate patch set. With it we are able to run perf tool
commands to read persistent events, e.g.:
# perf record -e persistent/mce_record/ sleep 10
# perf top -e persistent/mce_record/
In general the new syntax is flexible to describe with sysfs any event
to be setup by perf tools.
First patches contain also fixes and reworks made after reviewing
code. Could be applied separately.
Patches base on Boris' patches which I have rebased to latest
tip/perf/core. All patches can be found here:
git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile.git persistent-v2
I wonder if this patch set could be applied to a tip/perf topic
branch? This would avoid reposting already reviewed patches.
Note: The perf tools patch set do not need to be reposted.
-Robert
Changes for V2:
* Merged minor changes into Boris' patches
* Included Boris' patches for review
* Document attr<index> syntax in sysfs ABI
* Adding cpu check to perf_get_persistent_event_fd()
* Rebased to latest tip/perf/core
Borislav Petkov (4):
perf, ring_buffer: Use same prefix
perf: Add persistent events
perf: Add persistent event facilities
MCE: Enable persistent event
Robert Richter (10):
perf, persistent: Rework struct pers_event_desc
perf, persistent: Remove rb_put()
perf, persistent: Introduce get_persistent_event()
perf, persistent: Reworking perf_get_persistent_event_fd()
perf, persistent: Protect event lists with mutex
perf, persistent: Avoid adding identical events
perf, persistent: Implementing a persistent pmu
perf, persistent: Name each persistent event
perf, persistent: Exposing persistent events using sysfs
perf, persistent: Allow multiple users for an event
.../testing/sysfs-bus-event_source-devices-format | 43 ++-
arch/x86/kernel/cpu/mcheck/mce.c | 19 ++
include/linux/perf_event.h | 9 +-
include/uapi/linux/perf_event.h | 3 +-
kernel/events/Makefile | 2 +-
kernel/events/core.c | 56 ++--
kernel/events/internal.h | 3 +
kernel/events/persistent.c | 320 +++++++++++++++++++++
kernel/events/ring_buffer.c | 7 +-
9 files changed, 419 insertions(+), 43 deletions(-)
create mode 100644 kernel/events/persistent.c
--
1.8.1.1
also cc linaro kernel
Hi,
This patch will forward target residency information from the arm_big_little
driver to mcpm.
If multiple powerdown states are used, the vendor specific code will need a way to distinguish the intended c-state information.
I do not have TC2 hardware to verify this. Would someone be able to help
verify this change on TC2?
Thanks!
Sebastian
Sebastian Capella (1):
cpuidle: arm_big_little: route target residency to mcpm
drivers/cpuidle/arm_big_little.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
1.7.9.5