From 8a0868b05b852b67bee6440569a43b99fc45365b Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 15 Jan 2008 12:42:02 -0500 Subject: [PATCH] Fix Blackfin HARDWARE_PM support This patch restores the blackfin Hardware Performance Monitor Profiling support that was killed by the combining of instrumentation menus in commit 74c2d804096ccf1b195da816fcd4d6eb67af7ff4. 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. Thanks to Adrian Bunk for finding this bug and providing an initial patch. Signed-off-by: Mathieu Desnoyers CC: Adrian Bunk CC: Randy Dunlap CC: bryan.wu@analog.com Acked-by: Robin Getz Signed-off-by: Linus Torvalds --- arch/blackfin/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 2a3a7ea5958c0..25232ba081193 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -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" -- 2.39.5