Skip to contentSkip to conversation

irqchip/sifive-plic: default to enabled

PATCH In review Conor Dooley 2 participants 4 messages Nov 17, 2022

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

PATCH 1/1 irqchip/sifive-plic: default to enabled

From: Conor Dooley <[email protected]>

The SiFive PLIC driver is used by all current implementations, including those that do not have a SiFive PLIC. Default the driver to enabled, with the intention of later removing the current "every SOC selects this" situation in Kconfig.socs at the moment.

The speculative "potential others" in the description no longer makes any sense, as the driver is always used. Update the Kconfig symbol's description to reflect the driver's ubiquitous state.

---
Hey Marc,

I recall some discussion when this driver was extended to other PLICs a few months ago:
https://lore.kernel.org/linux-riscv/[email protected]/

Perhaps I got the wrong impression, but it seemed to me that you intend for future implementations to reuse this driver where possible?

I'd like to think, and surely will be proven wrong, that ~all future plic implementations should be similar enough to fit that bill. It's kinda on this basis that I figure switching this thing to default y should be okay. It's already only buildable on RISC-V & every implementation uses it, so no difference there.

Thanks,
Conor.

---
 drivers/irqchip/Kconfig | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/irqchip/Kconfig +6 -5
index 7ef9f5e696d3..6f99919ba66c 100644
@@ -553,14 +553,15 @@ config RISCV_INTC
 config SIFIVE_PLIC
 	bool "SiFive Platform-Level Interrupt Controller"
 	depends on RISCV
+	default y
 	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.
+	   This enables support for the PLIC chip found in SiFive & 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.
 
Signature · 1 line
2.37.2
#1 lore raw
Quoted 16 lines · Conor Dooley

From: Conor Dooley <[email protected]>

The SiFive PLIC driver is used by all current implementations, including those that do not have a SiFive PLIC. Default the driver to enabled, with the intention of later removing the current "every SOC selects this" situation in Kconfig.socs at the moment.

The speculative "potential others" in the description no longer makes any sense, as the driver is always used. Update the Kconfig symbol's description to reflect the driver's ubiquitous state.

---
Hey Marc,

Quoted 6 lines

I recall some discussion when this driver was extended to other PLICs a few months ago:
https://lore.kernel.org/linux-riscv/[email protected]/

Perhaps I got the wrong impression, but it seemed to me that you intend for future implementations to reuse this driver where possible?

Well, within reasons. People seem to have some very liberal interpretations of the architecture spec...

Quoted 6 lines

I'd like to think, and surely will be proven wrong, that ~all future plic implementations should be similar enough to fit that bill. It's kinda on this basis that I figure switching this thing to default y should be okay. It's already only buildable on RISC-V & every implementation uses it, so no difference there.

If you expect this to be present at all times, why isn't this selected by the architecture Kconfig instead? I always find it pretty odd to have something that is 'default y' and yet constrained by a 'depend MYARCH'. A 'select PLIC' would make a lot more sense.

And then you can stop making this user selectable.

Thanks,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
#2 lore raw
Quoted 22 lines · Marc Zyngier
Quoted 20 lines · Conor Dooley

From: Conor Dooley <[email protected]>

The SiFive PLIC driver is used by all current implementations, including those that do not have a SiFive PLIC. Default the driver to enabled, with the intention of later removing the current "every SOC selects this" situation in Kconfig.socs at the moment.

The speculative "potential others" in the description no longer makes any sense, as the driver is always used. Update the Kconfig symbol's description to reflect the driver's ubiquitous state.

---
Hey Marc,

I recall some discussion when this driver was extended to other PLICs a few months ago:
https://lore.kernel.org/linux-riscv/[email protected]/

Quoted 5 lines
Quoted 2 lines

Perhaps I got the wrong impression, but it seemed to me that you intend for future implementations to reuse this driver where possible?

Well, within reasons. People seem to have some very liberal interpretations of the architecture spec...

Yeah, I know.. something something "RISC-V is meant to be extensible" something something. Even if that means doing some "standard" thing your own way apparently.

Quoted 8 lines
Quoted 5 lines

I'd like to think, and surely will be proven wrong, that ~all future plic implementations should be similar enough to fit that bill. It's kinda on this basis that I figure switching this thing to default y should be okay. It's already only buildable on RISC-V & every implementation uses it, so no difference there.

If you expect this to be present at all times, why isn't this selected by the architecture Kconfig instead?

Everyone at the moment needs it, but that's not always going to be true. The AIA APLIC that's currently out for review is the "next generation" interrupt controller. When we will actually see one in the wild is another question.

Quoted 5 lines

I always find it pretty odd to
have something that is 'default y' and yet constrained by a 'depend MYARCH'. A 'select PLIC' would make a lot more sense.

And then you can stop making this user selectable.

I was considering moving the select to arch level, but settled for this as while I'd like to stop the individual SOCs doing select PLIC, I can see why someone building for a (future) system with the new AIA stuff may not care to build it.

Or maybe the overhead of this one driver is nothing to care about?

Thanks,
Conor.

#3 lore raw
Quoted 27 lines · Conor Dooley
Quoted 25 lines · Marc Zyngier
Quoted 22 lines · Conor Dooley

From: Conor Dooley <[email protected]>

The SiFive PLIC driver is used by all current implementations, including those that do not have a SiFive PLIC. Default the driver to enabled, with the intention of later removing the current "every SOC selects this" situation in Kconfig.socs at the moment.

The speculative "potential others" in the description no longer makes any sense, as the driver is always used. Update the Kconfig symbol's description to reflect the driver's ubiquitous state.

---
Hey Marc,

I recall some discussion when this driver was extended to other PLICs a few months ago:
https://lore.kernel.org/linux-riscv/[email protected]/

Perhaps I got the wrong impression, but it seemed to me that you intend for future implementations to reuse this driver where possible?

Quoted 6 lines
Quoted 2 lines

Well, within reasons. People seem to have some very liberal interpretations of the architecture spec...

Yeah, I know.. something something "RISC-V is meant to be extensible" something something. Even if that means doing some "standard" thing your own way apparently.

Funny how someone's "extensible" is someone else's "terminally broken". I guess HW folks will eventually learn that, possibly the hard way.

Quoted 19 lines
Quoted 9 lines
Quoted 6 lines

I'd like to think, and surely will be proven wrong, that ~all future plic implementations should be similar enough to fit that bill. It's kinda on this basis that I figure switching this thing to default y should be okay. It's already only buildable on RISC-V & every implementation uses it, so no difference there.

If you expect this to be present at all times, why isn't this selected by the architecture Kconfig instead?

Everyone at the moment needs it, but that's not always going to be true. The AIA APLIC that's currently out for review is the "next generation" interrupt controller. When we will actually see one in the wild is another question.

Quoted 4 lines

I always find it pretty odd to
have something that is 'default y' and yet constrained by a 'depend MYARCH'. A 'select PLIC' would make a lot more sense.

Quoted 8 lines
Quoted 1 line

And then you can stop making this user selectable.

I was considering moving the select to arch level, but settled for this as while I'd like to stop the individual SOCs doing select PLIC, I can see why someone building for a (future) system with the new AIA stuff may not care to build it.

Or maybe the overhead of this one driver is nothing to care about?

In the grand scheme of things, it really doesn't matter. Hardly anyone is configuring their own kernel. People use distro kernels, which will have *everything* enabled.

As an example, on the arm64 side we have long decided that some things were not worth the trouble, such as selectable root interrupt controllers and non-SMP support. Life is too short to care about those.

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.