restore blackfin HARDWARE_PM support
PATCH 1/1 restore blackfin HARDWARE_PM support
This patch restores the blackfin Hardware Performance Monitor Profiling support that was killed by
commit 09cadedbdc01f1a4bea1f427d4fb4642eaa19da9.
---
kernel/Kconfig.instrumentation | 9 +++++++++ 1 file changed, 9 insertions(+)
942996f33f81726c5edb012d61ecdad70c55884d
kernel/Kconfig.instrumentation +9 -0
@@ -44,2 +44,11 @@ config OPROFILE_MPCORE +config HARDWARE_PM + tristate "Hardware Performance Monitor Profiling" + depends on BLACKFIN && PROFILING + help + take use of hardware performance monitor to profiling the kernel + and application. + + If unsure, say N. + config KPROBES
Quoted 6 lines · * Adrian Bunk ([email protected]) wrote:
This patch restores the blackfin Hardware Performance Monitor Profiling support that was killed by
commit09cadedbdc01f1a4bea1f427d4fb4642eaa19da9.Signed-off-by Adrian Bunk <[email protected]>
Yep, this one too must be put back, but kernel/Kconfig.instrumentation seems like the wrong spot for a blackfin-specific config option (and this will break the instrumentation menu removal patches in -mm).
Can we put this in arch/blackfin/Kconfig instead ?
Quoted 23 lines
---
kernel/Kconfig.instrumentation | 9 +++++++++ 1 file changed, 9 insertions(+)
942996f33f81726c5edb012d61ecdad70c55884dkernel/Kconfig.instrumentation +9
-0@@ -44,2 +44,11 @@ config OPROFILE_MPCORE +config HARDWARE_PM + tristate "Hardware Performance Monitor Profiling" + depends on BLACKFIN && PROFILING + help + take use of hardware performance monitor to profiling the kernel + and application. + + If unsure, say N. + config KPROBES
Signature · 3 lines
Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Quoted 5 lines · Mathieu Desnoyers
Quoted 4 lines · * Adrian Bunk ([email protected]) wrote:
This patch restores the blackfin Hardware Performance Monitor Profiling support that was killed by
commit09cadedbdc01f1a4bea1f427d4fb4642eaa19da9.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Adrian Bunk <[email protected]>Yep, this one too must be put back, but
kernel/Kconfig.instrumentationseems like the wrong spot for a blackfin-specific config option (and this will break the instrumentation menu removal patches in -mm).Can we put this in
arch/blackfin/Kconfiginstead ?
No, this is a user visible option that belongs into the same menu as "Profling support".
Quoted 12 lines
Quoted 12 lines
---
kernel/Kconfig.instrumentation | 9 +++++++++ 1 file changed, 9 insertions(+)
942996f33f81726c5edb012d61ecdad70c55884dkernel/Kconfig.instrumentation +0
-0@@ -44,2 +44,11 @@ config OPROFILE_MPCORE
Quoted 13 lines
kernel/Kconfig.instrumentation config OPROFILE_MPCORE · line 54
Quoted 11 lines
kernel/Kconfig.instrumentation +9
-0+config HARDWARE_PM + tristate "Hardware Performance Monitor Profiling" + depends on BLACKFIN && PROFILING + help + take use of hardware performance monitor to profiling the kernel + and application. + + If unsure, say N. + config KPROBESMathieu Desnoyers
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 9 lines · * Adrian Bunk ([email protected]) wrote:
Quoted 8 lines · Mathieu Desnoyers
Quoted 6 lines · * Adrian Bunk ([email protected]) wrote:
This patch restores the blackfin Hardware Performance Monitor Profiling support that was killed by
commit09cadedbdc01f1a4bea1f427d4fb4642eaa19da9.Signed-off-by Adrian Bunk <[email protected]>
Quoted 9 lines
Quoted 5 lines
Yep, this one too must be put back, but
kernel/Kconfig.instrumentationseems like the wrong spot for a blackfin-specific config option (and this will break the instrumentation menu removal patches in -mm).Can we put this in
arch/blackfin/Kconfiginstead ?No, this is a user visible option that belongs into the same menu as "Profling support".
Actually, I wonder why these options exist at all rather than being on by default when profiling is enabled. There is no such thing as "activating the performance monitor profiling" on other architectures. What is so special about blackfin that makes it need it ?
Quoted 36 lines
Quoted 12 lines
Quoted 12 lines
---
kernel/Kconfig.instrumentation | 9 +++++++++ 1 file changed, 9 insertions(+)
942996f33f81726c5edb012d61ecdad70c55884dkernel/Kconfig.instrumentation +0
-0@@ -44,2 +44,11 @@ config OPROFILE_MPCOREQuoted 13 lines
kernel/Kconfig.instrumentation config OPROFILE_MPCORE · line 54
Quoted 11 lines
kernel/Kconfig.instrumentation +9
-0+config HARDWARE_PM + tristate "Hardware Performance Monitor Profiling" + depends on BLACKFIN && PROFILING + help + take use of hardware performance monitor to profiling the kernel + and application. + + If unsure, say N. + config KPROBESMathieu Desnoyers
cu
AdrianSignature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed
Signature · 3 lines
Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
On Fri 28 Dec 2007 14:28, Mathieu Desnoyers pondered:
Quoted 16 lines · * Adrian Bunk ([email protected]) wrote:
Quoted 15 lines · Mathieu Desnoyers
Quoted 13 lines · * Adrian Bunk ([email protected]) wrote:
Quoted 6 lines
This patch restores the blackfin Hardware Performance Monitor Profiling support that was killed by
commit09cadedbdc01f1a4bea1f427d4fb4642eaa19da9.Signed-off-by Adrian Bunk <[email protected]>Yep, this one too must be put back, but
kernel/Kconfig.instrumentationseems like the wrong spot for a blackfin-specific config option (and this will break the instrumentation menu removal patches in -mm).Can we put this in
arch/blackfin/Kconfiginstead ?
Quoted 8 lines
Quoted 3 lines
No, this is a user visible option that belongs into the same menu as "Profling support".
Actually, I wonder why these options exist at all rather than being on by default when profiling is enabled. There is no such thing as "activating the performance monitor profiling" on other architectures. What is so special about blackfin that makes it need it ?
This is probably more historical, and you are correct - it should just be part of profiling.
Quoted 37 lines
Quoted 36 lines
Quoted 12 lines
Quoted 12 lines
---
kernel/Kconfig.instrumentation | 9 +++++++++ 1 file changed, 9 insertions(+)
942996f33f81726c5edb012d61ecdad70c55884dkernel/Kconfig.instrumentation +0
-0@@ -44,2 +44,11 @@ config OPROFILE_MPCOREQuoted 13 lines
kernel/Kconfig.instrumentation config OPROFILE_MPCORE · line 54
Quoted 11 lines
kernel/Kconfig.instrumentation +9
-0+config HARDWARE_PM + tristate "Hardware Performance Monitor Profiling" + depends on BLACKFIN && PROFILING + help + take use of hardware performance monitor to profiling the kernel + and application. + + If unsure, say N. + config KPROBESMathieu Desnoyers
cu
AdrianSignature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed
Quoted 21 lines · * Robin Getz ([email protected]) wrote:
On Fri 28 Dec 2007 14:28, Mathieu Desnoyers pondered:
Quoted 20 lines · * Adrian Bunk ([email protected]) wrote:
Quoted 18 lines · Mathieu Desnoyers
Quoted 5 lines · * Adrian Bunk ([email protected]) wrote:
Quoted 4 lines
This patch restores the blackfin Hardware Performance Monitor Profiling support that was killed by
commit09cadedbdc01f1a4bea1f427d4fb4642eaa19da9.Quoted 8 lines
Quoted 2 lines
Signed-off-by Adrian Bunk <[email protected]>Yep, this one too must be put back, but
kernel/Kconfig.instrumentationseems like the wrong spot for a blackfin-specific config option (and this will break the instrumentation menu removal patches in -mm).Can we put this in
arch/blackfin/Kconfiginstead ?No, this is a user visible option that belongs into the same menu as "Profling support".
Quoted 7 lines
Quoted 4 lines
Actually, I wonder why these options exist at all rather than being on by default when profiling is enabled. There is no such thing as "activating the performance monitor profiling" on other architectures. What is so special about blackfin that makes it need it ?
This is probably more historical, and you are correct - it should just be part of profiling.
Ok, and do we really need to make HARDWARE_PM a tristate ? I see that part of it must be compiled into the kernel in core .S files. Does it really make sense for it to be a module ?
Also, op_model_bf533.c sits in the arch/blackfin/oprofile directory, (built if HARDWARE_PM is y or m) but depends on PROFILING, not OPROFILE. Is HARDWARE_PM useful at all without OPROFILE ?
Quoted 38 lines
Quoted 38 lines
Quoted 37 lines
Quoted 13 lines
Quoted 13 lines
---
kernel/Kconfig.instrumentation | 9 +++++++++ 1 file changed, 9 insertions(+)
942996f33f81726c5edb012d61ecdad70c55884dkernel/Kconfig.instrumentation +0
-0@@ -44,2 +44,11 @@ config OPROFILE_MPCOREQuoted 13 lines
kernel/Kconfig.instrumentation config OPROFILE_MPCORE · line 54
Quoted 11 lines
kernel/Kconfig.instrumentation +9
-0+config HARDWARE_PM + tristate "Hardware Performance Monitor Profiling" + depends on BLACKFIN && PROFILING + help + take use of hardware performance monitor to profiling the kernel + and application. + + If unsure, say N. + config KPROBESMathieu Desnoyers
cu
AdrianSignature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed
Signature · 3 lines
Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
On Sat 29 Dec 2007 01:23, Mathieu Desnoyers pondered:
Quoted 3 lines
Ok, and do we really need to make
HARDWARE_PMa tristate ? I see that part of it must be compiled into the kernel in core .S files. Does it really make sense for it to be a module ?
I don't think so.
Quoted 3 lines
Also,
op_model_bf533.csits in thearch/blackfin/oprofiledirectory, (built ifHARDWARE_PMis y or m) but depends on PROFILING, not OPROFILE. IsHARDWARE_PMuseful at all without OPROFILE ?
There was an out of tree patch that was floating around that gave people a sys or proc interface to the hardware registers - since oprofile doesn't work that well on a bash-less system.
I don't think I will have time to look at the patch over the weekend, but will do after Jan 1.
-Robin
PATCH 1/1 Fix blackfin HARDWARE_PM support
In reply to Robin Getz(Robin, can you check if this patch does what is currently intended with HARDWARE_PM please ? This involves testing with CONFIG_OPROFILE y/m/n.)
This patch restores the blackfin Hardware Performance Monitor Profiling support that was killed by
commit 09cadedbdc01f1a4bea1f427d4fb4642eaa19da9.
Since there seems to be no good reason to behave differently from other architectures, it now automatically selects the hardware performance counters whenever the profiling is activated.
mach-common/irqpanic.c: pm_overflow
calls pm_overflow_handler which is in oprofile/op_model_bf533.c. I doubt that setting HARDWARE_PM as "m" will work at all, since the pm_overflow_handler should be in the core kernel image because it is called by irqpanic.c.
Therefore, I change HARDWARE_PM from a tristate to a bool.
The whole arch/$(ARCH)/oprofile/ is built depending on CONFIG_OPROFILE. Since part of the HARDWARE_PM support files sits in this directory, it makes sense to also depend on OPROFILE, not only PROFILING. Since OPROFILE already depends on PROFILING, it is correct to only depend on OPROFILE only.
--- arch/blackfin/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)
arch/blackfin/Kconfig +4 -0
@@ -65,6 +65,10 @@ config GENERIC_CALIBRATE_DELAY bool default y +config HARDWARE_PM + def_bool y + depends on OPROFILE + source "init/Kconfig" source "kernel/Kconfig.preempt"
Signature · 3 lines
Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Re: [2.6.24 patch] Fix blackfin HARDWARE_PM support
Quoted 16 lines · * Mathieu Desnoyers ([email protected]) wrote:
(Robin, can you check if this patch does what is currently intended with
HARDWARE_PMplease ? This involves testing withCONFIG_OPROFILEy/m/n.)This patch restores the blackfin Hardware Performance Monitor Profiling support that was killed by
commit09cadedbdc01f1a4bea1f427d4fb4642eaa19da9.Since there seems to be no good reason to behave differently from other architectures, it now automatically selects the hardware performance counters whenever the profiling is activated.
mach-common/irqpanic.c:pm_overflow
callspm_overflow_handlerwhich is inoprofile/op_model_bf533.c. I doubt that settingHARDWARE_PMas "m" will work at all, since thepm_overflow_handlershould be in the core kernel image because it is called byirqpanic.c.
Quoted 7 lines
Therefore, I change
HARDWARE_PMfrom a tristate to a bool.The whole arch/$(ARCH)/oprofile/ is built depending on
CONFIG_OPROFILE. Since part of theHARDWARE_PMsupport files sits in this directory, it makes sense to also depend on OPROFILE, not only PROFILING. Since OPROFILE already depends on PROFILING, it is correct to only depend on OPROFILE only.
This patch header should also include :
Problem identified by Adrian Bunk. Patch inspired by the original fix proposed by him.
Thanks,
Mathieu
Quoted 35 lines
Signed-off-by Mathieu Desnoyers <[email protected]>CC Adrian Bunk <[email protected]>CC Randy Dunlap <[email protected]>CC Robin Getz <[email protected]>--- arch/blackfin/Kconfig | 4 ++++ 1 file changed, 4 insertions(+)Index: linux-2.6-lttng/arch/blackfin/Kconfig
===================================================================arch/blackfin/Kconfig +4
-0@@ -65,6 +65,10 @@ config GENERIC_CALIBRATE_DELAY bool default y +config HARDWARE_PM + def_bool y + depends on OPROFILE + source "init/Kconfig" source "kernel/Kconfig.preempt"Signature · 9 lines
-- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Signature · 3 lines
Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68