Skip to contentSkip to conversation

Change S390 anti-dependency to CONFIG_GENERIC_HARDIRQS dependency

PATCH In review Andy Fleming 4 participants 9 messages Oct 14, 2008 – Oct 15, 2008

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

PATCH 1/1 Change S390 anti-dependency to CONFIG_GENERIC_HARDIRQS dependency

PHY Lib and DSA expect request_irq and other such functions to exist. S390 doesn't support those functions, however we should mark the actual dependency, which is generic hardirq support, rather than explicitly depend on !S390.

---
This makes more sense to me, but I could be missing something?

 drivers/net/phy/Kconfig |    2 +-
 net/dsa/Kconfig         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/phy/Kconfig +1 -1
index d55932a..73027a0 100644
@@ -4,7 +4,7 @@
 
 menuconfig PHYLIB
 	tristate "PHY Device support and infrastructure"
-	depends on !S390
+	depends on GENERIC_HARDIRQS
 	depends on NET_ETHERNET
 	help
 	  Ethernet controllers are usually attached to PHY
net/dsa/Kconfig +1 -1
index 49211b3..ea9c5aa 100644
@@ -1,7 +1,7 @@
 menuconfig NET_DSA
 	bool "Distributed Switch Architecture support"
 	default n
-	depends on EXPERIMENTAL && !S390
+	depends on EXPERIMENTAL && GENERIC_HARDIRQS
 	select PHYLIB
 	---help---
 	  This allows you to use hardware switch chips that use
Signature · 1 line
1.5.4.GIT
maintainer
#1 lore raw

From: Andy Fleming <[email protected]>
Date: Tue, 14 Oct 2008 17:28:13 -0500

Quoted 8 lines

PHY Lib and DSA expect request_irq and other such functions to exist. S390 doesn't support those functions, however we should mark the actual dependency, which is generic hardirq support, rather than explicitly depend on !S390.

---
This makes more sense to me, but I could be missing something?

GENERIC_HARDIRQS is not the correct dependency.

Not all architectures use the generic IRQ layer, yet have support for interrupts (request_irq(), free_irq(), etc.)

Two such platforms are 32-bit sparc and m68k.

#2 lore raw
Quoted 12 lines · David Miller

From: Andy Fleming <[email protected]>
Date: Tue, 14 Oct 2008 17:28:13 -0500

Quoted 8 lines

PHY Lib and DSA expect request_irq and other such functions to exist. S390 doesn't support those functions, however we should mark the actual dependency, which is generic hardirq support, rather than explicitly depend on !S390.

---
This makes more sense to me, but I could be missing something?

Quoted 6 lines

GENERIC_HARDIRQS is not the correct dependency.

Not all architectures use the generic IRQ layer, yet have support for interrupts (request_irq(), free_irq(), etc.)

Two such platforms are 32-bit sparc and m68k.

Argh. From what I could see, we have request_irq, free_irq, disable_irq, enable_irq, and disable_irq_nosync. For the PHYLIB, it shouldn't be difficult to modify things so that it doesn't compile in interrupt support if the system doesn't support them. Shouldn't, that is, if there's some config option that tells me whether those functions exist.

Would it be acceptable to create a config option which *did* convey this meaning? Off the top of my head I can imagine either having s390's Kconfig declare NO_HARDIRQ_SUPPORT. Alternatively, it would be less trivial, but fairly easy to create a config option, HARDIRQ_SUPPORT, which is either selected by arches which define their own request_irq, etc functions, or automatically selected when GENERIC_HARDIRQS is selected.

Andy

maintainer
#3 lore raw

From: "Andy Fleming" <[email protected]>
Date: Tue, 14 Oct 2008 18:21:44 -0500

Quoted 6 lines

Argh. From what I could see, we have request_irq, free_irq, disable_irq, enable_irq, and disable_irq_nosync. For the PHYLIB, it shouldn't be difficult to modify things so that it doesn't compile in interrupt support if the system doesn't support them. Shouldn't, that is, if there's some config option that tells me whether those functions exist.

I think this whole situation with s390 is rediculious.

If s390 is weird and lacks these fundamental things, that's fine. What isn't fine is how we're handling this.

No code should care or even be aware of this.

S390 should simply provide a set of dummy DMA and interrupt interface stubs that always fail and return an error value.

Then we can get rid of this S390 Kconfig stuff which has been spewed all over the place.

#4 lore raw
Quoted 15 lines · David Miller

From: "Andy Fleming" <[email protected]>
Date: Tue, 14 Oct 2008 18:21:44 -0500

Quoted 6 lines

Argh. From what I could see, we have request_irq, free_irq, disable_irq, enable_irq, and disable_irq_nosync. For the PHYLIB, it shouldn't be difficult to modify things so that it doesn't compile in interrupt support if the system doesn't support them. Shouldn't, that is, if there's some config option that tells me whether those functions exist.

I think this whole situation with s390 is rediculious.

If s390 is weird and lacks these fundamental things, that's fine. What isn't fine is how we're handling this.

Quoted 7 lines

No code should care or even be aware of this.

S390 should simply provide a set of dummy DMA and interrupt interface stubs that always fail and return an error value.

Then we can get rid of this S390 Kconfig stuff which has been spewed all over the place.

"depends on PCI" has always worked for me. Any reason we can't use that here?

-- Chris

maintainer
#5 lore raw

From: Chris Snook <[email protected]>
Date: Tue, 14 Oct 2008 19:43:05 -0400

Quoted 19 lines
Quoted 9 lines · David Miller

From: "Andy Fleming" <[email protected]>
Date: Tue, 14 Oct 2008 18:21:44 -0500

Quoted 6 lines

Argh. From what I could see, we have request_irq, free_irq, disable_irq, enable_irq, and disable_irq_nosync. For the PHYLIB, it shouldn't be difficult to modify things so that it doesn't compile in interrupt support if the system doesn't support them. Shouldn't, that is, if there's some config option that tells me whether those functions exist.

Quoted 8 lines

I think this whole situation with s390 is rediculious.
If s390 is weird and lacks these fundamental things, that's fine. What isn't fine is how we're handling this.
No code should care or even be aware of this.
S390 should simply provide a set of dummy DMA and interrupt interface stubs that always fail and return an error value.
Then we can get rid of this S390 Kconfig stuff which has been spewed all over the place.

Quoted 1 line

"depends on PCI" has always worked for me. Any reason we can't use that here?

That's every worse.

What in the world does PCI have to do with the attribute we are trying to depend upon here?

No, it's just stupid. Add nop do-nothing stub functions for the APIs an architecture doesn't support, then we need none of this.

#6 lore raw
Quoted 23 lines · David Miller

From: Chris Snook <[email protected]>
Date: Tue, 14 Oct 2008 19:43:05 -0400

Quoted 18 lines
Quoted 9 lines · David Miller

From: "Andy Fleming" <[email protected]>
Date: Tue, 14 Oct 2008 18:21:44 -0500

Quoted 6 lines

Argh. From what I could see, we have request_irq, free_irq, disable_irq, enable_irq, and disable_irq_nosync. For the PHYLIB, it shouldn't be difficult to modify things so that it doesn't compile in interrupt support if the system doesn't support them. Shouldn't, that is, if there's some config option that tells me whether those functions exist.

Quoted 8 lines

I think this whole situation with s390 is rediculious.
If s390 is weird and lacks these fundamental things, that's fine. What isn't fine is how we're handling this.
No code should care or even be aware of this.
S390 should simply provide a set of dummy DMA and interrupt interface stubs that always fail and return an error value.
Then we can get rid of this S390 Kconfig stuff which has been spewed all over the place.

Quoted 1 line

"depends on PCI" has always worked for me. Any reason we can't use that here?

Quoted 7 lines

That's every worse.

What in the world does PCI have to do with the attribute we are trying to depend upon here?

No, it's just stupid. Add nop do-nothing stub functions for the APIs an architecture doesn't support, then we need none of this.

But then it will be much more of a pain to exclude the vast swath of irrelevant code in the kernel tree from your builds on these exotic architectures. Have you ever built a kernel on s390? It's not exactly the architecture's strong suit, and cross-compilers have their own problems. I don't care what it is, but we should have *some* mechanism for automatically excluding every PCI device driver in existence from our builds of s390 and any other similarly unusual architecture.

-- Chris

maintainer
#7 lore raw

From: Chris Snook <[email protected]>
Date: Tue, 14 Oct 2008 20:07:55 -0400

Quoted 3 lines

But then it will be much more of a pain to exclude the vast swath of irrelevant code in the kernel tree from your builds on these exotic architectures. Have you ever built a kernel on s390?

That's totally irrelevant.

Does S390 have ethernet or ethernet-like devices? If so, the someday it might in fact might want to use something like phylib instead of adding yet another implementation of programming a particular PHY chip.

So in fact, something like phylib should be possible to enable even on s390.

And this current situation means s390 builds get less coverage, making allmodconfig test builds (which the s390 folks are obviously doing since they hit this originally reported build failure) less useful than they could be.

I would even be happy to make it such that SBUS drivers can be enabled for test building on x86, and in fact right now in Linus's tree that's very close to doable.

#8 lore raw
Quoted 7 lines · David Miller

From: Chris Snook <[email protected]>
Date: Tue, 14 Oct 2008 20:07:55 -0400

Quoted 3 lines

But then it will be much more of a pain to exclude the vast swath of irrelevant code in the kernel tree from your builds on these exotic architectures. Have you ever built a kernel on s390?

Quoted 6 lines

That's totally irrelevant.

Does S390 have ethernet or ethernet-like devices? If so, the someday it might in fact might want to use something like phylib instead of adding yet another implementation of programming a particular PHY chip.

Last I checked, s390 doesn't have any hardware that can't be shared between at least 64 guests. The most Linux will ever control on that hardware is a software channel, be it a channel to a disk controller, network controller, or application-specific offload engine. They don't really have NICs, more like a built-in router which can optionally fake layer 2 for the benefit of guests.

Quoted 7 lines

So in fact, something like phylib should be possible to enable even on s390.

And this current situation means s390 builds get less coverage, making allmodconfig test builds (which the s390 folks are obviously doing since they hit this originally reported build failure) less useful than they could be.

Currently, allmodconfig on s390 is cheap, because there's a miniscule amount of device driver code that can be enabled in Kconfig. If you enabled all those other drivers to build on s390, it would take *days* to complete an allmodconfig build natively or in an emulator. Forcing people to use cross-compilers to get things done at a reasonable pace would mean treating s390 differently from other architectures in multi-platform build systems, and would probably have the effect that nobody outside of IBM would do any significant build testing on that architecture.

Quoted 3 lines

I would even be happy to make it such that SBUS drivers can be enabled for test building on x86, and in fact right now in Linus's tree that's very close to doable.

I have no objection to that. I have MIPS to burn on my x86 boxes. s390 MIPS cost a few orders of magnitude more.

-- Chris