Messages in this thread | | | Date | Tue, 20 May 2008 16:46:44 +0100 (BST) | From | "Maciej W. Rozycki" <> | Subject | Re: [PATCH] x86: Get irq for hpet timer |
| |
On Tue, 20 May 2008, Kevin Hao wrote:
> We can simply skip these special IRQ. :-) > Does anyone has a better solution?
Hmm, you probably want to skip all lines that are edge-triggered. Otherwise you may have problems with sharing. Drivers for devices used with these edge-triggered lines may have special provisions to permit sharing in a crafted way in special arrangements (cf. the 8250 serial or the IDE driver), but that may not work in a generic way with a different driver in the scenario. And the polarity may be wrong too -- edge-triggered lines are often active-high, because it's fine with them.
This driver is quite platform-specific -- how about instead of blindly probing for interrupt lines, you actually allocate one somehow in platform code? For example the x86 platform could select an otherwise unused interrupt line for you -- having routed all the legacy and PCI devices, these systems quite frequently are left with a couple of otherwise unused I/O APIC inputs. If not, sharing with a PCI interrupt line would be a good choice. AFAIK, except from 8254 and RTC emulation the HPET cannot be used with the legacy 8259A interrupt controllers, so that is a non issue (but platform will know to disable your driver then).
Maciej
| |