RISC-V interrupt controller select cleanup
Subsystems (2)
v2 cover RISC-V interrupt controller select cleanup
From: Conor Dooley <[email protected]>
Hey Marc, Anup, Palmer,
Submitted a patch yesterday defaulting the SiFive PLIC driver to enabled [0], and in the ensuing conversation Marc suggested just doing a select at the arch level and dropping the user selectability completely.
Since we're already selecting SIFIVE_PLIC in Kconfig.socs for all of the supported SoCs & selecting RISCV_INTC in the arch Kconfig itself, patches 1 & 2 can go via the irqchip tree without any impact.
@Anup, by the same logic - I think we can also enable the AIA stuff via selects at the arch level? Dumping as much from Kconfig.socs as possible is the plan, so adding them there for SOC_VIRT kinda goes contrary to that.
I spoke with Palmer today about putting my various bits of Kconfig.socs cleanup on a branch, so I'll take patch 3. It's only in this series as it is related work, rather due to any sort of dependency between the patches.
Thanks,
Conor.
[0] https://lore.kernel.org/linux-riscv/[email protected]/
Conor Dooley (3):
irqchip/sifive-plic: remove user selectability of SIFIVE_PLIC irqchip/riscv-intc: remove user selectability of RISCV_INTC
RISC-V: stop selecting SIFIVE_PLIC at the SoC level
arch/riscv/Kconfig | 1 + arch/riscv/Kconfig.socs | 5 ----- drivers/irqchip/Kconfig | 21 ++------------------- 3 files changed, 3 insertions(+), 24 deletions(-)
Signature · 1 line
2.37.2
PATCH v2 1/3 irqchip/sifive-plic: remove user selectability of SIFIVE_PLIC
From: Conor Dooley <[email protected]>
The SiFive PLIC driver is used by all current implementations, including those that do not have a SiFive PLIC. The current driver supports more than just SiFive PLICs at present and, where possible, future PLIC implementations will also use this driver. As every supported RISC-V SoC selects the driver directly in Kconfig.socs there's no point in exposing this kconfig option to users.
The Kconfig help text, in its current form, is misleading. There's no point doing anything about that though, as it will no longer be user selectable. Remove it.
--- drivers/irqchip/Kconfig | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/irqchip/Kconfig +1 -9
@@ -551,18 +551,10 @@ config RISCV_INTC If you don't know what to do here, say Y. config SIFIVE_PLIC - bool "SiFive Platform-Level Interrupt Controller" + bool depends on RISCV select IRQ_DOMAIN_HIERARCHY select GENERIC_IRQ_EFFECTIVE_AFF_MASK if SMP - help - This enables support for the PLIC chip found in SiFive (and - potentially other) RISC-V systems. The PLIC controls devices - interrupts and connects them to each core's local interrupt - controller. Aside from timer and software interrupts, all other - interrupt sources are subordinate to the PLIC. - - If you don't know what to do here, say Y. config EXYNOS_IRQ_COMBINER bool "Samsung Exynos IRQ combiner support" if COMPILE_TEST
Signature · 7 lines
2.37.2 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH v2 2/3 irqchip/riscv-intc: remove user selectability of RISCV_INTC
In reply to Conor DooleyFrom: Conor Dooley <[email protected]>
Since commit e71ee06e3ca3 ("RISC-V: Force select RISCV_INTC for CONFIG_RISCV") the driver has been enabled at the arch level - and is mandatory anyway. There's no point exposing this as a choice to users, so stop bothering.
---
I'd swear I had an interaction with someone a few months ago about the RISCV_INTC Kconfig options but I cannot for the file of me remember who. I hope this patch is not be going back on what I said then...
--- drivers/irqchip/Kconfig | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/irqchip/Kconfig +1 -10
@@ -538,17 +538,8 @@ config TI_PRUSS_INTC different processors within the SoC. config RISCV_INTC - bool "RISC-V Local Interrupt Controller" + bool depends on RISCV - default y - help - This enables support for the per-HART local interrupt controller - found in standard RISC-V systems. The per-HART local interrupt - controller handles timer interrupts, software interrupts, and - hardware interrupts. Without a per-HART local interrupt controller, - a RISC-V system will be unable to handle any interrupts. - - If you don't know what to do here, say Y. config SIFIVE_PLIC bool
Signature · 7 lines
2.37.2 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH v2 3/3 RISC-V: stop selecting SIFIVE_PLIC at the SoC level
In reply to Conor DooleyFrom: Conor Dooley <[email protected]>
The SIFIVE_PLIC driver is used by all current RISC-V SoCs & will be, where possible, used for future implementations. Rather than having each driver select the option on a case-by-case basis, do so at the arch level.
--- arch/riscv/Kconfig | 1 + arch/riscv/Kconfig.socs | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-)
arch/riscv/Kconfig +1 -0
@@ -123,6 +123,7 @@ config RISCV select PCI_MSI if PCI select RISCV_INTC select RISCV_TIMER if RISCV_SBI + select SIFIVE_PLIC select SPARSE_IRQ select SYSCTL_EXCEPTION_TRACE select THREAD_INFO_IN_TASK
arch/riscv/Kconfig.socs +0 -5
@@ -3,7 +3,6 @@ menu "SoC selection" config SOC_MICROCHIP_POLARFIRE bool "Microchip PolarFire SoCs" select MCHP_CLK_MPFS - select SIFIVE_PLIC help This enables support for Microchip PolarFire SoC platforms.
@@ -13,7 +12,6 @@ config SOC_SIFIVE select SERIAL_SIFIVE_CONSOLE if TTY select CLK_SIFIVE select CLK_SIFIVE_PRCI - select SIFIVE_PLIC select ERRATA_SIFIVE if !XIP_KERNEL help This enables support for SiFive SoC platform hardware.
@@ -22,7 +20,6 @@ config SOC_STARFIVE bool "StarFive SoCs" select PINCTRL select RESET_CONTROLLER - select SIFIVE_PLIC help This enables support for StarFive SoC platform hardware.
@@ -34,7 +31,6 @@ config SOC_VIRT select POWER_RESET_SYSCON_POWEROFF select GOLDFISH select RTC_DRV_GOLDFISH if RTC_CLASS - select SIFIVE_PLIC select PM_GENERIC_DOMAINS if PM select PM_GENERIC_DOMAINS_OF if PM && OF select RISCV_SBI_CPUIDLE if CPU_IDLE && RISCV_SBI
@@ -47,7 +43,6 @@ config SOC_CANAAN select CLINT_TIMER if RISCV_M_MODE select SERIAL_SIFIVE if TTY select SERIAL_SIFIVE_CONSOLE if TTY - select SIFIVE_PLIC select ARCH_HAS_RESET_CONTROLLER select PINCTRL select COMMON_CLK
Signature · 7 lines
2.37.2 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 33 lines · Conor Dooley
From: Conor Dooley <[email protected]>
Hey Marc, Anup, Palmer,
Submitted a patch yesterday defaulting the SiFive PLIC driver to enabled [0], and in the ensuing conversation Marc suggested just doing a select at the arch level and dropping the user selectability completely.
Since we're already selecting
SIFIVE_PLICinKconfig.socsfor all of the supported SoCs & selectingRISCV_INTCin the archKconfigitself, patches 1 & 2 can go via the irqchip tree without any impact.@Anup, by the same logic - I think we can also enable the AIA stuff via selects at the arch level? Dumping as much from
Kconfig.socsas possible is the plan, so adding them there forSOC_VIRTkinda goes contrary to that.I spoke with Palmer today about putting my various bits of
Kconfig.socscleanup on a branch, so I'll take patch 3. It's only in this series as it is related work, rather due to any sort of dependency between the patches.Thanks,
Conor.[0] https://lore.kernel.org/linux-riscv/[email protected]/
Conor Dooley (3):
irqchip/sifive-plic: remove user selectability ofSIFIVE_PLICirqchip/riscv-intc: remove user selectability ofRISCV_INTC
RISC-V: stop selectingSIFIVE_PLICat the SoC level
Quoted 4 lines
arch/riscv/Kconfig | 1 + arch/riscv/Kconfig.socs | 5 ----- drivers/irqchip/Kconfig | 21 ++------------------- 3 files changed, 3 insertions(+), 24 deletions(-)
For the series:
Please take the whole thing via the RISC-V tree.
Thanks,
M.
Signature · 6 lines
Without deviation from the norm, progress is not possible. _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Palmer Dabbelt
AppliedQuoted 9 lines · Conor Dooley
From: Conor Dooley <[email protected]>
Hey Marc, Anup, Palmer,
Submitted a patch yesterday defaulting the SiFive PLIC driver to enabled [0], and in the ensuing conversation Marc suggested just doing a select at the arch level and dropping the user selectability completely.
[...]
Applied, thanks!
[1/3] irqchip/sifive-plic: remove user selectability of SIFIVE_PLIC
https://git.kernel.org/palmer/c/fdb1742aff43 [2/3] irqchip/riscv-intc: remove user selectability of RISCV_INTC https://git.kernel.org/palmer/c/d8fb13070c3c [3/3] RISC-V: stop selecting SIFIVE_PLIC at the SoC level https://git.kernel.org/palmer/c/bf3d7b1d8499
Best regards,
Signature · 6 lines
Palmer Dabbelt <[email protected]> _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
This series was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:
Hello:
This series was applied to riscv/linux.git (for-next) by Palmer Dabbelt <[email protected]>:
Quoted 9 lines · On Fri, 18 Nov 2022 10:42:58 +0000 you wrote:
From: Conor Dooley <[email protected]>
Hey Marc, Anup, Palmer,
Submitted a patch yesterday defaulting the SiFive PLIC driver to enabled [0], and in the ensuing conversation Marc suggested just doing a select at the arch level and dropping the user selectability completely.
[...]
Here is the summary with links:
- [v2,1/3] irqchip/sifive-plic: remove user selectability of SIFIVE_PLIC
https://git.kernel.org/riscv/c/fdb1742aff43 - [v2,2/3] irqchip/riscv-intc: remove user selectability of RISCV_INTC https://git.kernel.org/riscv/c/d8fb13070c3c - [v2,3/3] RISC-V: stop selecting SIFIVE_PLIC at the SoC level https://git.kernel.org/riscv/c/bf3d7b1d8499
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html