Skip to contentSkip to conversation

riscv: Make RISCV_TIMER depends on RISCV_SBI

PATCH Applied Kefeng Wang 3 participants 4 messages Oct 28, 2020 – Dec 3, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 riscv: Make RISCV_TIMER depends on RISCV_SBI

The riscv timer is set via SBI timer call, let's make RISCV_TIMER depends on RISCV_SBI, and it also fixes some build issue.

---
 drivers/clocksource/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/Kconfig +1 -1
index 68b087bff59c..2be849bb794a 100644
@@ -654,7 +654,7 @@ config ATCPIT100_TIMER
 
 config RISCV_TIMER
 	bool "Timer for the RISC-V platform" if COMPILE_TEST
-	depends on GENERIC_SCHED_CLOCK && RISCV
+	depends on GENERIC_SCHED_CLOCK && RISCV && RISCV_SBI
 	select TIMER_PROBE
 	select TIMER_OF
 	help
Signature · 7 lines
2.26.2


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
maintainer Reviewed-by Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · On Wed, 28 Oct 2020 06:12:30 PDT (-0700), [email protected] wrote:

The riscv timer is set via SBI timer call, let's make RISCV_TIMER depends on RISCV_SBI, and it also fixes some build issue.

---
 drivers/clocksource/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/Kconfig +0 -0
index 68b087bff59c..2be849bb794a 100644

drivers/clocksource/Kconfig config ATCPIT100_TIMER · line 660

Quoted 8 lines
drivers/clocksource/Kconfig +1 -1
@@ -654,7 +654,7 @@ config ATCPIT100_TIMER
 
 config RISCV_TIMER
 	bool "Timer for the RISC-V platform" if COMPILE_TEST
-	depends on GENERIC_SCHED_CLOCK && RISCV
+	depends on GENERIC_SCHED_CLOCK && RISCV && RISCV_SBI
 	select TIMER_PROBE
 	select TIMER_OF
 	help

This should probably be

Fixes 2bc3fc877aa9 ("RISC-V: Remove CLINT related code from timer and arch")

not really a bug in that commit, but since then the memory-mapped and SBI timers have been split and therefor there's no way this driver can do anything without SBI support.

Thanks!

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

#2 lore raw

Hi Daniel, ping...

Quoted 27 lines · Palmer Dabbelt
Quoted 14 lines · On Wed, 28 Oct 2020 06:12:30 PDT (-0700), [email protected] wrote:

The riscv timer is set via SBI timer call, let's make RISCV_TIMER depends on RISCV_SBI, and it also fixes some build issue.

---
 drivers/clocksource/Kconfig | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/Kconfig +0 -0
index 68b087bff59c..2be849bb794a 100644
@@ -654,7 +654,7 @@ config ATCPIT100_TIMER
 
Quoted 7 lines

 config RISCV_TIMER
     bool "Timer for the RISC-V platform" if COMPILE_TEST -    depends on GENERIC_SCHED_CLOCK && RISCV
+    depends on GENERIC_SCHED_CLOCK && RISCV && RISCV_SBI select TIMER_PROBE
     select TIMER_OF
     help

This should probably be

Fixes 2bc3fc877aa9 ("RISC-V: Remove CLINT related code from timer and arch")
Quoted 9 lines

not really a bug in that commit, but since then the memory-mapped and SBI timers have been split and therefor there's no way this driver can do anything without SBI support.

Thanks!

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

merge bot Applied
#3 lore raw

[tip: timers/core] clocksource/drivers/riscv: Make RISCV_TIMER depends on RISCV_SBI

In reply to Kefeng Wang
The following commit has been merged into the timers/core branch of tip:

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     ab3105446f1ec4e98fadfc998ee24feec271c16c
Gitweb:        https://git.kernel.org/tip/ab3105446f1ec4e98fadfc998ee24feec271c16c
Author:        Kefeng Wang <[email protected]>
AuthorDate:    Wed, 28 Oct 2020 21:12:30 +08:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Thu, 03 Dec 2020 19:16:26 +01:00

clocksource/drivers/riscv: Make RISCV_TIMER depends on RISCV_SBI

The riscv timer is set via SBI timer call, let's make RISCV_TIMER depends on RISCV_SBI, and it also fixes some build issue.

Fixes d5be89a8d118 ("RISC-V: Resurrect the MMIO timer implementation for M-mode systems")
---
 drivers/clocksource/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clocksource/Kconfig +1 -1
index 390c27c..9f00b83 100644
@@ -644,7 +644,7 @@ config ATCPIT100_TIMER
 
 config RISCV_TIMER
 	bool "Timer for the RISC-V platform" if COMPILE_TEST
-	depends on GENERIC_SCHED_CLOCK && RISCV
+	depends on GENERIC_SCHED_CLOCK && RISCV && RISCV_SBI
 	select TIMER_PROBE
 	select TIMER_OF
 	help