diff mbox series

[02/15] clocksource/drivers/sp804: Add COMPILE_TEST to CONFIG_ARM_TIMER_SP804

Message ID 20190509111048.11151-2-daniel.lezcano@linaro.org
State Accepted
Commit dfc82faad72520769ca146f857e65c23632eed5a
Headers show
Series [01/15] clocksource/drivers/sun4i: Add a compatible for suniv | expand

Commit Message

Daniel Lezcano May 9, 2019, 11:10 a.m. UTC
From: David Abdurachmanov <david.abdurachmanov@gmail.com>


This is only used on arm and arm64 platforms. Add COMPILE_TEST option.

Tested with 5.1-rc3+ on Fedora/RISCV. CONFIG_ARM_TIMER_SP804 no more shows
up in riscv config.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

---
 drivers/clocksource/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Helmut Grohne June 18, 2019, 12:07 p.m. UTC | #1
On Thu, May 09, 2019 at 01:10:35PM +0200, Daniel Lezcano wrote:
> From: David Abdurachmanov <david.abdurachmanov@gmail.com>

> 

> This is only used on arm and arm64 platforms. Add COMPILE_TEST option.


This patch breaks selecting CONFIG_ARM_TIMER_SP804 here. I don't quite
understand why, but commit dfc82faad72520769ca146f857e65c23632eed5a is
where bisection stops.

When I try make allnoconfig with a KCONFIG_ALLCONFIG that explicitly
enables this option, it remains disabled.

When I try make menuconfig, the clocksource menu is empty.

If I apply the patch below, the option is selectable in menuconfig and
with KCONFIG_ALLCONFIG again. It could be used as an alternative
implementation, but I don't have a good rationale for why the previous
approach breaks.

My reading of the kconfig documentation indicates that the "if
condition" should only influence the default value, but it seems like it
entirely disables the option here. I'm left wondering why.

Can we revert the patch until this is sorted out?

Helmut

--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -388,7 +388,8 @@ config ARM_GLOBAL_TIMER
 	  This options enables support for the ARM global timer unit
 
 config ARM_TIMER_SP804
-	bool "Support for Dual Timer SP804 module" if COMPILE_TEST
+	bool "Support for Dual Timer SP804 module"
+	depends on ARM || ARM64 || COMPILE_TEST
 	depends on GENERIC_SCHED_CLOCK && CLKDEV_LOOKUP
 	select CLKSRC_MMIO
 	select TIMER_OF if OF
diff mbox series

Patch

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 171502a356aa..ede5d20299b9 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -379,7 +379,7 @@  config ARM_GLOBAL_TIMER
 	  This options enables support for the ARM global timer unit
 
 config ARM_TIMER_SP804
-	bool "Support for Dual Timer SP804 module"
+	bool "Support for Dual Timer SP804 module" if COMPILE_TEST
 	depends on GENERIC_SCHED_CLOCK && CLKDEV_LOOKUP
 	select CLKSRC_MMIO
 	select TIMER_OF if OF