* [2.6.24 patch] restore blackfin HARDWARE_PM support @ 2007-12-28 18:56 Adrian Bunk 2007-12-28 19:14 ` Mathieu Desnoyers 0 siblings, 1 reply; 9+ messages in thread From: Adrian Bunk @ 2007-12-28 18:56 UTC (permalink / raw) To: Mathieu Desnoyers, Randy Dunlap, bryan.wu; +Cc: linux-kernel This patch restores the blackfin Hardware Performance Monitor Profiling support that was killed by commit 09cadedbdc01f1a4bea1f427d4fb4642eaa19da9. Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi> --- kernel/Kconfig.instrumentation | 9 +++++++++ 1 file changed, 9 insertions(+) 942996f33f81726c5edb012d61ecdad70c55884d diff --git a/kernel/Kconfig.instrumentation b/kernel/Kconfig.instrumentation index 97c76ca..e023671 100644 --- a/kernel/Kconfig.instrumentation +++ b/kernel/Kconfig.instrumentation @@ -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 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [2.6.24 patch] restore blackfin HARDWARE_PM support 2007-12-28 18:56 [2.6.24 patch] restore blackfin HARDWARE_PM support Adrian Bunk @ 2007-12-28 19:14 ` Mathieu Desnoyers 2007-12-28 19:23 ` Adrian Bunk 0 siblings, 1 reply; 9+ messages in thread From: Mathieu Desnoyers @ 2007-12-28 19:14 UTC (permalink / raw) To: Adrian Bunk, Andrew Morton; +Cc: Randy Dunlap, bryan.wu, linux-kernel * Adrian Bunk (adrian.bunk@movial.fi) wrote: > This patch restores the blackfin Hardware Performance Monitor Profiling > support that was killed by > commit 09cadedbdc01f1a4bea1f427d4fb4642eaa19da9. > > Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi> > 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 ? > --- > > kernel/Kconfig.instrumentation | 9 +++++++++ > 1 file changed, 9 insertions(+) > > 942996f33f81726c5edb012d61ecdad70c55884d > diff --git a/kernel/Kconfig.instrumentation b/kernel/Kconfig.instrumentation > index 97c76ca..e023671 100644 > --- a/kernel/Kconfig.instrumentation > +++ b/kernel/Kconfig.instrumentation > @@ -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 > -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [2.6.24 patch] restore blackfin HARDWARE_PM support 2007-12-28 19:14 ` Mathieu Desnoyers @ 2007-12-28 19:23 ` Adrian Bunk 2007-12-28 19:28 ` Mathieu Desnoyers 0 siblings, 1 reply; 9+ messages in thread From: Adrian Bunk @ 2007-12-28 19:23 UTC (permalink / raw) To: Mathieu Desnoyers; +Cc: Andrew Morton, Randy Dunlap, bryan.wu, linux-kernel On Fri, Dec 28, 2007 at 02:14:04PM -0500, Mathieu Desnoyers wrote: > * Adrian Bunk (adrian.bunk@movial.fi) wrote: > > This patch restores the blackfin Hardware Performance Monitor Profiling > > support that was killed by > > commit 09cadedbdc01f1a4bea1f427d4fb4642eaa19da9. > > > > Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi> > > > > 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 ? No, this is a user visible option that belongs into the same menu as "Profling support". > > --- > > > > kernel/Kconfig.instrumentation | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > 942996f33f81726c5edb012d61ecdad70c55884d > > diff --git a/kernel/Kconfig.instrumentation b/kernel/Kconfig.instrumentation > > index 97c76ca..e023671 100644 > > --- a/kernel/Kconfig.instrumentation > > +++ b/kernel/Kconfig.instrumentation > > @@ -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 > > > > Mathieu Desnoyers cu Adrian -- "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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [2.6.24 patch] restore blackfin HARDWARE_PM support 2007-12-28 19:23 ` Adrian Bunk @ 2007-12-28 19:28 ` Mathieu Desnoyers 2007-12-29 6:14 ` Robin Getz 0 siblings, 1 reply; 9+ messages in thread From: Mathieu Desnoyers @ 2007-12-28 19:28 UTC (permalink / raw) To: Adrian Bunk; +Cc: Andrew Morton, Randy Dunlap, bryan.wu, linux-kernel * Adrian Bunk (bunk@kernel.org) wrote: > On Fri, Dec 28, 2007 at 02:14:04PM -0500, Mathieu Desnoyers wrote: > > * Adrian Bunk (adrian.bunk@movial.fi) wrote: > > > This patch restores the blackfin Hardware Performance Monitor Profiling > > > support that was killed by > > > commit 09cadedbdc01f1a4bea1f427d4fb4642eaa19da9. > > > > > > Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi> > > > > > > > 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 ? > > 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 ? > > > --- > > > > > > kernel/Kconfig.instrumentation | 9 +++++++++ > > > 1 file changed, 9 insertions(+) > > > > > > 942996f33f81726c5edb012d61ecdad70c55884d > > > diff --git a/kernel/Kconfig.instrumentation b/kernel/Kconfig.instrumentation > > > index 97c76ca..e023671 100644 > > > --- a/kernel/Kconfig.instrumentation > > > +++ b/kernel/Kconfig.instrumentation > > > @@ -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 > > > > > > > Mathieu Desnoyers > > cu > Adrian > > -- > > "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 > -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [2.6.24 patch] restore blackfin HARDWARE_PM support 2007-12-28 19:28 ` Mathieu Desnoyers @ 2007-12-29 6:14 ` Robin Getz 2007-12-29 6:23 ` Mathieu Desnoyers 2007-12-29 16:29 ` [2.6.24 patch] Fix " Mathieu Desnoyers 0 siblings, 2 replies; 9+ messages in thread From: Robin Getz @ 2007-12-29 6:14 UTC (permalink / raw) To: Mathieu Desnoyers Cc: Adrian Bunk, Andrew Morton, Randy Dunlap, bryan.wu, linux-kernel On Fri 28 Dec 2007 14:28, Mathieu Desnoyers pondered: > * Adrian Bunk (bunk@kernel.org) wrote: > > On Fri, Dec 28, 2007 at 02:14:04PM -0500, Mathieu Desnoyers wrote: > > > * Adrian Bunk (adrian.bunk@movial.fi) wrote: > > > > This patch restores the blackfin Hardware Performance Monitor Profiling > > > > support that was killed by > > > > commit 09cadedbdc01f1a4bea1f427d4fb4642eaa19da9. > > > > > > > > Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi> > > > > > > > > > > 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 ? > > > > 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. > > > > --- > > > > > > > > kernel/Kconfig.instrumentation | 9 +++++++++ > > > > 1 file changed, 9 insertions(+) > > > > > > > > 942996f33f81726c5edb012d61ecdad70c55884d > > > > diff --git a/kernel/Kconfig.instrumentation b/kernel/Kconfig.instrumentation > > > > index 97c76ca..e023671 100644 > > > > --- a/kernel/Kconfig.instrumentation > > > > +++ b/kernel/Kconfig.instrumentation > > > > @@ -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 > > > > > > > > > > Mathieu Desnoyers > > > > cu > > Adrian > > > > -- > > > > "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 > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [2.6.24 patch] restore blackfin HARDWARE_PM support 2007-12-29 6:14 ` Robin Getz @ 2007-12-29 6:23 ` Mathieu Desnoyers 2007-12-29 19:28 ` Robin Getz 2007-12-29 16:29 ` [2.6.24 patch] Fix " Mathieu Desnoyers 1 sibling, 1 reply; 9+ messages in thread From: Mathieu Desnoyers @ 2007-12-29 6:23 UTC (permalink / raw) To: Robin Getz Cc: Adrian Bunk, Andrew Morton, Randy Dunlap, bryan.wu, linux-kernel * Robin Getz (rgetz@blackfin.uclinux.org) wrote: > On Fri 28 Dec 2007 14:28, Mathieu Desnoyers pondered: > > * Adrian Bunk (bunk@kernel.org) wrote: > > > On Fri, Dec 28, 2007 at 02:14:04PM -0500, Mathieu Desnoyers wrote: > > > > * Adrian Bunk (adrian.bunk@movial.fi) wrote: > > > > > This patch restores the blackfin Hardware Performance Monitor Profiling > > > > > support that was killed by > > > > > commit 09cadedbdc01f1a4bea1f427d4fb4642eaa19da9. > > > > > > > > > > Signed-off-by: Adrian Bunk <adrian.bunk@movial.fi> > > > > > > > > > > > > > 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 ? > > > > > > 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. > 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 ? > > > > > > --- > > > > > > > > > > kernel/Kconfig.instrumentation | 9 +++++++++ > > > > > 1 file changed, 9 insertions(+) > > > > > > > > > > 942996f33f81726c5edb012d61ecdad70c55884d > > > > > diff --git a/kernel/Kconfig.instrumentation b/kernel/Kconfig.instrumentation > > > > > index 97c76ca..e023671 100644 > > > > > --- a/kernel/Kconfig.instrumentation > > > > > +++ b/kernel/Kconfig.instrumentation > > > > > @@ -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 > > > > > > > > > > > > > Mathieu Desnoyers > > > > > > cu > > > Adrian > > > > > > -- > > > > > > "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 > > > > > -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [2.6.24 patch] restore blackfin HARDWARE_PM support 2007-12-29 6:23 ` Mathieu Desnoyers @ 2007-12-29 19:28 ` Robin Getz 0 siblings, 0 replies; 9+ messages in thread From: Robin Getz @ 2007-12-29 19:28 UTC (permalink / raw) To: Mathieu Desnoyers Cc: Adrian Bunk, Andrew Morton, Randy Dunlap, bryan.wu, linux-kernel On Sat 29 Dec 2007 01:23, Mathieu Desnoyers pondered: > 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 ? I don't think so. > 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 ? 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [2.6.24 patch] Fix blackfin HARDWARE_PM support 2007-12-29 6:14 ` Robin Getz 2007-12-29 6:23 ` Mathieu Desnoyers @ 2007-12-29 16:29 ` Mathieu Desnoyers 2008-01-02 17:46 ` Mathieu Desnoyers 1 sibling, 1 reply; 9+ messages in thread From: Mathieu Desnoyers @ 2007-12-29 16:29 UTC (permalink / raw) To: Robin Getz Cc: Adrian Bunk, Andrew Morton, Randy Dunlap, bryan.wu, linux-kernel (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. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: Adrian Bunk <adrian.bunk@movial.fi> CC: Randy Dunlap <randy.dunlap@oracle.com> CC: bryan.wu@analog.com CC: Robin Getz <rgetz@blackfin.uclinux.org> --- arch/blackfin/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) Index: linux-2.6-lttng/arch/blackfin/Kconfig =================================================================== --- linux-2.6-lttng.orig/arch/blackfin/Kconfig 2007-12-29 11:00:05.000000000 -0500 +++ linux-2.6-lttng/arch/blackfin/Kconfig 2007-12-29 11:25:39.000000000 -0500 @@ -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" -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [2.6.24 patch] Fix blackfin HARDWARE_PM support 2007-12-29 16:29 ` [2.6.24 patch] Fix " Mathieu Desnoyers @ 2008-01-02 17:46 ` Mathieu Desnoyers 0 siblings, 0 replies; 9+ messages in thread From: Mathieu Desnoyers @ 2008-01-02 17:46 UTC (permalink / raw) To: Robin Getz Cc: Adrian Bunk, Andrew Morton, Randy Dunlap, bryan.wu, linux-kernel * Mathieu Desnoyers (mathieu.desnoyers@polymtl.ca) wrote: > (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. > This patch header should also include : Problem identified by Adrian Bunk. Patch inspired by the original fix proposed by him. Thanks, Mathieu > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> > CC: Adrian Bunk <adrian.bunk@movial.fi> > CC: Randy Dunlap <randy.dunlap@oracle.com> > CC: bryan.wu@analog.com > CC: Robin Getz <rgetz@blackfin.uclinux.org> > --- > arch/blackfin/Kconfig | 4 ++++ > 1 file changed, 4 insertions(+) > > Index: linux-2.6-lttng/arch/blackfin/Kconfig > =================================================================== > --- linux-2.6-lttng.orig/arch/blackfin/Kconfig 2007-12-29 11:00:05.000000000 -0500 > +++ linux-2.6-lttng/arch/blackfin/Kconfig 2007-12-29 11:25:39.000000000 -0500 > @@ -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" > > > -- > 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 majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- Mathieu Desnoyers Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-01-02 17:52 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-12-28 18:56 [2.6.24 patch] restore blackfin HARDWARE_PM support Adrian Bunk 2007-12-28 19:14 ` Mathieu Desnoyers 2007-12-28 19:23 ` Adrian Bunk 2007-12-28 19:28 ` Mathieu Desnoyers 2007-12-29 6:14 ` Robin Getz 2007-12-29 6:23 ` Mathieu Desnoyers 2007-12-29 19:28 ` Robin Getz 2007-12-29 16:29 ` [2.6.24 patch] Fix " Mathieu Desnoyers 2008-01-02 17:46 ` Mathieu Desnoyers
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox