Skip to contentSkip to conversation

irq.h changes in 2.3.14

DISCUSSION Jes Sorensen 2 participants 2 messages Aug 19, 1999

lore
Share & tools
lore
#0 lore raw

Hi

I noticed the moving of arch/i386/kernel/irq.h to include/linux/irq.h in the 2.3.14 final patch.

I really don't think it is a good idea to move this very i386 specific definitions in there since the interrupt subsystems on other architectures are very different from that of the i386. Ie. on the m68k we do not use the same types or irq descriptors, the IRQ line statuses make no sense etc. and I am sure it is the same for some of the other non x86 architectures.

I see that it expects asm/hw_irq.h to be the architecture dependant stuff, but even the things that made it into include/linux/irq.h are way to architecture specific.

Putting this include file in include/linux/irq.h with a generic name like that means someone is going to use it in the generic kernel code at some point. Having the common kernel code relying on such x86 specific features is going to be a pain for us to handle at that point.

The only things I can see being architecture independant is the irq_{enter,exit}() stuff and even then I am not sure the SMP versions are portable enough for non x86 machines (being able to do test_bit() on a spin lock is fairly implementation specific).

I really think those bits should be moved out of the generic header files to avoid problems.

Jes

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw
Quoted 7 lines · Jes Sorensen

I noticed the moving of arch/i386/kernel/irq.h to include/linux/irq.h in the 2.3.14 final patch.

I really don't think it is a good idea to move this very i386 specific definitions in there since the interrupt subsystems on other architectures are very different from that of the i386.

The thing is, that the irq handling is _too_ different on different architectures. A lot of the problems, especially the SMP issues, are simply completely architecture-independent.

Quoted 4 lines

Ie. on the m68k
we do not use the same types or irq descriptors, the IRQ line statuses make no sense etc. and I am sure it is the same for some of the other non x86 architectures.

It is. And I _know_ that just about every architecture except for the x86 has bugs when it comes to SMP handling. Some, like the 68k, do not need to care.

Quoted 3 lines

I see that it expects asm/hw_irq.h to be the architecture dependant stuff, but even the things that made it into include/linux/irq.h are way to architecture specific.

There's absolutely nothing architecture-specific in <linux/irq.h>.

It may be _different_ than existing architectures, but I'll try to make sure that future ports use the same correct irq handling, and I'll see if I can port some of the existing stuff (notably alpha) to use the new generic handling. It's actually very flexible - it pretty much has to be in order to handle the different kinds of interrupt controllers that exist on PC-like machines.

No architecture will be _forced_ to use the new stuff, so don't worry. But I'll just warn you that you're likely to get the SMP stuff wrong if you don't use it ;)

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/